Update of /cvsroot/gcblue/gcb_wx/src/sim
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27284/src/sim
Modified Files:
tcAeroAirObject.cpp tcSensorMap.cpp
Log Message:
Index: tcSensorMap.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tcSensorMap.cpp 5 Mar 2005 22:38:03 -0000 1.16
--- tcSensorMap.cpp 11 Mar 2005 02:46:47 -0000 1.17
***************
*** 856,859 ****
--- 856,860 ----
maTrack.GetNextAssoc(cmappos,nKey,psmtrack);
bool bAgedReport = false;
+ bool freshReport = false; // true if at least one report isn't stale
for(int n=0;(n<psmtrack->mnContributors)&&(!bAgedReport);n++)
{
***************
*** 866,870 ****
else if (timeSinceUpdate >= staleTime)
{
! psmtrack->MarkStale();
if (psmtrack->IsDestroyed() && (timeSinceUpdate >= staleTime + 3.0))
{
--- 867,871 ----
else if (timeSinceUpdate >= staleTime)
{
! if (!freshReport) psmtrack->MarkStale();
if (psmtrack->IsDestroyed() && (timeSinceUpdate >= staleTime + 3.0))
{
***************
*** 876,879 ****
--- 877,881 ----
{
psmtrack->ClearStale();
+ freshReport = true;
}
}
Index: tcAeroAirObject.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAeroAirObject.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** tcAeroAirObject.cpp 10 Mar 2005 03:28:29 -0000 1.10
--- tcAeroAirObject.cpp 11 Mar 2005 02:46:47 -0000 1.11
***************
*** 45,52 ****
}
- bool tcAeroAirObject::IsDestroyed()
- {
- return mfDamageLevel >= 1.0f;
- }
void tcAeroAirObject::RandInitNear(float afLon_deg, float afLat_deg)
--- 45,48 ----
***************
*** 110,113 ****
--- 106,113 ----
}
+
+
+
+
void tcAeroAirObject::UpdateEffects()
{
***************
*** 148,151 ****
--- 148,158 ----
UpdateEffects();
+ if (mfDamageLevel >= 1.0f)
+ {
+ UpdateDestroyed(afStatusTime);
+ mfStatusTime = afStatusTime;
+ return;
+ }
+
UpdateFormationGuidance(); // formation heading/speed calculation
|