Added memory leak detection to "new" operator

Prevent merc in slot 0 from disappearing due to errant schedule.  Still need to find and fix schedule though
Prevent attempts to turn or climb roof when soldier collapsed
Fix problems when mortar or RPG randomly assigned to a soldier but cannot be added for whatever reason
Pathing favors beginning path on orthogonal and using as few turns as possible (mostly old behavior).
Prevent interruptions when soldier climbs up, which can cause fall into building just below the target roof position
Fix pauses due to soldiers hurt in previous turn
Fix soldier path not reaching destination when thrown by explosion damage or heavy gunfire
Restore pathing to cave and underground exits
Fix too many AI ending up on the roofs


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-11-09 09:10:40 +00:00
parent 51539605f5
commit 11c4d9648e
19 changed files with 197 additions and 102 deletions
+16 -2
View File
@@ -3000,7 +3000,10 @@ void InternalSetSoldierHeight( SOLDIERTYPE *pSoldier, FLOAT dNewHeight, BOOLEAN
return;
}
if ( pSoldier->sHeightAdjustment > 0 )
// 0verhaul: Changed this to half the wall height. During a climb up, a soldier's height increases to about 8, then falls
// to near 0 before being set to 50 at the end. The animation offsets should probably be changed to make this unnecessary
// but this is good enough to keep him from bouncing between level 1 and level 0 (and also triggering weird sight bugs).
if ( pSoldier->sHeightAdjustment > 25 )
{
pSoldier->bLevel = SECOND_LEVEL;
@@ -6084,6 +6087,7 @@ void TurnSoldier( SOLDIERTYPE *pSoldier)
else
{
pSoldier->uiStatusFlags &= (~SOLDIER_TURNINGFROMHIT );
pSoldier->fGettingHit = FALSE;
}
}
else if ( pSoldier->fGettingHit == 2 )
@@ -6100,7 +6104,7 @@ void TurnSoldier( SOLDIERTYPE *pSoldier)
//ReduceAttackBusyCount( );
//FREEUP GETTING HIT FLAG
// pSoldier->fGettingHit = FALSE;
pSoldier->fGettingHit = FALSE;
}
}
@@ -11598,6 +11602,11 @@ void ChangeToFlybackAnimation( SOLDIERTYPE *pSoldier, UINT8 ubDirection )
// Remove any previous actions
pSoldier->ubPendingAction = NO_PENDING_ACTION;
// Since we're manually setting our path, we have to reset these @#$@# flags too. Otherwise we don't reach the
// destination a lot of the time
pSoldier->fPastXDest = 0;
pSoldier->fPastYDest = 0;
// Set path....
pSoldier->usPathDataSize = 0;
pSoldier->usPathIndex = 0;
@@ -11638,6 +11647,11 @@ void ChangeToFallbackAnimation( SOLDIERTYPE *pSoldier, UINT8 ubDirection )
// Remove any previous actions
pSoldier->ubPendingAction = NO_PENDING_ACTION;
// Since we're manually setting our path, we have to reset these @#$@# flags too. Otherwise we don't reach the
// destination a lot of the time
pSoldier->fPastXDest = 0;
pSoldier->fPastYDest = 0;
// Set path....
pSoldier->usPathDataSize = 0;
pSoldier->usPathIndex = 0;