[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.136,1.137 tcAirObject.cpp,1.25,1.26 tcFlightOpsObject.cpp
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-07-02 16:51:21
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24188/src/sim Modified Files: Game.cpp tcAirObject.cpp tcFlightOpsObject.cpp tcLauncherState.cpp tcMapData.cpp tcMissileObject.cpp tcPlatformObject.cpp tcSensorTrackIterator.cpp tcSimState.cpp tcWeaponObject.cpp Log Message: Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** tcSimState.cpp 28 Jun 2005 02:51:35 -0000 1.84 --- tcSimState.cpp 2 Jul 2005 16:51:12 -0000 1.85 *************** *** 566,570 **** { float range_m = 1000.0f * target->mcKin.RangeToKmAlt(weapon->mcKin); ! if (range_m <= 80.0) { float damageFraction = GetFractionalDamage(fDamage, target); --- 566,571 ---- { float range_m = 1000.0f * target->mcKin.RangeToKmAlt(weapon->mcKin); ! float damage_range_m = 0.5f * target->GetSpan() + 25.0f; ! if (range_m <= damage_range_m) { float damageFraction = GetFractionalDamage(fDamage, target); Index: tcWeaponObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcWeaponObject.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcWeaponObject.cpp 1 Jun 2005 00:13:50 -0000 1.13 --- tcWeaponObject.cpp 2 Jul 2005 16:51:12 -0000 1.14 *************** *** 115,119 **** tcSensorMapTrack *smtrack = simState->mcSensorMap.GetSensorMapTrack(targetId, GetAlliance()); ! if (smtrack == NULL) { fprintf(stderr, "tcWeaponObject::SetIntendedTarget - targetId %d not found in sensor map" --- 115,119 ---- tcSensorMapTrack *smtrack = simState->mcSensorMap.GetSensorMapTrack(targetId, GetAlliance()); ! if (smtrack == 0) { fprintf(stderr, "tcWeaponObject::SetIntendedTarget - targetId %d not found in sensor map" Index: tcMissileObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMissileObject.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcMissileObject.cpp 28 Jun 2005 02:51:35 -0000 1.28 --- tcMissileObject.cpp 2 Jul 2005 16:51:12 -0000 1.29 *************** *** 491,500 **** { mfGuidanceUpdateInterval = 0.2f; ! sensor->mfCurrentScanPeriod_s = 0.2f; } else if (mfInterceptTime <= 2.0) { mfGuidanceUpdateInterval = 0.1f; ! sensor->mfCurrentScanPeriod_s = 0.1f; } --- 491,500 ---- { mfGuidanceUpdateInterval = 0.2f; ! if (sensor != 0) sensor->mfCurrentScanPeriod_s = 0.2f; } else if (mfInterceptTime <= 2.0) { mfGuidanceUpdateInterval = 0.1f; ! if (sensor != 0) sensor->mfCurrentScanPeriod_s = 0.1f; } Index: tcMapData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapData.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcMapData.cpp 28 Jun 2005 02:51:35 -0000 1.21 --- tcMapData.cpp 2 Jul 2005 16:51:12 -0000 1.22 *************** *** 975,978 **** --- 975,980 ---- * point (startLon_deg, startLat_deg) * Uses newer 10 x 10 deg DEM tile system + * TODO: there is a bug with this where areas near or straddling an untiled area + * are not loaded correctly. The map shows all black in these cases. */ void tcMapData::LoadHighResB(float startLon_deg, float startLat_deg) Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** tcLauncherState.cpp 25 Jun 2005 22:10:36 -0000 1.33 --- tcLauncherState.cpp 2 Jul 2005 16:51:12 -0000 1.34 *************** *** 57,63 **** tcLauncherDBObject* ldata = dynamic_cast<tcLauncherDBObject*>(mpDatabase->GetObject(anKey)); ! if (ldata == NULL) { ! WTL("Error - tcLauncherState::AddFullLauncher - Not found in db"); return; } --- 57,64 ---- tcLauncherDBObject* ldata = dynamic_cast<tcLauncherDBObject*>(mpDatabase->GetObject(anKey)); ! if (ldata == 0) { ! fprintf(stderr, "Error - tcLauncherState::AddFullLauncher - Not found in db (%d)\n", ! anKey); return; } *************** *** 65,69 **** if (mnCount >= tcGenericDBObject::MAXLAUNCHERS) { ! WTL("Error - tcLauncherState::AddFullLauncher - full"); return; } --- 66,70 ---- if (mnCount >= tcGenericDBObject::MAXLAUNCHERS) { ! fprintf(stderr, "Error - tcLauncherState::AddFullLauncher - full\n"); return; } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** Game.cpp 28 Jun 2005 02:51:35 -0000 1.136 --- Game.cpp 2 Jul 2005 16:51:12 -0000 1.137 *************** *** 2026,2031 **** s = wxString::Format("Formed group %d (%d units)\n", val, hookedUnits.size()); DisplayMessage(s.c_str()); } - return; } event.Skip(); --- 2026,2031 ---- s = wxString::Format("Formed group %d (%d units)\n", val, hookedUnits.size()); DisplayMessage(s.c_str()); + return; } } event.Skip(); *************** *** 2172,2176 **** if (controlDown) { ! int xx = 0; } --- 2172,2182 ---- if (controlDown) { ! switch (nChar) ! { ! case ('r'-'a'+1): // CTRL+r ! tcSimPythonInterface::Get()->ReimportModules(); ! return; ! } ! return; } Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** tcPlatformObject.cpp 28 Jun 2005 02:51:35 -0000 1.51 --- tcPlatformObject.cpp 2 Jul 2005 16:51:12 -0000 1.52 *************** *** 208,212 **** /** ! * adjust speed to goal speed, limited by max acceleration */ void tcPlatformObject::UpdateSpeed(float dt_s) --- 208,213 ---- /** ! * Adjust speed to goal speed, limited by max acceleration ! * Also updates fuel state (setting fuel capacity to 0 in db gives infinite fuel) */ void tcPlatformObject::UpdateSpeed(float dt_s) *************** *** 1032,1038 **** { tnPoolIndex nLauncherKey = database->GetKey(mpDBObject->maLauncherClass[nLauncher]); ! float launcherAz_deg = mpDBObject->GetLauncherAz(nLauncher); ! mcLauncherState.AddFullLauncher(nLauncherKey, C_PIOVER180*launcherAz_deg, ! mpDBObject->launcherName[nLauncher]); } --- 1033,1047 ---- { tnPoolIndex nLauncherKey = database->GetKey(mpDBObject->maLauncherClass[nLauncher]); ! if (nLauncherKey != -1) ! { ! float launcherAz_deg = mpDBObject->GetLauncherAz(nLauncher); ! mcLauncherState.AddFullLauncher(nLauncherKey, C_PIOVER180*launcherAz_deg, ! mpDBObject->launcherName[nLauncher]); ! } ! else ! { ! fprintf(stderr, "tcPlatformObject::tcPlatformObject - Launcher not in database (%s)\n", ! mpDBObject->maLauncherClass[nLauncher].mz); ! } } Index: tcSensorTrackIterator.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorTrackIterator.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSensorTrackIterator.cpp 1 Jun 2005 00:13:33 -0000 1.3 --- tcSensorTrackIterator.cpp 2 Jul 2005 16:51:12 -0000 1.4 *************** *** 117,121 **** bool tcSensorTrackIterator::NotDone() { ! return (nIterated <= nSize); } --- 117,121 ---- bool tcSensorTrackIterator::NotDone() { ! return (map != 0) && (nIterated <= nSize); } Index: tcFlightOpsObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightOpsObject.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcFlightOpsObject.cpp 22 Jun 2005 01:22:09 -0000 1.11 --- tcFlightOpsObject.cpp 2 Jul 2005 16:51:12 -0000 1.12 *************** *** 190,197 **** ! tcGameObject* tcFlightOpsObject::AddChildToFlightDeck(std::string className, std::string unitName, teLocation loc, unsigned int position) { ! return AddChildToFlightDeck(database->GetObject(className), unitName, loc, position); } --- 190,207 ---- ! tcGameObject* tcFlightOpsObject::AddChildToFlightDeck(const std::string& className, std::string unitName, teLocation loc, unsigned int position) { ! tcDatabaseObject* objData = database->GetObject(className); ! if (objData) ! { ! return AddChildToFlightDeck(objData, unitName, loc, position); ! } ! else ! { ! fprintf(stderr, "tcFlightOpsObject::AddChildToFlightDeck - child not in database (%s)\n", ! className.c_str()); ! return 0; ! } } Index: tcAirObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAirObject.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tcAirObject.cpp 28 Jun 2005 02:51:35 -0000 1.25 --- tcAirObject.cpp 2 Jul 2005 16:51:12 -0000 1.26 *************** *** 187,191 **** { // check for crash ! if ((mcKin.mfAlt_m <= 0)||(mcTerrain.mfHeight_m >= mcKin.mfAlt_m)) { mfDamageLevel = 1.0f; } --- 187,192 ---- { // check for crash ! if ((mcKin.mfAlt_m <= 0) || (mcTerrain.mfHeight_m >= mcKin.mfAlt_m)) ! { mfDamageLevel = 1.0f; } |