gcblue-commits Mailing List for Global Conflict Blue (Page 4)
Status: Alpha
Brought to you by:
ddcforge
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(112) |
Feb
(106) |
Mar
(88) |
Apr
(111) |
May
(53) |
Jun
(60) |
Jul
(58) |
Aug
(61) |
Sep
(45) |
Oct
(31) |
Nov
(71) |
Dec
(70) |
2005 |
Jan
(33) |
Feb
(57) |
Mar
(98) |
Apr
(47) |
May
(53) |
Jun
(79) |
Jul
(79) |
Aug
|
Sep
(33) |
Oct
(1) |
Nov
(20) |
Dec
(64) |
2006 |
Jan
(20) |
Feb
(1) |
Mar
(43) |
Apr
(11) |
May
(8) |
Jun
(23) |
Jul
|
Aug
(28) |
Sep
(58) |
Oct
(25) |
Nov
(47) |
Dec
(70) |
From: Dewitt C. <ddc...@us...> - 2006-11-29 02:51:46
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15466/xml Modified Files: options.xml Log Message: Index: options.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/options.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** options.xml 23 Nov 2006 00:07:59 -0000 1.32 --- options.xml 29 Nov 2006 02:51:44 -0000 1.33 *************** *** 1,4 **** <Options> ! <HostAddress>192.168.1.5</HostAddress> <LastScenarioPath>MultiPlayer.CVBGDuel.py</LastScenarioPath> <LastScenarioName>CVBGDuel</LastScenarioName> --- 1,4 ---- <Options> ! <HostAddress>192.168.1.4</HostAddress> <LastScenarioPath>MultiPlayer.CVBGDuel.py</LastScenarioPath> <LastScenarioName>CVBGDuel</LastScenarioName> *************** *** 11,15 **** <ShowPythonErrors /> <CacheFullDatabase /> ! <UserName>Dewitt2</UserName> <DisplaySettings>default</DisplaySettings> </Options> --- 11,15 ---- <ShowPythonErrors /> <CacheFullDatabase /> ! <UserName>Dewittaaa</UserName> <DisplaySettings>default</DisplaySettings> </Options> |
From: Dewitt C. <ddc...@us...> - 2006-11-29 02:51:46
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15466/src/sim Modified Files: tcControllableObject.cpp tcSensorMap.cpp Log Message: Index: tcSensorMap.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcSensorMap.cpp 20 Nov 2006 00:17:45 -0000 1.27 --- tcSensorMap.cpp 29 Nov 2006 02:51:44 -0000 1.28 *************** *** 443,447 **** if (nMapIdx == -1) { ! fprintf(stderr, "Bad alliance passed to sensormap (%d)\n", anAlliance); return NULL; } --- 443,447 ---- if (nMapIdx == -1) { ! fprintf(stderr, "Bad alliance passed to sensormap (%d, nMaps: %d)\n", anAlliance, mnMaps); return NULL; } *************** *** 476,490 **** int tcSensorMap::GetTrackCount(UINT8 anAlliance) { ! tcAllianceSensorMap *pMap = GetMap(anAlliance); ! if (pMap == NULL) {return 0;} ! return pMap->GetTrackCount(); } ! tnPoolIndex tcSensorMap::GetStartTrackPosition(UINT8 anAlliance) { ! tcAllianceSensorMap *pMap = GetMap(anAlliance); ! return pMap->GetStartTrackPosition(); } ! void tcSensorMap::GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance) { ! tcAllianceSensorMap *pMap = GetMap(anAlliance); ! return pMap->GetNextTrack(pos, pTrack); } --- 476,510 ---- int tcSensorMap::GetTrackCount(UINT8 anAlliance) { ! if (tcAllianceSensorMap *pMap = GetMap(anAlliance)) ! { ! return pMap->GetTrackCount(); ! } ! else ! { ! return 0; ! } } ! tnPoolIndex tcSensorMap::GetStartTrackPosition(UINT8 anAlliance) ! { ! if (tcAllianceSensorMap *pMap = GetMap(anAlliance)) ! { ! return pMap->GetStartTrackPosition(); ! } ! else ! { ! return -1; ! } } ! void tcSensorMap::GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance) ! { ! if (tcAllianceSensorMap *pMap = GetMap(anAlliance)) ! { ! return pMap->GetNextTrack(pos, pTrack); ! } ! else ! { ! pos = -1; ! pTrack = 0; ! } } Index: tcControllableObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcControllableObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcControllableObject.cpp 28 Nov 2006 01:57:37 -0000 1.4 --- tcControllableObject.cpp 29 Nov 2006 02:51:44 -0000 1.5 *************** *** 46,50 **** void tcControllableObject::SetBypassControlCheck(bool state) { ! bypassControlCheck = true; } --- 46,50 ---- void tcControllableObject::SetBypassControlCheck(bool state) { ! bypassControlCheck = state; } |
From: Dewitt C. <ddc...@us...> - 2006-11-29 02:51:46
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15466/scripts Modified Files: HotKey.py Log Message: Index: HotKey.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/HotKey.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** HotKey.py 24 Oct 2006 01:34:37 -0000 1.11 --- HotKey.py 29 Nov 2006 02:51:43 -0000 1.12 *************** *** 69,77 **** def ProcessDoubleClickHook(UnitInfo, flags): # in multiplayer try to take control of available unit first ! ## if (UnitInfo.IsMultiplayerActive()): ! ## if (not UnitInfo.IsPlayerControlled()): ! ## if (UnitInfo.IsAvailable()): ! ## UnitInfo.SendCommand('TakeControl') ! ## return # for units with aircraft show the flight panel unless shift is pressed --- 69,77 ---- def ProcessDoubleClickHook(UnitInfo, flags): # in multiplayer try to take control of available unit first ! if (UnitInfo.IsMultiplayerActive()): ! if (not UnitInfo.IsPlayerControlled()): ! if (UnitInfo.IsAvailable()): ! UnitInfo.TakeControl() ! return # for units with aircraft show the flight panel unless shift is pressed |
From: Dewitt C. <ddc...@us...> - 2006-11-29 02:51:46
|
Update of /cvsroot/gcblue/gcb_wx/src/ai In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv15466/src/ai Modified Files: Nav.cpp Log Message: Index: Nav.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/ai/Nav.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Nav.cpp 27 Aug 2006 21:28:54 -0000 1.8 --- Nav.cpp 29 Nov 2006 02:51:44 -0000 1.9 *************** *** 53,58 **** for (unsigned char n=0; n<nWaypoints; n++) { ! stream << waypoints[n].mfLon_rad; ! stream << waypoints[n].mfLat_rad; stream << waypoints[n].mfAlt_m; } --- 53,61 ---- for (unsigned char n=0; n<nWaypoints; n++) { ! float lon_rad = float(waypoints[n].mfLon_rad); ! float lat_rad = float(waypoints[n].mfLat_rad); ! ! stream << lon_rad; ! stream << lat_rad; stream << waypoints[n].mfAlt_m; } |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/src/ai In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/src/ai Modified Files: Brain.cpp Log Message: Index: Brain.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/ai/Brain.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Brain.cpp 27 Nov 2006 00:46:39 -0000 1.15 --- Brain.cpp 28 Nov 2006 01:57:37 -0000 1.16 *************** *** 65,71 **** if (platform->IsClientMode()) { - long targetId; - stream >> targetId; - unsigned char nTasks; stream >> nTasks; --- 65,68 ---- |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/src/sim Modified Files: tcControllableObject.cpp tcLauncherState.cpp tcObjectControl.cpp tcSimState.cpp Log Message: Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** tcSimState.cpp 20 Nov 2006 00:17:45 -0000 1.101 --- tcSimState.cpp 28 Nov 2006 01:57:37 -0000 1.102 *************** *** 2308,2315 **** { tcGameObject* obj = GetObject(id); - if (obj == 0) return false; // target not found // return truth data if own alliance ! if (alliance == obj->GetAlliance()) { tcKinematics *kin = &obj->mcKin; --- 2308,2314 ---- { tcGameObject* obj = GetObject(id); // return truth data if own alliance ! if ((obj != 0) && (alliance == obj->GetAlliance())) { tcKinematics *kin = &obj->mcKin; *************** *** 2326,2330 **** { tcSensorMapTrack *pTrack = ! mcSensorMap.GetSensorMapTrack(obj->mnID, alliance); if (pTrack) track = *pTrack; else return false; // track not found --- 2325,2329 ---- { tcSensorMapTrack *pTrack = ! mcSensorMap.GetSensorMapTrack(id, alliance); if (pTrack) track = *pTrack; else return false; // track not found *************** *** 2389,2395 **** } // if client time is too much ahead, pause the client ! if (dt < -1) { timeAcceleration = 0; } } --- 2388,2400 ---- } // if client time is too much ahead, pause the client ! double lagThresh = clientPause ? -0.25 : -1.0; ! if (dt < lagThresh) { timeAcceleration = 0; + clientPause = true; + } + else + { + clientPause = false; } } *************** *** 2615,2619 **** tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); ! tcControllableObject::SetSinglePlayerMode(true); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) --- 2620,2624 ---- tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); ! tcControllableObject::SetBypassControlCheck(true); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) *************** *** 2642,2646 **** tcGameObject::SetClientMode(true); tcCommandObject::SetClientMode(true); ! tcControllableObject::SetSinglePlayerMode(false); if (positionRegistry) --- 2647,2651 ---- tcGameObject::SetClientMode(true); tcCommandObject::SetClientMode(true); ! tcControllableObject::SetBypassControlCheck(false); if (positionRegistry) *************** *** 2661,2665 **** tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); ! tcControllableObject::SetSinglePlayerMode(false); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) --- 2666,2670 ---- tcGameObject::SetClientMode(false); tcCommandObject::SetClientMode(false); ! tcControllableObject::SetBypassControlCheck(true); if (tcOptions::Get()->OptionStringExists("UsePositionRegistry")) *************** *** 2746,2750 **** mfLastTileAgeOut = 0; mnSensorPlatformCount = 0; ! objectNameMap.clear(); captiveObjectMap.clear(); --- 2751,2756 ---- mfLastTileAgeOut = 0; mnSensorPlatformCount = 0; ! clientPause = false; ! objectNameMap.clear(); captiveObjectMap.clear(); *************** *** 2758,2762 **** multiplayerMode(MM_OFF), timeAcceleration(0), ! positionRegistry(0) { --- 2764,2769 ---- multiplayerMode(MM_OFF), timeAcceleration(0), ! positionRegistry(0), ! clientPause(false) { Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** tcObjectControl.cpp 27 Nov 2006 00:46:40 -0000 1.55 --- tcObjectControl.cpp 28 Nov 2006 01:57:37 -0000 1.56 *************** *** 1901,1915 **** wxASSERT(mpSS); if (mnHookID==NULL_INDEX) {mpHookedGameObj=NULL;return;} - bFound = mpSS->GetPlatformState(mnHookID,mpHookedGameObj); ! SetControlGameObject(mpHookedGameObj); ! if (!bFound) { mcAIPanel.SetAIData(0); - wxASSERT(false); return; } { tcPlatformObject *pPlatformObj = dynamic_cast<tcPlatformObject*> (mpHookedGameObj); --- 1901,1917 ---- wxASSERT(mpSS); if (mnHookID==NULL_INDEX) {mpHookedGameObj=NULL;return;} ! bFound = mpSS->GetPlatformState(mnHookID, mpHookedGameObj); ! if (!bFound) // hooked a sensor track in multiplayer client { mcAIPanel.SetAIData(0); return; } + SetControlGameObject(mpHookedGameObj); + + + { tcPlatformObject *pPlatformObj = dynamic_cast<tcPlatformObject*> (mpHookedGameObj); Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** tcLauncherState.cpp 20 Nov 2006 00:17:44 -0000 1.38 --- tcLauncherState.cpp 28 Nov 2006 01:57:37 -0000 1.39 *************** *** 324,328 **** double lon_rad, double lat_rad, float alt_m) { ! if (nLauncher > launchers.size()) { std::cerr << "Bad launcher index" << std::endl; --- 324,329 ---- double lon_rad, double lat_rad, float alt_m) { ! size_t nLaunchers = launchers.size(); ! if (nLauncher > nLaunchers) { std::cerr << "Bad launcher index" << std::endl; *************** *** 346,351 **** --- 347,355 ---- } + launchers[nLauncher]->SetDatum(lon_rad, lat_rad, alt_m); + commandObj.SetNewCommand(GetLauncherFlag(nLauncher)); + return true; } *************** *** 356,361 **** bool tcLauncherState::SetLauncherTarget(unsigned nLauncher, long targetID) { ! ! if (nLauncher > launchers.size()) { std::cerr << "Bad launcher index" << std::endl; --- 360,365 ---- bool tcLauncherState::SetLauncherTarget(unsigned nLauncher, long targetID) { ! size_t nLaunchers = launchers.size(); ! if (nLauncher > nLaunchers) { std::cerr << "Bad launcher index" << std::endl; *************** *** 365,372 **** tcLauncher* launcher = launchers[nLauncher]; launcher->mnTargetID = targetID; ! launcher->msDatum.Set(0, 0, 0); // clear datum launcher->ClearPendingLaunch(); commandObj.SetNewCommand(GetLauncherFlag(nLauncher)); return true; } --- 369,377 ---- tcLauncher* launcher = launchers[nLauncher]; launcher->mnTargetID = targetID; ! launcher->msDatum.Set(0, 0, 0); // clear datum launcher->ClearPendingLaunch(); commandObj.SetNewCommand(GetLauncherFlag(nLauncher)); + return true; } Index: tcControllableObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcControllableObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcControllableObject.cpp 23 Mar 2006 01:11:02 -0000 1.3 --- tcControllableObject.cpp 28 Nov 2006 01:57:37 -0000 1.4 *************** *** 35,39 **** #endif ! bool tcControllableObject::singlePlayerMode = true; tcUserInfo* tcControllableObject::userInfo = 0; --- 35,40 ---- #endif ! bool tcControllableObject::bypassControlCheck = true; ! tcUserInfo* tcControllableObject::userInfo = 0; *************** *** 43,49 **** } ! void tcControllableObject::SetSinglePlayerMode(bool state) { ! singlePlayerMode = state; } --- 44,50 ---- } ! void tcControllableObject::SetBypassControlCheck(bool state) { ! bypassControlCheck = true; } *************** *** 153,157 **** bool tcControllableObject::IsControlled() const { ! return singlePlayerMode || (controller == userInfo->GetUsername()); } --- 154,158 ---- bool tcControllableObject::IsControlled() const { ! return bypassControlCheck || (controller == userInfo->GetUsername()); } |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/scripts Modified Files: Menu.py Log Message: Index: Menu.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/Menu.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Menu.py 24 Oct 2006 01:34:37 -0000 1.28 --- Menu.py 28 Nov 2006 01:57:36 -0000 1.29 *************** *** 188,195 **** if (SubMenu.IsDieselElectric()): if (SubMenu.IsSnorkeling()): ! UnitMenu.AddItemWithParam('Stop snorkeling', 'SetSnorkel', 0) else: ! UnitMenu.AddItemWithParam('Start snorkeling', 'SetSnorkel', 1) UnitMenu.EndSubMenu() --- 188,200 ---- if (SubMenu.IsDieselElectric()): + if (UnitInfo.GetAlt() < 0): + term_str = 'snorkeling' + else: + term_str = 'diesels' + if (SubMenu.IsSnorkeling()): ! UnitMenu.AddItemWithParam('Stop %s' % term_str, 'SetSnorkel', 0) else: ! UnitMenu.AddItemWithParam('Start %s' % term_str, 'SetSnorkel', 1) UnitMenu.EndSubMenu() |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/src/database Modified Files: md5class.cpp tcDatabaseObject.cpp Log Message: Index: md5class.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/md5class.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** md5class.cpp 20 Nov 2006 00:17:40 -0000 1.2 --- md5class.cpp 28 Nov 2006 01:57:37 -0000 1.3 *************** *** 66,77 **** void CMD5::setPlainText(const char* plainText) { ! //set plaintext with a mutator, it's ok to ! //to call this multiple times. If casting away the const-ness of plainText ! //worries you, you could either make a local copy of the plain ! //text string instead of just pointing at the user's string, or ! //modify the RFC 1321 code to take 'const' plaintext, see example below. ! m_plainText = const_cast<char*>(plainText); ! m_digestValid = calcDigest(); } --- 66,78 ---- void CMD5::setPlainText(const char* plainText) { ! //set plaintext with a mutator, it's ok to ! //to call this multiple times. If casting away the const-ness of plainText ! //worries you, you could either make a local copy of the plain ! //text string instead of just pointing at the user's string, or ! //modify the RFC 1321 code to take 'const' plaintext, see example below. ! // m_plainText = const_cast<char*>(plainText); ! m_plainText = plainText; ! m_digestValid = calcDigest(); } *************** *** 120,125 **** for (int i = 0; i<16; i++) { ! //::sprintf(&m_digestString[p],"%02x", m_digest[i]); ! sprintf_s(&m_digestString[p], DIGEST_STRING_SIZE, "%02x", m_digest[i]); p+=2; } --- 121,126 ---- for (int i = 0; i<16; i++) { ! ::sprintf(&m_digestString[p],"%02x", m_digest[i]); ! //sprintf_s(&m_digestString[p], DIGEST_STRING_SIZE, "%02x", m_digest[i]); p+=2; } Index: tcDatabaseObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabaseObject.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcDatabaseObject.cpp 20 Nov 2006 00:17:40 -0000 1.24 --- tcDatabaseObject.cpp 28 Nov 2006 01:57:37 -0000 1.25 *************** *** 98,101 **** --- 98,102 ---- case PTYPE_SMALLSURFACE:strcpy(azString,"Small surface");break; case PTYPE_LARGESURFACE:strcpy(azString,"Large surface");break; + case PTYPE_CARRIER:strcpy(azString,"Carrier");break; case PTYPE_AIR:strcpy(azString,"Air");break; case PTYPE_FIXEDWING:strcpy(azString,"Fixed-wing air"); break; |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/include/sim Modified Files: tcControllableObject.h tcSimState.h Log Message: Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** tcSimState.h 21 Apr 2006 23:28:32 -0000 1.49 --- tcSimState.h 28 Nov 2006 01:57:36 -0000 1.50 *************** *** 212,215 **** --- 212,216 ---- std::map<std::string, long> captiveObjectMap; ///< lookup of captive flightdeck objects, secondary key is parent id tcPositionRegistry* positionRegistry; ///< for fast(er) lookup by region + bool clientPause; void EvaluateGuidedMissileHit(tcMissileObject* missile, tcGameObject* target); Index: tcControllableObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcControllableObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcControllableObject.h 24 Oct 2006 01:34:00 -0000 1.4 --- tcControllableObject.h 28 Nov 2006 01:57:36 -0000 1.5 *************** *** 72,76 **** static void AttachUserInfo(); ! static void SetSinglePlayerMode(bool state); tcControllableObject(); --- 72,76 ---- static void AttachUserInfo(); ! static void SetBypassControlCheck(bool state); tcControllableObject(); *************** *** 83,88 **** static tcUserInfo* userInfo; ! static bool singlePlayerMode; ///< bypass control check in single play ! }; #endif --- 83,87 ---- static tcUserInfo* userInfo; ! static bool bypassControlCheck; ///< bypass control check in single play or multiplayerServer }; #endif |
From: Dewitt C. <ddc...@us...> - 2006-11-28 01:57:43
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10463/xml Modified Files: stores_gui_table.xml Log Message: Index: stores_gui_table.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/stores_gui_table.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** stores_gui_table.xml 20 Nov 2006 00:19:52 -0000 1.1 --- stores_gui_table.xml 28 Nov 2006 01:57:37 -0000 1.2 *************** *** 3,7 **** <Image Off="close.png" On="close.png" /> </Button> ! <Stores SlotSize="16" UpperLeftX="12" UpperLeftY="30" HorizontalSpacing="90" VerticalSpacing="21" RowSize="444" /> --- 3,7 ---- <Image Off="close.png" On="close.png" /> </Button> ! <Stores SlotSize="16" UpperLeftX="12" UpperLeftY="50" HorizontalSpacing="90" VerticalSpacing="21" RowSize="444" /> |
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/sim Modified Files: tcCarrierObject.cpp tcFlightOpsObject.cpp tcFlightPort.cpp tcHeloObject.cpp tcObjectControl.cpp tcSonar.cpp tcSubObject.cpp Log Message: Index: tcHeloObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcHeloObject.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcHeloObject.cpp 20 Nov 2006 00:17:44 -0000 1.10 --- tcHeloObject.cpp 27 Nov 2006 00:46:40 -0000 1.11 *************** *** 28,31 **** --- 28,33 ---- #include "tcHeloObject.h" #include "tcAirDBObject.h" + #include "tcSonarDBObject.h" + #include "tcSonar.h" #ifdef _DEBUG *************** *** 41,44 **** --- 43,89 ---- } + + /** + * @returns altitude of dipping sonar if dipping sonar active, 999.9 m otherwise + */ + float tcHeloObject::GetDippingSonarAlt() const + { + const float NOT_APPLICABLE = 999.9f; + if (!IsEnsonifying()) return NOT_APPLICABLE; + + const tcSonar* sonar = GetStrongestActiveSonar(); + + if (sonar != 0) + { + return mcKin.mfAlt_m - sonar->GetScope(); + } + else + { + return NOT_APPLICABLE; + } + } + + + /** + * @returns max active sonar source level (dipping sonar) + */ + float tcHeloObject::GetSonarSourceLevel() const + { + const float NOT_APPLICABLE = -999.9f; + + if (!IsEnsonifying()) return NOT_APPLICABLE; + + const tcSonar* sonar = GetStrongestActiveSonar(); + if (sonar != 0) + { + return sonar->mpDBObj->SL; + } + else + { + return NOT_APPLICABLE; + } + } + + void tcHeloObject::RandInitNear(float afLon_deg, float afLat_deg) { Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** tcFlightPort.cpp 20 Nov 2006 00:17:44 -0000 1.30 --- tcFlightPort.cpp 27 Nov 2006 00:46:40 -0000 1.31 *************** *** 40,43 **** --- 40,44 ---- #include "tcLauncher.h" #include "ai/tcMissionManager.h" + #include "tcTime.h" #ifdef _DEBUG *************** *** 113,141 **** ready_time = x; ! // if this obj is in a ready spot, then update launcher and fuel state ! if (current_location == READY) ! { ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator<<(stream); ! unsigned char isLoading; ! stream >> isLoading; ! launcher->SetLoadState(isLoading != 0); ! } ! float fuel; ! stream >> fuel; ! platform->fuel_kg = fuel; ! char isRefueling; ! stream >> isRefueling; ! platform->SetRefueling(isRefueling != 0); ! } } ! return stream; --- 114,143 ---- ready_time = x; ! // if this obj is in a ready or launch spot, then update launcher and fuel state ! if (current_location != HANGAR) ! { ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator<<(stream); ! unsigned char isLoading; ! stream >> isLoading; ! launcher->SetLoadState(isLoading != 0); ! } ! float fuel; ! stream >> fuel; ! platform->fuel_kg = fuel; ! char isRefueling; ! stream >> isRefueling; ! platform->SetRefueling(isRefueling != 0); ! } } ! ! return stream; *************** *** 167,193 **** stream << x; ! // if this obj is in a ready spot, then update launcher and fuel state ! if (current_location == READY) ! { ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator>>(stream); ! // additional info that we don't want part of the normal launcher update (could use detail level instead) ! unsigned char isLoading = launcher->IsLoading() ? 1 : 0; ! stream << isLoading; ! } ! float fuel = platform->fuel_kg; ! stream << fuel; - char isRefueling = platform->IsRefueling() ? 1 : 0; - stream << isRefueling; - platform->SetRefueling(isRefueling != 0); - } - } return stream; --- 169,195 ---- stream << x; ! if (current_location != HANGAR) ! { ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator>>(stream); ! // additional info that we don't want part of the normal launcher update (could use detail level instead) ! unsigned char isLoading = launcher->IsLoading() ? 1 : 0; ! stream << isLoading; ! } ! float fuel = platform->fuel_kg; ! stream << fuel; ! ! char isRefueling = platform->IsRefueling() ? 1 : 0; ! stream << isRefueling; ! platform->SetRefueling(isRefueling != 0); ! } ! } return stream; *************** *** 204,219 **** static tcAirState tempAirState; ! stream >> inHangarCount; unsigned short nChildren = GetCount(); ! unsigned short nUpdate; stream >> nUpdate; - if (nUpdate == 0) - { - if (nChildren > 0) Clear(); - return stream; - } unsigned short updateIdx = 0; --- 206,216 ---- static tcAirState tempAirState; ! unsigned int updateTimestamp = tcTime::Get()->GetUpdated30HzCount(); unsigned short nChildren = GetCount(); ! unsigned char nUpdate; stream >> nUpdate; unsigned short updateIdx = 0; *************** *** 238,253 **** { *airState << stream; foundMatch = true; nUpdated++; } - else // assume this child has been deleted - { - //parent->RemoveChild(airState->obj); - //delete airState->obj; - //airState->obj = 0; - } childIdx++; } updateIdx++; } --- 235,251 ---- { *airState << stream; + airState->lastMultiplayerUpdate = updateTimestamp; + foundMatch = true; nUpdated++; } childIdx++; } + if (!foundMatch) + { + parent->SetRecreate(true); // request re-create + } + updateIdx++; } *************** *** 266,273 **** ** and delete children vs. re-creating all of the children. */ ! if ((nUpdated < nUpdate) || (nUpdated < nChildren)) ! { ! parent->SetRecreate(true); ! } /* --- 264,271 ---- ** and delete children vs. re-creating all of the children. */ ! //if ((nUpdated < nUpdate) || (nUpdated < nChildren)) ! //{ ! // parent->SetRecreate(true); ! //} /* *************** *** 291,314 **** /** * Saves state to update stream */ tcUpdateStream& tcFlightPort::operator>>(tcUpdateStream& stream) { ! stream << inHangarCount; ! ! unsigned short nChildren = GetCount(); ! ! stream << nChildren; ! for (unsigned short k=0; k<nChildren; k++) { ! tcAirState* airState = GetAirState(k); tcGameObject* obj = airState->obj; wxASSERT(obj); short int localId = (short int)obj->mnID; ! stream << localId; - *airState >> stream; - } return stream; --- 289,352 ---- /** * Saves state to update stream + * Do partial update if stream size limit is reached */ tcUpdateStream& tcFlightPort::operator>>(tcUpdateStream& stream) { ! long freeSpace = stream.GetMaxSize() - stream.size() - 1; // 1 byte for update count header ! // if freeSpace < 0, the message should be rejected anyway so don't worry about special case ! // for this ! ! tcUpdateStream tempStream1; ! tcUpdateStream tempStream2; ! ! unsigned short nChildren = GetCount(); ! if (nextUpdateIdx >= nChildren) nextUpdateIdx = 0; ! ! unsigned char nUpdates = 0; ! ! //stream << nChildren; ! ! while ((nextUpdateIdx < nChildren) && (freeSpace > 0)) { ! tempStream1.clear(); ! ! tcAirState* airState = GetAirState(nextUpdateIdx); tcGameObject* obj = airState->obj; wxASSERT(obj); short int localId = (short int)obj->mnID; ! tempStream1 << localId; ! ! *airState >> tempStream1; ! ! if ((long)tempStream1.size() <= freeSpace) ! { ! tempStream2 << tempStream1; ! freeSpace -= tempStream1.size(); ! nextUpdateIdx++; ! nUpdates++; ! } ! else ! { ! freeSpace = 0; ! } ! ! } ! ! stream << nUpdates; ! stream << tempStream2; ! ! if (nextUpdateIdx >= nChildren) ! { ! nextUpdateIdx = 0; ! stream.SetDoneFlag(true); ! } ! else ! { ! stream.SetDoneFlag(false); ! } ! return stream; *************** *** 441,444 **** --- 479,483 ---- airstate->goal_spot = airstate->current_spot; airstate->inTransit = false; + airstate->lastMultiplayerUpdate = tcTime::Get()->GetUpdated30HzCount(); units.push_back(airstate); // add to fport units vector *************** *** 555,558 **** --- 594,599 ---- missionManager = 0; } + + nextUpdateIdx = 0; } *************** *** 770,775 **** ! fprintf(stderr, "tcFlightPort::LaunchID - Bad air state\n"); ! wxASSERT(false); return 0; --- 811,816 ---- ! fprintf(stderr, "tcFlightPort::LaunchID - Bad air state (id:%d)\n", id); ! //wxASSERT(false); return 0; *************** *** 829,832 **** --- 870,917 ---- /** + * For multiplayer client + */ + void tcFlightPort::RemoveStaleUnits() + { + unsigned int t = tcTime::Get()->GetUpdated30HzCount(); + + + int minTimeLag = 999; + int maxTimeLag = 0; + + size_t nUnits = units.size(); + for (size_t n=0; n<nUnits; n++) + { + int lag = t - units[n]->lastMultiplayerUpdate; + if (lag < minTimeLag) minTimeLag = lag; + else if (lag > maxTimeLag) maxTimeLag = lag; + } + + // remove units with lastMultiplayerUpdate more than 3 seconds + // older than latest update + int lagThresh = minTimeLag + 90; + std::vector<tcAirState*> temp; + + for (size_t n=0; n<nUnits; n++) + { + int lag = t - units[n]->lastMultiplayerUpdate; + if (lag <= lagThresh) + { + temp.push_back(units[n]); + } + else + { + parent->RemoveChild(units[n]->obj); + delete(units[n]->obj); + delete units[n]; + } + } + + units = temp; + + ResyncSpots(); + } + + /** * @return pointer to tsSpotInfo for current location and spot. */ *************** *** 1007,1014 **** } for (size_t n=0; n<units.size(); n++) { tcAirState* airstate = units[n]; ! if (airstate->current_location == READY) { if ((airstate->current_spot >= 0) && ((unsigned)airstate->current_spot < ready_spots.size())) --- 1092,1105 ---- } + inHangarCount = 0; + for (size_t n=0; n<units.size(); n++) { tcAirState* airstate = units[n]; ! if (airstate->current_location == HANGAR) ! { ! inHangarCount++; ! } ! else if (airstate->current_location == READY) { if ((airstate->current_spot >= 0) && ((unsigned)airstate->current_spot < ready_spots.size())) *************** *** 1204,1211 **** --- 1295,1305 ---- if (parent->IsClientMode()) { + RemoveStaleUnits(); + size_t obj_count = units.size(); for(size_t n=0;n<obj_count;n++) { UpdateRelPos(units[n], t); + units[n]->inTransit = (units[n]->goal_location != units[n]->current_location); } return; *************** *** 1284,1288 **** parent(0), mpDBObject(0), ! missionManager(0) { --- 1378,1383 ---- parent(0), mpDBObject(0), ! missionManager(0), ! nextUpdateIdx(0) { Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** tcObjectControl.cpp 23 Nov 2006 00:07:33 -0000 1.54 --- tcObjectControl.cpp 27 Nov 2006 00:46:40 -0000 1.55 *************** *** 2,6 **** ** @file tcObjectControl.cpp */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@gc...) ** All rights reserved. --- 2,6 ---- ** @file tcObjectControl.cpp */ ! /* Copyright (C) 2003-2006 Dewitt Colclough (de...@gc...) ** All rights reserved. *************** *** 31,34 **** --- 31,35 ---- #include "ai/Brain.h" + #include "ai/Nav.h" #include "tcAeroAirObject.h" #include "ai/tcAIData.h" *************** *** 862,866 **** if (sub->IsSnorkeling()) { ! fuelText = fuelText.Format("FUEL: %.1f%% BATT: %.1f%% (Snorkeling)", fuelFraction * 100.0f, batteryFraction * 100.0f); } --- 863,867 ---- if (sub->IsSnorkeling()) { ! fuelText = fuelText.Format("FUEL: %.1f%% BATT: %.1f%% (Diesels active)", fuelFraction * 100.0f, batteryFraction * 100.0f); } *************** *** 1523,1526 **** --- 1524,1534 ---- plat->SetHeading(msHOI.mfMouseHeading_rad); msHOI.mbMouseOver = false; + ai::Brain* brain = plat->GetBrain(); + ai::Nav* nav = (brain != 0) ? brain->GetNavTask() : 0; + if (nav != 0) + { + nav->ClearWaypoints(); + nav->EndTask(); + } } } Index: tcSubObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSubObject.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcSubObject.cpp 20 Nov 2006 00:17:45 -0000 1.19 --- tcSubObject.cpp 27 Nov 2006 00:46:40 -0000 1.20 *************** *** 274,278 **** bool tcSubObject::IsSurfaced() const { ! return mcKin.mfAlt_m == 0; } --- 274,278 ---- bool tcSubObject::IsSurfaced() const { ! return mcKin.mfAlt_m >= 0; } *************** *** 356,360 **** else if (mcKin.mfAlt_m <= 0) // restrict speed near surface { ! float maxSpeed = (0.5f - 0.5f*invPeriscopeDepth*mcKin.mfAlt_m) * mpDBObject->mfMaxSpeed_kts; if (mcKin.mfSpeed_kts > maxSpeed) --- 356,360 ---- else if (mcKin.mfAlt_m <= 0) // restrict speed near surface { ! float maxSpeed = (0.75f - 0.25f*invPeriscopeDepth*mcKin.mfAlt_m) * mpDBObject->mfMaxSpeed_kts; if (mcKin.mfSpeed_kts > maxSpeed) *************** *** 366,369 **** --- 366,370 ---- { mcKin.mfAlt_m = 0; // subs can't fly + mcKin.mfClimbAngle_rad = 0; } } *************** *** 400,404 **** mcKin.mfPitch_rad = 0; mcKin.mfAlt_m += dalt_m; ! return; } --- 401,409 ---- mcKin.mfPitch_rad = 0; mcKin.mfAlt_m += dalt_m; ! ! if (dalt_m == 0) ! { ! return; ! } } *************** *** 442,445 **** --- 447,461 ---- mcKin.mfAlt_m += dz; } + + // automatically raise/lower radar mast and scope + bool isScopeDepth = IsAtPeriscopeDepth(); + SetRadarMastState(isScopeDepth); + SetPeriscopeState(isScopeDepth); + + if (IsSurfaced()) + { + SetSnorkelState(true); + } + } Index: tcFlightOpsObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightOpsObject.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcFlightOpsObject.cpp 20 Nov 2006 00:17:44 -0000 1.16 --- tcFlightOpsObject.cpp 27 Nov 2006 00:46:40 -0000 1.17 *************** *** 70,78 **** tcCreateStream& tcFlightOpsObject::operator<<(tcCreateStream& stream) { ! unsigned short nChildren; stream >> nChildren; - flight_deck.Clear(); - for (unsigned short k=0; k < nChildren; k++) { --- 70,76 ---- tcCreateStream& tcFlightOpsObject::operator<<(tcCreateStream& stream) { ! unsigned char nChildren; stream >> nChildren; for (unsigned short k=0; k < nChildren; k++) { *************** *** 94,110 **** stream >> pos; ! tcGameObject* child = AddChildToFlightDeck(databaseObj, unitName, teLocation(loc), pos); ! child->mnID = long(localId); // override default localId assigned by flightport // load launcher create from stream ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(child)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator<<(stream); ! } ! } } --- 92,124 ---- stream >> pos; ! int idx = flight_deck.GetAirStateIdx(localId); ! if (idx == -1) ! { ! tcGameObject* child = AddChildToFlightDeck(databaseObj, unitName, teLocation(loc), pos); ! child->mnID = long(localId); // override default localId assigned by flightport ! ! // initialize launchers to empty, since this info isn't updated for hangar aircraft ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(child)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->SetChildClass(""); ! } ! } ! ! } // load launcher create from stream ! //if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(child)) ! //{ ! // size_t nLaunchers = platform->GetLauncherCount(); ! // for (size_t n=0; n<nLaunchers; n++) ! // { ! // tcLauncher* launcher = platform->GetLauncher(n); ! // launcher->operator<<(stream); ! // } ! //} } *************** *** 114,157 **** /** * Saves state to create stream */ tcCreateStream& tcFlightOpsObject::operator>>(tcCreateStream& stream) { ! unsigned short nChildren = flight_deck.GetCount(); ! ! stream << nChildren; ! for (unsigned short k=0; k < nChildren; k++) { ! tcAirState* airState = flight_deck.GetAirState(k); tcGameObject* obj = airState->obj; wxASSERT(obj); ! ! stream << obj->mnDBKey; short int localId = short(obj->mnID); ! stream << localId; std::string unitName = obj->mzUnit.c_str(); ! stream << unitName; unsigned char loc = unsigned char(airState->current_location); ! stream << loc; unsigned char pos = unsigned char(airState->current_spot); // doesn't matter for HANGAR loc ! stream << pos; ! // add launcher create to stream ! if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! { ! size_t nLaunchers = platform->GetLauncherCount(); ! for (size_t n=0; n<nLaunchers; n++) ! { ! tcLauncher* launcher = platform->GetLauncher(n); ! launcher->operator>>(stream); ! } ! } } return stream; --- 128,207 ---- /** * Saves state to create stream + * Do partial save if stream size limit is reached */ tcCreateStream& tcFlightOpsObject::operator>>(tcCreateStream& stream) { ! long freeSpace = stream.GetMaxSize() - stream.size() - 1; // 1 byte for update count header ! wxASSERT(freeSpace > 0); ! tcCreateStream tempStream1; ! tcCreateStream tempStream2; ! ! wxASSERT(flight_deck.GetCount() < 256); ! unsigned char nChildren = flight_deck.GetCount(); ! if (nextUpdateIdx >= nChildren) nextUpdateIdx = 0; ! size_t nUpdates = 0; ! ! while ((nextUpdateIdx < nChildren) && (freeSpace > 0)) { ! tempStream1.clear(); ! ! tcAirState* airState = flight_deck.GetAirState(nextUpdateIdx); tcGameObject* obj = airState->obj; wxASSERT(obj); ! tempStream1 << obj->mnDBKey; short int localId = short(obj->mnID); ! tempStream1 << localId; std::string unitName = obj->mzUnit.c_str(); ! tempStream1 << unitName; unsigned char loc = unsigned char(airState->current_location); ! tempStream1 << loc; unsigned char pos = unsigned char(airState->current_spot); // doesn't matter for HANGAR loc ! tempStream1 << pos; ! if ((long)tempStream1.size() <= freeSpace) ! { ! tempStream2 << tempStream1; ! freeSpace -= tempStream1.size(); ! nextUpdateIdx++; ! nUpdates++; ! } ! else ! { ! freeSpace = 0; ! } ! ! // add launcher create to tempStream1 ! //if (tcPlatformObject* platform = dynamic_cast<tcPlatformObject*>(obj)) ! //{ ! // size_t nLaunchers = platform->GetLauncherCount(); ! // for (size_t n=0; n<nLaunchers; n++) ! // { ! // tcLauncher* launcher = platform->GetLauncher(n); ! // launcher->operator>>(tempStream1); ! // } ! //} } + unsigned char nUpdatesChar = (unsigned char)nUpdates; + stream << nUpdatesChar; + + stream << tempStream2; + + if (nextUpdateIdx >= nChildren) + { + nextUpdateIdx = 0; + stream.SetDoneFlag(true); + } + else + { + stream.SetDoneFlag(false); + } + return stream; *************** *** 184,187 **** --- 234,242 ---- } + size_t tcFlightOpsObject::CurrentAirComplementSize() const + { + return flight_deck.GetCount(); + } + bool tcFlightOpsObject::HasNewCommand() const { *************** *** 475,479 **** */ tcFlightOpsObject::tcFlightOpsObject(tcFlightportDBObject* dbObject, tcGameObject* gameObject) ! : gameObj(gameObject) { wxASSERT(gameObj); --- 530,535 ---- */ tcFlightOpsObject::tcFlightOpsObject(tcFlightportDBObject* dbObject, tcGameObject* gameObject) ! : gameObj(gameObject), ! nextUpdateIdx(0) { wxASSERT(gameObj); Index: tcSonar.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSonar.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcSonar.cpp 20 Nov 2006 00:17:45 -0000 1.18 --- tcSonar.cpp 27 Nov 2006 00:46:40 -0000 1.19 *************** *** 24,27 **** --- 24,28 ---- #include "tcSonar.h" #include "tcGameObject.h" + #include "tcHeloObject.h" #include "tcSurfaceObject.h" #include "tcSubObject.h" *************** *** 71,74 **** --- 72,78 ---- float fCoverageAz1, fCoverageAz2; bool isInSearchVolume = false; + last_snr_excess = -99.9f; + range_km = 0; + emitterId = -1; wxASSERT(mpDBObj); *************** *** 132,136 **** if (!isInSearchVolume) { - range_km = 0; return false; } --- 136,139 ---- *************** *** 142,148 **** mpDBObj->alpha * range_km; // one-way transmission loss referenced to 1 m // crude thermocline ! bool parentAbove = par_kin->mfAlt_m >= -80.0; ! bool targetAbove = tgt_kin->mfAlt_m >= -80.0; if (parentAbove != targetAbove) TL += 10.0f; // add 10 dB loss --- 145,180 ---- mpDBObj->alpha * range_km; // one-way transmission loss referenced to 1 m + + float sonarAlt_m = par_kin->mfAlt_m; + float targetAlt_m = tgt_kin->mfAlt_m; + + // if parent or target airborne, assume helo dipping sonar and subtract scope_m from alt + if (sonarAlt_m > 0) + { + sonarAlt_m -= scope_m; + if (sonarAlt_m > 0) return false; // sonar out of water + } + + if (targetAlt_m > 0) + { + const tcHeloObject* helo = dynamic_cast<const tcHeloObject*>(target); + if (helo != 0) + { + targetAlt_m = helo->GetDippingSonarAlt(); + if (targetAlt_m > 0) return false; // sonar out of water + + const tcSonar* sonar = helo->GetStrongestActiveSonar(); + emitterId = sonar->mpDBObj->mnKey; + } + else + { + wxASSERT(false); // non-helo dipping sonar? + return false; + } + } + // crude thermocline ! bool parentAbove = sonarAlt_m >= -80.0; ! bool targetAbove = targetAlt_m >= -80.0; if (parentAbove != targetAbove) TL += 10.0f; // add 10 dB loss *************** *** 255,258 **** --- 287,295 ---- } + float tcSonar::GetScope() const + { + return scope_m; + } + /** * @return true if torpedo is running in passive mode *************** *** 519,522 **** --- 556,572 ---- + // update emitter info if applicable + if (emitterId != -1) + { + tsEmitterInfo *pEmitterInfo; + if (pSMTrack->UpdateEmitter(pEmitterInfo, emitterId)) + { + pEmitterInfo->mfTimestamp = t; + pEmitterInfo->mnMode = 0; // ?? probably unimplemented param + } + } + + + if (bNewDetection) { *************** *** 548,551 **** --- 598,607 ---- { bool isEligible = (target->mpDBObject->mnType & (PTYPE_SUBSURFACE | PTYPE_SURFACE)) != 0; + + // if this sonar is passive, allow detection of helo dipping sonar + bool possibleDippingSonar = isPassive && (target->mpDBObject->mnType == PTYPE_HELO) && + (target->mcKin.mfAlt_m < 500.0f); + isEligible = isEligible || possibleDippingSonar; + float range_km = 0; bool bDetected = *************** *** 660,664 **** /** ! * If this is a towed array, update the array scope based on state and platform speed */ void tcSonar::UpdateScope(double t) --- 716,720 ---- /** ! * If this is a towed array or dipping sonar, update the array scope based on state and platform speed */ void tcSonar::UpdateScope(double t) *************** *** 710,714 **** isPassive(false), last_az_rad(0), ! depth_m(0) { mnMode = SSMODE_SURVEILLANCE; --- 766,772 ---- isPassive(false), last_az_rad(0), ! depth_m(0), ! scope_m(0), ! emitterId(-1) { mnMode = SSMODE_SURVEILLANCE; *************** *** 721,725 **** isPassive(dbObj->isPassive), last_az_rad(0), ! depth_m(0) { wxASSERT(dbObj); --- 779,785 ---- isPassive(dbObj->isPassive), last_az_rad(0), ! depth_m(0), ! scope_m(0), ! emitterId(-1) { wxASSERT(dbObj); Index: tcCarrierObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcCarrierObject.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcCarrierObject.cpp 20 Nov 2006 00:17:44 -0000 1.16 --- tcCarrierObject.cpp 27 Nov 2006 00:46:40 -0000 1.17 *************** *** 254,257 **** --- 254,260 ---- { mpDBObject = obj; + mnModelType = MTYPE_CARRIER; + + brain->AddTask("RefuelAllAircraft", 3.0, ai::Task::PERMANENT | ai::Task::HIDDEN); } |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:42
|
Update of /cvsroot/gcblue/gcb_wx/src/network In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/network Modified Files: tcMessage.cpp tcMultiplayerInterface.cpp tcUpdateMessageHandler.cpp Log Message: Index: tcUpdateMessageHandler.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcUpdateMessageHandler.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcUpdateMessageHandler.cpp 23 Mar 2006 01:11:02 -0000 1.19 --- tcUpdateMessageHandler.cpp 27 Nov 2006 00:46:39 -0000 1.20 *************** *** 30,33 **** --- 30,34 ---- #include "network/tcUpdateMessageHandler.h" #include "network/tcMultiplayerInterface.h" + #include "network/tcMessage.h" #include "tcSimState.h" #include "wxcommands.h" *************** *** 113,127 **** /** * Saves data to create obj to stream. */ ! void tcUpdateMessageHandler::AddCreate(tcGameObject* obj, tcCreateStream& stream) { ! stream << obj->mnID; ! stream << obj->mnDBKey; ! *obj >> stream; ! tcCommandStream& commandStream = stream.AsCommandStream(); ! commandStream.SetDetailLevel(tcStream::WRITE_ALL); ! *obj >> commandStream; } --- 114,147 ---- /** * Saves data to create obj to stream. + * + * @return true if create was added, false if a size limit was hit and needs to be added again */ ! bool tcUpdateMessageHandler::AddCreate(tcGameObject* obj, tcCreateStream& stream) { ! long freeSpace = (long)stream.GetMaxSize() - (long)stream.size(); ! if (freeSpace < 1) return false; ! // temporary stream for command data ! tcCommandStream tempCommand; ! tempCommand.SetDetailLevel(tcStream::WRITE_ALL); ! *obj >> tempCommand; ! freeSpace -= (long)tempCommand.size(); ! if (freeSpace < 1) return false; ! ! // temporary create stream ! tcCreateStream temp; ! temp.SetMaxSize(size_t(freeSpace)); ! temp.SetDoneFlag(true); ! ! temp << obj->mnID; ! temp << obj->mnDBKey; ! *obj >> temp; + if (temp.size() > temp.GetMaxSize()) return false; // too big, don't add + + stream << temp; + stream << tempCommand; + + return temp.GetDoneFlag(); } *************** *** 196,204 **** * Saves update data for obj to stream. Obj must be * created first for this data to be applied. * @see tcUpdateMessageHandler::AddCreate */ ! void tcUpdateMessageHandler::AddUpdate(tcGameObject* obj, tcUpdateStream& stream) { ! stream << obj->mnID; // write id /** --- 216,227 ---- * Saves update data for obj to stream. Obj must be * created first for this data to be applied. + * @return true if update was added, false if a size limit was hit and needs to be added again + * * @see tcUpdateMessageHandler::AddCreate */ ! bool tcUpdateMessageHandler::AddUpdate(tcGameObject* obj, tcUpdateStream& stream) { ! long freeSpace = (long)stream.GetMaxSize() - (long)stream.size() - sizeof(long) - sizeof(unsigned int); ! if (freeSpace < 1) return false; /** *************** *** 211,217 **** --- 234,246 ---- */ tcUpdateStream temp; + temp.SetMaxSize(size_t(freeSpace)); + temp.SetDoneFlag(true); *obj >> temp; + if (temp.size() > temp.GetMaxSize()) return false; // too big, don't add + + stream << obj->mnID; // write id + unsigned int updateSize = temp.size(); *************** *** 219,222 **** --- 248,253 ---- stream << temp; + + return temp.GetDoneFlag(); } *************** *** 257,264 **** break; default: ! fprintf(stderr, "tcUpdateMessageHandler::InitializeMessage - bad message type\n"); break; } } --- 288,299 ---- break; default: ! fprintf(stderr, "tcUpdateMessageHandler::InitializeMessage - bad message type (%d)\n", ! messageType); break; } + size_t maxSize = tcMessage::MESSAGE_SIZE - stream.size(); + stream.SetMaxSize(maxSize); + } Index: tcMessage.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMessage.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcMessage.cpp 23 Mar 2006 01:11:02 -0000 1.12 --- tcMessage.cpp 27 Nov 2006 00:46:39 -0000 1.13 *************** *** 121,126 **** if (messageSize > tcMessage::MESSAGE_SIZE) { ! std::cerr << "Error - Attempted to send oversized message, truncating." << std::endl; ! wxMessageBox("Error - Attempted to send oversized message, truncating."); messageSize = tcMessage::MESSAGE_SIZE; } --- 121,129 ---- if (messageSize > tcMessage::MESSAGE_SIZE) { ! wxString text; ! text.Printf("Error - Attempted to send oversized message (%d/%d), truncating.\n", ! messageSize, tcMessage::MESSAGE_SIZE); ! fprintf(stderr, text.c_str()); ! wxMessageBox(text); messageSize = tcMessage::MESSAGE_SIZE; } Index: tcMultiplayerInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMultiplayerInterface.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcMultiplayerInterface.cpp 24 Oct 2006 01:34:05 -0000 1.36 --- tcMultiplayerInterface.cpp 27 Nov 2006 00:46:39 -0000 1.37 *************** *** 1804,1808 **** --- 1804,1837 ---- } + unsigned int tcMultiplayerInterface::GetUpdatePeriod(const tcGameObject* obj, const std::string& playerName) const + { + bool playerControlled = obj->IsControlledBy(playerName); + const tcFlightOpsObject* flightOps = dynamic_cast<const tcFlightOpsObject*>(obj); + bool largeFlightOps = (flightOps == 0) ? false : (flightOps->CurrentAirComplementSize() > 8); + + if (!playerControlled) + { + if (!largeFlightOps) + { + return 90; + } + else + { + return 90; + } + } + else + { + if (!largeFlightOps) + { + return 25; + } + else + { + return 50; + } + } + } /** *************** *** 1841,1857 **** { unsigned int dt = t - lastUpdate; ! bool doUpdate = (dt >= 90) || ! ((dt >= 25) && (obj->IsControlledBy(playerName))); if (doUpdate) { ! tcUpdateMessageHandler::AddUpdate(obj, updateStream); pstatus.SetUpdate(obj->mnID, t); - updateCount++; } // create new message if updateCount gets too large ! if ((updateCount >= 4) || (updateStream.size() > maxMessageSize - 512)) { SendUpdateMessage(connId, updateStream); --- 1870,1922 ---- { unsigned int dt = t - lastUpdate; ! ! bool doUpdate = (dt >= GetUpdatePeriod(obj, playerName)); ! if (doUpdate) { ! bool updateAdded = tcUpdateMessageHandler::AddUpdate(obj, updateStream); ! ! if (updateAdded) ! { ! updateCount++; ! } ! else ! { ! bool updating = true; ! unsigned messageCount = 0; ! while (updating && (messageCount < 8)) ! { ! SendUpdateMessage(connId, updateStream); ! #ifdef _DEBUG ! fprintf(stdout, "Sent obj state update, time: %d\n", t); ! #endif ! updateStream.clear(); ! tcUpdateMessageHandler::InitializeMessage(tcUpdateMessageHandler::UPDATE, ! updateStream); ! ! updating = !tcUpdateMessageHandler::AddUpdate(obj, updateStream); ! messageCount++; ! } ! ! if (messageCount >= 8) ! { ! fprintf(stderr, "tcMultiplayerInterface::UpdateNewAndExistingEntities - " ! "exceeded partial update msg limit (%s)\n", obj->mzUnit.c_str()); ! } ! else ! { ! #ifdef _DEBUG ! fprintf(stdout, " partial update msg count: %d\n", messageCount); ! #endif ! } ! updateCount = 1; ! } pstatus.SetUpdate(obj->mnID, t); } // create new message if updateCount gets too large ! if (updateCount >= 6) { SendUpdateMessage(connId, updateStream); *************** *** 1867,1879 **** else { ! tcUpdateMessageHandler::AddCreate(obj, createStream); // set time to force update at next opportunity pstatus.SetUpdate(obj->mnID, (unsigned int)(t-90)); ! createCount++; #ifdef _DEBUG fprintf(stdout, "C%d ", obj->mnID); #endif ! if ((createCount >= 8) || (createStream.size() > maxMessageSize - 1024)) { SendUpdateMessage(connId, createStream); --- 1932,1982 ---- else { ! bool createAdded = tcUpdateMessageHandler::AddCreate(obj, createStream); ! ! if (createAdded) ! { ! createCount++; ! } ! else ! { ! bool updating = true; ! unsigned messageCount = 0; ! while (updating && (messageCount < 8)) ! { ! SendUpdateMessage(connId, createStream); ! #ifdef _DEBUG ! fprintf(stdout, "Sent obj create msg, time: %d\n", t); ! #endif ! createStream.clear(); ! tcUpdateMessageHandler::InitializeMessage(tcUpdateMessageHandler::CREATE, ! createStream); ! ! updating = !tcUpdateMessageHandler::AddCreate(obj, createStream); ! messageCount++; ! } ! ! if (messageCount >= 8) ! { ! fprintf(stderr, "tcMultiplayerInterface::UpdateNewAndExistingEntities - " ! "exceeded partial create msg limit (%s)\n", obj->mzUnit.c_str()); ! } ! else ! { ! #ifdef _DEBUG ! fprintf(stdout, " partial create msg count: %d\n", messageCount); ! #endif ! } ! ! createCount = 1; ! } ! // set time to force update at next opportunity pstatus.SetUpdate(obj->mnID, (unsigned int)(t-90)); ! #ifdef _DEBUG fprintf(stdout, "C%d ", obj->mnID); #endif ! if (createCount >= 8) { SendUpdateMessage(connId, createStream); |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:42
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/scriptinterface Modified Files: tcSubInterface.cpp Log Message: Index: tcSubInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcSubInterface.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcSubInterface.cpp 18 Jun 2006 00:45:01 -0000 1.8 --- tcSubInterface.cpp 27 Nov 2006 00:46:40 -0000 1.9 *************** *** 221,230 **** if (state) { ! s = wxString::Format("%s (%s): started snorkeling\n", subObj->mzUnit.c_str(), subObj->mzClass.c_str()); } else { ! s = wxString::Format("%s (%s): stopped snorkeling\n", subObj->mzUnit.c_str(), subObj->mzClass.c_str()); } --- 221,230 ---- if (state) { ! s = wxString::Format("%s (%s): started diesels\n", subObj->mzUnit.c_str(), subObj->mzClass.c_str()); } else { ! s = wxString::Format("%s (%s): stopped diesels\n", subObj->mzUnit.c_str(), subObj->mzClass.c_str()); } |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:41
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/graphics Modified Files: tcControl.cpp tcGraphicsInfo.cpp tcStoresGui.cpp Log Message: Index: tcStoresGui.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcStoresGui.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcStoresGui.cpp 20 Nov 2006 00:17:42 -0000 1.10 --- tcStoresGui.cpp 27 Nov 2006 00:46:39 -0000 1.11 *************** *** 104,108 **** wxString captionText = wxString::Format("%s: %s", unitName, storesDisplayName.c_str()); DrawTextR(captionText.c_str(), 10.0f, 20.0f, defaultFont.get(), ! captionColor, 18.0f, LEFT_BASE_LINE, 100.0f + guiWidth - 20.0f); --- 104,108 ---- wxString captionText = wxString::Format("%s: %s", unitName, storesDisplayName.c_str()); DrawTextR(captionText.c_str(), 10.0f, 20.0f, defaultFont.get(), ! captionColor, 18.0f, LEFT_BASE_LINE, guiWidth - 20.0f); *************** *** 459,463 **** hostId(host), storesIdx(idx), ! slotsPerPage(10), nPages(1), currentPage(0), --- 459,463 ---- hostId(host), storesIdx(idx), ! slotsPerPage(8), nPages(1), currentPage(0), Index: tcControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcControl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcControl.cpp 23 Mar 2006 01:11:02 -0000 1.2 --- tcControl.cpp 27 Nov 2006 00:46:39 -0000 1.3 *************** *** 65,69 **** void tcControl::SetGameObject(tcGameObject* gameObj) { - wxASSERT(gameObj); obj = gameObj; } --- 65,68 ---- Index: tcGraphicsInfo.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcGraphicsInfo.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcGraphicsInfo.cpp 24 Sep 2006 19:50:20 -0000 1.1 --- tcGraphicsInfo.cpp 27 Nov 2006 00:46:39 -0000 1.2 *************** *** 266,275 **** if (!Is3DCapable()) { ! std::string text = "GCB requires OpenGL-compatible 3D hardware acceleration." " ("; text += GetDriverInfo(); text += ")\n"; ! throw(text); } if (!Is3DAlphaCapable()) { --- 266,278 ---- if (!Is3DCapable()) { ! std::string text = "Could not find OpenGL-compatible 3D hardware acceleration. Please post on gcblue.com/forum. Using _s l o w_ software rendering." " ("; text += GetDriverInfo(); text += ")\n"; ! ! wxMessageBox(text.c_str(), "Warning",wxICON_WARNING); ! //throw(text); } + if (!Is3DAlphaCapable()) { |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:41
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/common Modified Files: tcStream.cpp Log Message: Index: tcStream.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcStream.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcStream.cpp 23 Mar 2006 01:11:01 -0000 1.14 --- tcStream.cpp 27 Nov 2006 00:46:39 -0000 1.15 *************** *** 1,6 **** ! /* ** @file tcStream.cpp ! ** ! ** Copyright (C) 2004 Dewitt Colclough (de...@gc...) ** All rights reserved. --- 1,6 ---- ! /** ** @file tcStream.cpp ! */ ! /* Copyright (C) 2004-2006 Dewitt Colclough (de...@gc...) ** All rights reserved. *************** *** 28,32 **** */ tcStream::tcStream(const char* data, std::streamsize count) ! : detailLevel(0) { std::stringstream::write(data, count); --- 28,34 ---- */ tcStream::tcStream(const char* data, std::streamsize count) ! : detailLevel(0), ! maxSize(99999), ! doneFlag(false) { std::stringstream::write(data, count); *************** *** 37,41 **** */ tcStream::tcStream(const tcStream& stream) ! : std::stringstream(stream.str()) { } --- 39,45 ---- */ tcStream::tcStream(const tcStream& stream) ! : std::stringstream(stream.str()), ! maxSize(stream.maxSize), ! doneFlag(stream.doneFlag) { } *************** *** 46,49 **** --- 50,55 ---- tcStream::tcStream() : detailLevel(0), + maxSize(99999), + doneFlag(false), metaString("") { *************** *** 119,122 **** --- 125,150 ---- } + + bool tcStream::GetDoneFlag() const + { + return doneFlag; + } + + void tcStream::SetDoneFlag(bool state) + { + doneFlag = state; + } + + + size_t tcStream::GetMaxSize() const + { + return maxSize; + } + + void tcStream::SetMaxSize(size_t n) + { + maxSize = n; + } + const std::string& tcStream::GetMetaString() const { |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:41
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/database Modified Files: tcAirDBObject.cpp Log Message: Index: tcAirDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcAirDBObject.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcAirDBObject.cpp 20 Nov 2006 00:17:40 -0000 1.17 --- tcAirDBObject.cpp 27 Nov 2006 00:46:39 -0000 1.18 *************** *** 51,54 **** --- 51,63 ---- } + /** + * Calculate private parameters. Should be called after + * object is loaded. + */ + void tcAirDBObject::CalculateParams() + { + tcWaterDetectionDBObject::CalculateParams(mfMaxSpeed_kts); + } + float tcAirDBObject::GetFuelConsumptionConstant(float speed_kts) const *************** *** 91,94 **** --- 100,104 ---- tcAirDetectionDBObject::AddSqlColumns(columnString); + tcWaterDetectionDBObject::AddSqlColumns(columnString); columnString += ","; *************** *** 106,109 **** --- 116,120 ---- tcAirDetectionDBObject::ReadSql(entry); + tcWaterDetectionDBObject::ReadSql(entry); maxTakeoffWeight_kg = entry.GetDouble("MaxTakeoffWeight_kg"); *************** *** 112,115 **** --- 123,128 ---- gmax = entry.GetDouble("Gmax"); isCarrierCompatible = entry.GetInt("IsCarrierCompatible") != 0; + + CalculateParams(); } *************** *** 119,122 **** --- 132,136 ---- tcAirDetectionDBObject::WriteSql(valueString); + tcWaterDetectionDBObject::WriteSql(valueString); std::stringstream s; *************** *** 137,140 **** --- 151,155 ---- tcPlatformDBObject(), tcAirDetectionDBObject(), + tcWaterDetectionDBObject(), maxTakeoffWeight_kg(0), maxAltitude_m(0), *************** *** 149,152 **** --- 164,168 ---- : tcPlatformDBObject(obj), tcAirDetectionDBObject(obj), + tcWaterDetectionDBObject(obj), maxTakeoffWeight_kg(obj.maxTakeoffWeight_kg), maxAltitude_m(obj.maxAltitude_m), |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:41
|
Update of /cvsroot/gcblue/gcb_wx/src/ai In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3929/src/ai Modified Files: Brain.cpp Log Message: Index: Brain.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/ai/Brain.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Brain.cpp 24 Oct 2006 01:34:01 -0000 1.14 --- Brain.cpp 27 Nov 2006 00:46:39 -0000 1.15 *************** *** 65,68 **** --- 65,71 ---- if (platform->IsClientMode()) { + long targetId; + stream >> targetId; + unsigned char nTasks; stream >> nTasks; *************** *** 281,284 **** --- 284,289 ---- { target = target_; + + hasNewCommand = true; } |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:29
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3865/include/database Modified Files: tcAirDBObject.h Log Message: Index: tcAirDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcAirDBObject.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcAirDBObject.h 20 Nov 2006 00:16:25 -0000 1.15 --- tcAirDBObject.h 27 Nov 2006 00:46:24 -0000 1.16 *************** *** 30,34 **** #include "tcPlatformDBObject.h" #include "tcAirDetectionDBObject.h" ! namespace database --- 30,34 ---- #include "tcPlatformDBObject.h" #include "tcAirDetectionDBObject.h" ! #include "tcWaterDetectionDBObject.h" namespace database *************** *** 38,44 **** /** * Models a simple air platform (fixed wing or helo). Specialization of ! * old tcGenericDBObject */ ! class tcAirDBObject : public tcPlatformDBObject, public tcAirDetectionDBObject { public: --- 38,46 ---- /** * Models a simple air platform (fixed wing or helo). Specialization of ! * old tcGenericDBObject. ! * ! * Added tcWaterDetectionDBObject parent to support dipping sonar */ ! class tcAirDBObject : public tcPlatformDBObject, public tcAirDetectionDBObject, public tcWaterDetectionDBObject { public: *************** *** 66,70 **** virtual ~tcAirDBObject(); private: ! }; --- 68,72 ---- virtual ~tcAirDBObject(); private: ! void CalculateParams(); }; |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:29
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3865/include/sim Modified Files: tcFlightOpsObject.h tcFlightPort.h tcHeloObject.h tcSonar.h Log Message: Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcFlightPort.h 24 Oct 2006 01:34:01 -0000 1.17 --- tcFlightPort.h 27 Nov 2006 00:46:24 -0000 1.18 *************** *** 82,86 **** double ready_time; // time for op to be completed tcGameObject *obj; ! tcUpdateStream& operator<<(tcUpdateStream& stream); tcUpdateStream& operator>>(tcUpdateStream& stream); --- 82,87 ---- double ready_time; // time for op to be completed tcGameObject *obj; ! ! unsigned int lastMultiplayerUpdate; // for multiplayer client tcUpdateStream& operator<<(tcUpdateStream& stream); tcUpdateStream& operator>>(tcUpdateStream& stream); *************** *** 188,191 **** --- 189,194 ---- std::vector<CommandInfo> commandList; ai::tcMissionManager* missionManager; + size_t nextUpdateIdx; ///< to track partial updates on multiplayer server + teLocation GetNextStop(teLocation current, teLocation destination); *************** *** 193,196 **** --- 196,200 ---- bool IsSpotEmpty(teLocation loc, unsigned int spot); void ResyncSpots(); + void RemoveStaleUnits(); }; Index: tcFlightOpsObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightOpsObject.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcFlightOpsObject.h 27 Mar 2006 01:08:30 -0000 1.10 --- tcFlightOpsObject.h 27 Nov 2006 00:46:24 -0000 1.11 *************** *** 71,74 **** --- 71,75 ---- virtual void Clear(); tcFlightPort* GetFlightPort(); + size_t CurrentAirComplementSize() const; tcTrack GetLandingData(); void PrintToFile(tcFile& file); *************** *** 100,103 **** --- 101,106 ---- tcGameObject* gameObj; ///< to avoid (some) virtual inheritance inefficiency + size_t nextUpdateIdx; ///< to track partial updates on multiplayer server + tcFlightOpsObject(); }; Index: tcHeloObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcHeloObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcHeloObject.h 20 Nov 2006 00:16:29 -0000 1.5 --- tcHeloObject.h 27 Nov 2006 00:46:24 -0000 1.6 *************** *** 45,48 **** --- 45,51 ---- virtual void Update(double afStatusTime); + float GetDippingSonarAlt() const; + virtual float GetSonarSourceLevel() const; + void PrintToFile(tcFile& file); void SaveToFile(tcFile& file); Index: tcSonar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonar.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcSonar.h 22 Mar 2006 01:23:29 -0000 1.7 --- tcSonar.h 27 Nov 2006 00:46:24 -0000 1.8 *************** *** 60,63 **** --- 60,64 ---- void Serialize(tcFile& file, bool mbLoad); + float GetScope() const; bool IsPassive() const; ///< Warning: don't confuse with !tcSensorState::IsActive() virtual bool IsRadar() const; *************** *** 92,95 **** --- 93,97 ---- float last_range_km; ///< [km] target range from last call to CanDetectTarget float last_snr_excess; ///< [dB] snr excess from last call to CanDetectTarget + long emitterId; ///< if active sonar has been detected, database id of active sonar, -1 otherwise }; |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:29
|
Update of /cvsroot/gcblue/gcb_wx/include/network In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3865/include/network Modified Files: tcMultiplayerInterface.h tcUpdateMessageHandler.h Log Message: Index: tcUpdateMessageHandler.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcUpdateMessageHandler.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcUpdateMessageHandler.h 22 Mar 2006 01:23:29 -0000 1.12 --- tcUpdateMessageHandler.h 27 Nov 2006 00:46:24 -0000 1.13 *************** *** 72,76 **** static void AddControlRelease(long id, tcStream& stream); static void AddControlRequest(long id, tcStream& stream); ! static void AddCreate(tcGameObject* obj, tcCreateStream& stream); static void AddCreateRequest(long id, tcStream& stream); static void AddDestroy(long id, tcStream& stream); --- 72,76 ---- static void AddControlRelease(long id, tcStream& stream); static void AddControlRequest(long id, tcStream& stream); ! static bool AddCreate(tcGameObject* obj, tcCreateStream& stream); static void AddCreateRequest(long id, tcStream& stream); static void AddDestroy(long id, tcStream& stream); *************** *** 79,83 **** static void AddSensorUpdateHeader(long alliance, tcStream& stream); static void AddSoundEffect(long id, const std::string& effect, tcStream& stream); ! static void AddUpdate(tcGameObject* obj, tcUpdateStream& stream); --- 79,83 ---- static void AddSensorUpdateHeader(long alliance, tcStream& stream); static void AddSoundEffect(long id, const std::string& effect, tcStream& stream); ! static bool AddUpdate(tcGameObject* obj, tcUpdateStream& stream); Index: tcMultiplayerInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMultiplayerInterface.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** tcMultiplayerInterface.h 24 Oct 2006 01:33:58 -0000 1.30 --- tcMultiplayerInterface.h 27 Nov 2006 00:46:24 -0000 1.31 *************** *** 42,45 **** --- 42,46 ---- class tcStream; class tcConsoleBox; + class tcGameObject; /** *************** *** 194,197 **** --- 195,199 ---- void DistributeChatText(); int GetPlayerConnectionId(const std::string& playerName); + unsigned int GetUpdatePeriod(const tcGameObject* obj, const std::string& playerName) const; bool IsNewPlayer(int id); |
From: Dewitt C. <ddc...@us...> - 2006-11-27 00:46:29
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3865/include/common Modified Files: tcStream.h Log Message: Index: tcStream.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcStream.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcStream.h 22 Mar 2006 01:23:28 -0000 1.12 --- tcStream.h 27 Nov 2006 00:46:24 -0000 1.13 *************** *** 52,55 **** --- 52,61 ---- void SetMetaString(const std::string& s); + size_t GetMaxSize() const; + void SetMaxSize(size_t n); + + bool GetDoneFlag() const; + void SetDoneFlag(bool state); + /// write operators tcStream& operator<<(int& val); *************** *** 88,91 **** --- 94,99 ---- int detailLevel; std::string metaString; ///< additional data + size_t maxSize; + bool doneFlag; }; |
From: Dewitt C. <ddc...@us...> - 2006-11-25 19:26:39
|
Update of /cvsroot/gcblue/gcb_wx/database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16191/database Modified Files: database.db Log Message: Index: database.db =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/database/database.db,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 Binary files /tmp/cvs499KJd and /tmp/cvsZXAJ0t differ |
From: Dewitt C. <ddc...@us...> - 2006-11-25 19:26:39
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16191/include/graphics Modified Files: tc3DViewer.h Log Message: Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DViewer.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tc3DViewer.h 20 Nov 2006 00:16:28 -0000 1.18 --- tc3DViewer.h 25 Nov 2006 19:26:35 -0000 1.19 *************** *** 36,40 **** #include <osgText/Text> #include <osgParticle/ParticleSystemUpdater> ! #include <osgEphemeris/EphemerisModel> #include "cspDate.h" --- 36,40 ---- #include <osgText/Text> #include <osgParticle/ParticleSystemUpdater> ! //#include <osgEphemeris/EphemerisModel> #include "cspDate.h" *************** *** 98,102 **** osg::ref_ptr<osg::Group> skyLights; osg::ref_ptr<osg::Group> waterLights; ! osg::ref_ptr<osgEphemeris::EphemerisModel> sky2; // these methods are copied from tcWindow --- 98,102 ---- osg::ref_ptr<osg::Group> skyLights; osg::ref_ptr<osg::Group> waterLights; ! // osg::ref_ptr<osgEphemeris::EphemerisModel> sky2; // these methods are copied from tcWindow |
From: Dewitt C. <ddc...@us...> - 2006-11-25 19:26:36
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16191 Modified Files: GCblue.vcproj Log Message: Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** GCblue.vcproj 20 Nov 2006 00:21:01 -0000 1.108 --- GCblue.vcproj 25 Nov 2006 19:26:34 -0000 1.109 *************** *** 71,75 **** Name="VCLinkerTool" IgnoreImportLibrary="false" ! AdditionalDependencies="python24.lib boost_python_debug.lib winmm.lib opengl32.lib glu32.lib GLaux.lib comctl32.lib rpcrt4.lib wsock32.lib wxmswd.lib zlibd.lib pngd.lib jpegd.lib tiffd.lib osgd.lib osgDBd.lib osgParticled.lib osgTextd.lib osgUtild.lib osgEphemerisd.lib DemeterDebug.lib DemeterOSGDebug.lib sqlited.lib ogg_static_d.lib vorbis_static_d.lib vorbisfile_static_d.lib OpenAL32.lib ALut.lib oalpp_gcbd.lib" ShowProgress="0" OutputFile="$(ProjectDir)/bin/GCblueD.exe" --- 71,75 ---- Name="VCLinkerTool" IgnoreImportLibrary="false" ! AdditionalDependencies="python24.lib boost_python_debug.lib winmm.lib opengl32.lib glu32.lib GLaux.lib comctl32.lib rpcrt4.lib wsock32.lib wxmswd.lib zlibd.lib pngd.lib jpegd.lib tiffd.lib osgd.lib osgDBd.lib osgParticled.lib osgTextd.lib osgUtild.lib DemeterDebug.lib DemeterOSGDebug.lib sqlited.lib ogg_static_d.lib vorbis_static_d.lib vorbisfile_static_d.lib OpenAL32.lib ALut.lib oalpp_gcbd.lib" ShowProgress="0" OutputFile="$(ProjectDir)/bin/GCblueD.exe" *************** *** 1549,1557 **** > <File ! RelativePath=".\res\resource.h" > </File> <File ! RelativePath=".\resource.h" > </File> --- 1549,1557 ---- > <File ! RelativePath=".\resource.h" > </File> <File ! RelativePath=".\res\resource.h" > </File> |
From: Dewitt C. <ddc...@us...> - 2006-11-23 00:08:17
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23008/scripts Modified Files: AirMissions.py Landing.py Log Message: Index: AirMissions.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/AirMissions.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AirMissions.py 24 Oct 2006 01:34:37 -0000 1.1 --- AirMissions.py 23 Nov 2006 00:08:15 -0000 1.2 *************** *** 32,39 **** # if low on fuel or out of ammo, rtb ! if ((UI.GetFuel() < 0.1) or (not UI.IsEquippedForTargetType(0x0020))): UI.DeleteTask('EngageAll') TI.EndTask() ! AddRTBtask(UI, '', 0.1, 0) return --- 32,39 ---- # if low on fuel or out of ammo, rtb ! if ((UI.GetFuel() < 0.55) or (not UI.IsEquippedForTargetType(0x0020))): UI.DeleteTask('EngageAll') TI.EndTask() ! AddRTBtask(UI, '', 0.55, 0) return *************** *** 55,59 **** intercept_target = 1 UI.SetHeading(closest_bearing) # lag intercept ! if (UI.GetFuel() > 0.5): UI.SetThrottle(1.1) else: --- 55,59 ---- intercept_target = 1 UI.SetHeading(closest_bearing) # lag intercept ! if (UI.GetFuel() > 0.7): UI.SetThrottle(1.1) else: *************** *** 67,72 **** if (UI.IsAir()): ! if (UI.GetAlt() < 6000): ! UI.SetThrottle(1.1) UI.SetAlt(6000) else: --- 67,72 ---- if (UI.IsAir()): ! if (UI.GetAlt() < 5500): ! UI.SetThrottle(1.0) UI.SetAlt(6000) else: Index: Landing.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/Landing.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Landing.py 20 Nov 2006 00:18:47 -0000 1.4 --- Landing.py 23 Nov 2006 00:08:15 -0000 1.5 *************** *** 59,62 **** --- 59,63 ---- UI.DisplayMessage('Landing %s' % base_name) UI.SetAlt(1200 + alt_m) + UI.SetThrottle(0.7) TI.SetMemoryValue(2, 1) track_info.Offset(8, landing_data.Heading_rad + 3.1416) # approach from rear for now *************** *** 65,68 **** --- 66,70 ---- UI.SetAlt(400 + alt_m) UI.SetPitchLimit(15) + UI.SetThrottle(0.7) SetFractionalSpeed(UI,0.5) elif (land_state == 3): *************** *** 70,73 **** --- 72,76 ---- UI.SetPitchLimit(10) SetFractionalSpeed(UI,0.4) + UI.SetThrottle(0.5) if(UI.GetLandingState()==0): UI.SetLandingState(1) # gear down |