[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.56,1.57 tcRadarSensorState.cpp,1.5,1.6 tcSensorState.cpp,
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-02-05 23:19:42
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30786/src/sim Modified Files: Game.cpp tcRadarSensorState.cpp tcSensorState.cpp tcSimState.cpp Log Message: Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Game.cpp 29 Jan 2004 00:05:26 -0000 1.56 --- Game.cpp 5 Feb 2004 23:17:05 -0000 1.57 *************** *** 1503,1506 **** --- 1503,1517 ---- } return; + case 'A': + accelerateTime--; + if (accelerateTime == 6) + { + accelerateTime = 3; // jump to 8x from 4x + } + else if (accelerateTime < 0) + { + accelerateTime = 0; // return to normal time after 8x + } + return; case 'F': viewer->ToggleFog(); Index: tcRadarSensorState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcRadarSensorState.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcRadarSensorState.cpp 1 Feb 2004 22:19:09 -0000 1.5 --- tcRadarSensorState.cpp 5 Feb 2004 23:17:05 -0000 1.6 *************** *** 50,53 **** --- 50,55 ---- illuminatorID = -1; illuminatorSensorIdx = 0; + isCommandReceiver = mpDBObj->isCommandReceiver; + return true; *************** *** 69,77 **** float illuminatorTargetRange_km = 1e8; ! if (isSemiactive) { tcRadar* illum = GetSemiactiveIlluminator(); if (illum == NULL) return false; if (!illum->CanDetectTarget(target, illuminatorTargetRange_km)) return false; } --- 71,80 ---- float illuminatorTargetRange_km = 1e8; ! if (isSemiactive || isCommandReceiver) { tcRadar* illum = GetSemiactiveIlluminator(); if (illum == NULL) return false; if (!illum->CanDetectTarget(target, illuminatorTargetRange_km)) return false; + if (isCommandReceiver) return true; } *************** *** 136,145 **** - log10f(fTargetRange_km) - log10f(illuminatorTargetRange_km) ! ) >= rcs_dBsm; } else { bDetectable = ! (40.0f*(log10f(mpDBObj->mfRefRange_km) - log10f(fTargetRange_km)) >= rcs_dBsm); } return bDetectable && bTargetTypeMatch; --- 139,148 ---- - log10f(fTargetRange_km) - log10f(illuminatorTargetRange_km) ! ) + rcs_dBsm >= 0; } else { bDetectable = ! (40.0f*(log10f(mpDBObj->mfRefRange_km) - log10f(fTargetRange_km)) + rcs_dBsm >= 0); } return bDetectable && bTargetTypeMatch; *************** *** 171,179 **** /** ! * Sets illuminator info for semi-active radars. */ void tcRadar::SetIlluminator(long illum_id, unsigned sensor_idx) { ! wxASSERT(isSemiactive); illuminatorID = illum_id; --- 174,184 ---- /** ! * Sets illuminator info for semi-active radars and command receivers. ! * isCommandReceiver indicates the "radar" is a simple receiver of command ! * guidance from the fire control radar. */ void tcRadar::SetIlluminator(long illum_id, unsigned sensor_idx) { ! wxASSERT(isSemiactive || isCommandReceiver); illuminatorID = illum_id; *************** *** 259,262 **** --- 264,268 ---- illuminatorSensorIdx = 0; isSemiactive = false; + isCommandReceiver = false; } *************** *** 267,271 **** { // release fire control track ! if (isSemiactive) { if (tcRadar *illuminator = GetSemiactiveIlluminator()) --- 273,277 ---- { // release fire control track ! if (isSemiactive || isCommandReceiver) { if (tcRadar *illuminator = GetSemiactiveIlluminator()) Index: tcSensorState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorState.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSensorState.cpp 1 Feb 2004 22:19:09 -0000 1.3 --- tcSensorState.cpp 5 Feb 2004 23:17:05 -0000 1.4 *************** *** 21,24 **** --- 21,25 ---- #include "aerror.h" #include "tcSimState.h" + #include "tcGameObject.h" tcSimState* tcSensorState::simState = NULL; *************** *** 169,172 **** --- 170,185 ---- } + tcSensorState::tcSensorState(tcGameObject *obj) + : parent(obj) + { + mbActive = false; + mnMode = 0; + mpDBObj = NULL; + mnDBKey = NULL_INDEX; + mfLastScan = 0; + mfCurrentScanPeriod_s = 30.0f; + mcTrack.mnID = NULL_INDEX; + } + /** * Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcSimState.cpp 2 Feb 2004 01:21:37 -0000 1.28 --- tcSimState.cpp 5 Feb 2004 23:17:05 -0000 1.29 *************** *** 740,744 **** tcGameObject *apEmitterPlatform, float& rfAz_rad) { ! if (!apEmitterRadar->mbActive) {return false;} tsESMTargetInfo sETI; sETI.mfLat_rad = (float)apEmitterPlatform->mcKin.mfLat_rad; --- 740,744 ---- tcGameObject *apEmitterPlatform, float& rfAz_rad) { ! if ((!apEmitterRadar->mbActive)||(apEmitterRadar->IsSemiactive())) {return false;} tsESMTargetInfo sETI; sETI.mfLat_rad = (float)apEmitterPlatform->mcKin.mfLat_rad; |