[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.138,1.139 tcPlatformObject.cpp,1.53,1.54 tcSensorPlatform
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-07-29 02:36:02
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28827/src/sim Modified Files: Game.cpp tcPlatformObject.cpp tcSensorPlatform.cpp tcSurfaceObject.cpp Log Message: 0.7.2 pre-release test build, added waypoints to client display, fixed multiplayer message overload bug, added better throttling for bad multiplayer connections Index: tcSensorPlatform.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorPlatform.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcSensorPlatform.cpp 28 Jun 2005 02:51:35 -0000 1.8 --- tcSensorPlatform.cpp 29 Jul 2005 02:35:53 -0000 1.9 *************** *** 191,194 **** --- 191,198 ---- { if (idx >= sensorState.size()) return; // error + + tcSensorState* sensor = sensorState[idx]; + if (sensor->IsActive() == state) return; // no change, return + sensorState[idx]->SetActive(state); sensorCommandObj.SetNewCommand(0x01 << idx); Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** tcPlatformObject.cpp 20 Jul 2005 16:24:55 -0000 1.53 --- tcPlatformObject.cpp 29 Jul 2005 02:35:53 -0000 1.54 *************** *** 852,855 **** --- 852,862 ---- unsigned char nMagazines; stream >> nMagazines; + if (magazines.size() != nMagazines) + { + fprintf(stderr, "tcPlatformObject::operator<< - bad platform update\n"); + wxASSERT(false); + return stream; + } + for (unsigned char n=0; n<nMagazines; n++) { Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** Game.cpp 26 Jul 2005 00:37:05 -0000 1.138 --- Game.cpp 29 Jul 2005 02:35:53 -0000 1.139 *************** *** 247,250 **** --- 247,273 ---- UninitGame(); + + + if (!simState->IsMultiplayerActive()) + { + simState->RandInit(); // generate new random scenario + + HookRandomFriendly(); + + // reset time + gameTime = 0; + directorTime = 0; + nLastCount = 0; + + // clear briefing console text + briefingConsoleLeft->Clear(); + briefingConsoleLeft->SetDelayedTextEffect(true); + + // reset director + director->ClearEvents(); + director->SetStartTime(0); + director->InitTest(); // load test event sequence (for random scen) + } + // if in multiplayer client mode, switch to multiplayer off mode if (networkView->GetNetworkMode() == tcNetworkView::MULTIPLAYER_CLIENT) *************** *** 257,276 **** } ! simState->RandInit(); // generate new random scenario ! HookRandomFriendly(); ! ! // reset time ! gameTime = 0; ! directorTime = 0; ! nLastCount = 0; ! ! // clear briefing console text ! briefingConsoleLeft->Clear(); ! briefingConsoleLeft->SetDelayedTextEffect(true); ! ! // reset director ! director->ClearEvents(); ! director->SetStartTime(0); ! director->InitTest(); // load test event sequence (for random scen) // set viewer back to object display mode --- 280,284 ---- } ! tcMessageInterface::Get()->SetPopupState(false); // set viewer back to object display mode *************** *** 326,329 **** --- 334,338 ---- // clear message center messageCenter->Clear(); + tcMessageInterface::Get()->SetPopupState(true); tcString s; *************** *** 555,558 **** --- 564,569 ---- pythonInterface->AttachDirector(director); + tcMessageInterface::Get()->SetPopupState(false); + viewer->Raise(); Index: tcSurfaceObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSurfaceObject.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** tcSurfaceObject.cpp 28 Jun 2005 02:51:35 -0000 1.20 --- tcSurfaceObject.cpp 29 Jul 2005 02:35:53 -0000 1.21 *************** *** 130,138 **** } ! mcKin.mfAlt_m -= 0.1f * dt_s; mcKin.mfRoll_rad += 0.01f * dt_s; mcKin.mfPitch_rad += 0.001f * dt_s; ! if (mcKin.mfAlt_m <= -20.0f) { doneSinking = true; --- 130,138 ---- } ! mcKin.mfAlt_m -= 0.2 * dt_s; mcKin.mfRoll_rad += 0.01f * dt_s; mcKin.mfPitch_rad += 0.001f * dt_s; ! if (mcKin.mfAlt_m <= -10.0f) { doneSinking = true; |