mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fixed buffer overrun for LUA strings
Made direction variables more consistent as unsigned chars. Several function prototypes updated for this. Many memory leaks plugged: External options, video overlays, laptop file lists, tactical message queue, strategic pathing, autobandage, merc hiring, detailed placements, crate in Drassen, tactical placement New functions and attributes for soldiers in LUA (still for debugging at best): Soldier.APs (current APs), Soldier.changestance (changes stance, uses game heights) File catalog ignores .SVN directories (game load speedup) Fix CTD in mouse regions JA2 window now refuses to move to negative coords Checks to prevent DirectX-related infinite loops due to minimizing and task switching Invading enemies should now appear on the borders even when reinforcements disabled in .ini Suppression should no longer work on mercs in medium water Infant/Young creatures use restored spit instead of Molotov Creatures begin with their 'guns' (spit) 'locked and loaded' (cartridge in chamber) Further fix to AXP and AlaarDB's weapon ready check: Now 'firing' is always counted as 'ready'. Prevent mercs from falling and flying back through obstacles Check whether battle group is even set before testing its location for battle setup Burst spread locations now limited to 6, the limit within the soldier struct Extra burst spread locations zeroed out so that they aren't used unless necessary Spread code now only shoots at locations in the spread, and will shoot at all 6 Only mercs in the sector where autobandage happens will be made to stand up after it's done Throwing a grenade at the tail of the plane in Drassen should not result in a CTD Reset attack busy count when loading a new sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1347 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -503,7 +503,7 @@ public:
|
||||
FLOAT dOldYPos;
|
||||
INT16 sInitialGridNo;
|
||||
INT16 sGridNo;
|
||||
INT8 bDirection;
|
||||
UINT8 ubDirection;
|
||||
INT16 sHeightAdjustment;
|
||||
INT16 sDesiredHeight;
|
||||
INT16 sTempNewGridNo; // New grid no for advanced animations
|
||||
@@ -1158,7 +1158,7 @@ void EVENT_GetNewSoldierPath( SOLDIERTYPE *pSoldier, UINT16 sDestGridNo, UINT16
|
||||
BOOLEAN EVENT_InternalGetNewSoldierPath( SOLDIERTYPE *pSoldier, UINT16 sDestGridNo, UINT16 usMovementAnim, BOOLEAN fFromUI, BOOLEAN fForceRestart );
|
||||
|
||||
void EVENT_SetSoldierDirection( SOLDIERTYPE *pSoldier, UINT16 usNewDirection );
|
||||
void EVENT_SetSoldierDesiredDirection( SOLDIERTYPE *pSoldier, UINT16 usNewDirection );
|
||||
void EVENT_SetSoldierDesiredDirection( SOLDIERTYPE *pSoldier, UINT8 ubNewDirection );
|
||||
void EVENT_FireSoldierWeapon( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo );
|
||||
void EVENT_SoldierGotHit( SOLDIERTYPE *pSoldier, UINT16 usWeaponIndex, INT16 ubDamage, INT16 sBreathLoss, UINT16 bDirection , UINT16 sRange, UINT8 ubAttackerID, UINT8 ubSpecial, UINT8 ubHitLocation, INT16 sSubsequent, INT16 sLocationGridNo );
|
||||
void EVENT_SoldierBeginBladeAttack( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 ubDirection );
|
||||
@@ -1204,8 +1204,8 @@ BOOLEAN DeletePaletteData( );
|
||||
// UTILITY FUNCTUIONS
|
||||
void MoveMerc( SOLDIERTYPE *pSoldier, FLOAT dMovementChange, FLOAT dAngle, BOOLEAN fCheckRange );
|
||||
void MoveMercFacingDirection( SOLDIERTYPE *pSoldier, BOOLEAN fReverse, FLOAT dMovementDist );
|
||||
INT16 GetDirectionFromXY( INT16 sXPos, INT16 sYPos, SOLDIERTYPE *pSoldier );
|
||||
INT16 GetDirectionFromGridNo( INT16 sGridNo, SOLDIERTYPE *pSoldier );
|
||||
UINT8 GetDirectionFromXY( INT16 sXPos, INT16 sYPos, SOLDIERTYPE *pSoldier );
|
||||
UINT8 GetDirectionFromGridNo( INT16 sGridNo, SOLDIERTYPE *pSoldier );
|
||||
UINT8 atan8( INT16 sXPos, INT16 sYPos, INT16 sXPos2, INT16 sYPos2 );
|
||||
UINT8 atan8FromAngle( DOUBLE dAngle );
|
||||
INT8 CalcActionPoints(SOLDIERTYPE *pSold );
|
||||
@@ -1214,6 +1214,9 @@ INT16 GetDirectionToGridNoFromGridNo( INT16 sGridNoDest, INT16 sGridNoSrc );
|
||||
// This function is now obsolete. Call ReduceAttackBusyCount instead.
|
||||
// void ReleaseSoldiersAttacker( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN MercInWater( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN MercInShallowWater( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN MercInDeepWater( SOLDIERTYPE *pSoldier );
|
||||
BOOLEAN MercInHighWater( SOLDIERTYPE *pSoldier );
|
||||
UINT16 GetNewSoldierStateFromNewStance( SOLDIERTYPE *pSoldier, UINT8 ubDesiredStance );
|
||||
UINT16 GetMoveStateBasedOnStance( SOLDIERTYPE *pSoldier, UINT8 ubStanceHeight );
|
||||
void SoldierGotoStationaryStance( SOLDIERTYPE *pSoldier );
|
||||
@@ -1270,10 +1273,10 @@ void PositionSoldierLight( SOLDIERTYPE *pSoldier );
|
||||
|
||||
void SetCheckSoldierLightFlag( SOLDIERTYPE *pSoldier );
|
||||
|
||||
void EVENT_InternalSetSoldierDestination( SOLDIERTYPE *pSoldier, UINT16 usNewDirection, BOOLEAN fFromMove, UINT16 usAnimState );
|
||||
void EVENT_InternalSetSoldierDestination( SOLDIERTYPE *pSoldier, UINT8 ubNewDirection, BOOLEAN fFromMove, UINT16 usAnimState );
|
||||
|
||||
void ChangeToFlybackAnimation( SOLDIERTYPE *pSoldier, INT8 bDirection );
|
||||
void ChangeToFallbackAnimation( SOLDIERTYPE *pSoldier, INT8 bDirection );
|
||||
void ChangeToFlybackAnimation( SOLDIERTYPE *pSoldier, UINT8 ubDirection );
|
||||
void ChangeToFallbackAnimation( SOLDIERTYPE *pSoldier, UINT8 ubDirection );
|
||||
|
||||
//reset soldier timers
|
||||
void ResetSoldierChangeStatTimer( SOLDIERTYPE *pSoldier );
|
||||
|
||||
Reference in New Issue
Block a user