[Gcblue-commits] gcb_wx/src/sim tcObjectControl.cpp,1.27,1.28 tcSonar.cpp,1.3,1.4 tcTorpedoObject.cp
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-21 02:26:30
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31924/src/sim Modified Files: tcObjectControl.cpp tcSonar.cpp tcTorpedoObject.cpp Log Message: Changes for OSG 0.9.8 Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcObjectControl.cpp 11 Dec 2004 01:09:07 -0000 1.27 --- tcObjectControl.cpp 21 Dec 2004 02:26:18 -0000 1.28 *************** *** 1400,1404 **** { tcLauncherPopup* popupControl = ! new tcLauncherPopup(mpHookedGameObj->mnID, anLauncher, wxPoint(200, 200)); return true; --- 1400,1404 ---- { tcLauncherPopup* popupControl = ! new tcLauncherPopup(mpHookedGameObj->mnID, anLauncher, wxPoint(220, 200)); return true; Index: tcTorpedoObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcTorpedoObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcTorpedoObject.cpp 7 Dec 2004 04:00:44 -0000 1.2 --- tcTorpedoObject.cpp 21 Dec 2004 02:26:18 -0000 1.3 *************** *** 155,159 **** goalSpeed_kts = pLauncher->preEnableSpeed_kts; ceiling_m = pLauncher->ceiling_m; ! floor_m = pLauncher->floor_m; --- 155,167 ---- goalSpeed_kts = pLauncher->preEnableSpeed_kts; ceiling_m = pLauncher->ceiling_m; ! ! if (floor_m > 0) ! { ! floor_m = pLauncher->floor_m; ! } ! else ! { ! floor_m = 8096.0f; ! } Index: tcSonar.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSonar.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSonar.cpp 7 Dec 2004 04:00:44 -0000 1.3 --- tcSonar.cpp 21 Dec 2004 02:26:18 -0000 1.4 *************** *** 321,324 **** --- 321,325 ---- unsigned int detectMask = PTYPE_SURFACE; if (!mpDBObj->isWakeHoming) detectMask |= PTYPE_SUBSURFACE; + tcTorpedoObject* torpedo = dynamic_cast<tcTorpedoObject*>(parent); // find closest detectable target *************** *** 329,332 **** --- 330,341 ---- bool isEligible = (target->mpDBObject->mnType != PTYPE_TORPEDO) && ((target->mpDBObject->mnType & detectMask) != 0); + + // ignore targets (don't test) outside of programmed depth limits + if (torpedo && ((-target->mcKin.mfAlt_m > torpedo->floor_m) || + (-target->mcKin.mfAlt_m < torpedo->ceiling_m))) + { + isEligible = false; + } + if (isEligible && (target != parent)) // no self detection { |