From b6e8b0c5ffd7ae78257d0de75f5122e00468f98a Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sun, 17 Nov 2024 21:09:13 +0200 Subject: [PATCH] Convert to SoldierID --- Tactical/Soldier Control.cpp | 8 ++++---- Tactical/Weapons.cpp | 2 +- Tactical/Weapons.h | 2 +- TileEngine/LightEffects.cpp | 4 ++-- TileEngine/LightEffects.h | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 79fd04e8..aa96c7e6 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -24132,8 +24132,8 @@ void SetSoldierPersonalLightLevel( SOLDIERTYPE *pSoldier ) void BeginSoldierClimbWallUp( SOLDIERTYPE *pSoldier ) { - INT8 bNewDirection; - UINT16 ubWhoIsThere; + INT8 bNewDirection; + SoldierID ubWhoIsThere; if ( FindLowerLevelWall( pSoldier, pSoldier->sGridNo, pSoldier->ubDirection, &bNewDirection ) && (pSoldier->pathing.bLevel > 0) ) { @@ -25356,10 +25356,10 @@ UINT16 GridNoSpotterCTHBonus( SOLDIERTYPE* pSniper, INT32 sGridNo, INT8 bTeam ) { BOOLEAN targetseen = FALSE; - UINT16 usID = WhoIsThere2( sGridNo, pSniper->bTargetLevel ); + SoldierID usID = WhoIsThere2( sGridNo, pSniper->bTargetLevel ); // is someone is at the sGridNo, check wether the spotter can see any part of him check wether head can be seen) - if ( usID != NOBODY && SoldierToSoldierLineOfSightTest( pSoldier, MercPtrs[usID], 0, NO_DISTANCE_LIMIT, AIM_SHOT_HEAD ) > 0 ) + if ( usID != NOBODY && SoldierToSoldierLineOfSightTest( pSoldier, usID, 0, NO_DISTANCE_LIMIT, AIM_SHOT_HEAD ) > 0 ) targetseen = TRUE; // otherwise check wether we can see the ground floor else if ( SoldierToVirtualSoldierLineOfSightTest( pSoldier, sGridNo, pSniper->pathing.bLevel, ANIM_PRONE, FALSE, NO_DISTANCE_LIMIT ) > 0 ) diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index b2436930..ebe43661 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -12144,7 +12144,7 @@ FLOAT CalcNewChanceToHitAimTraitBonus(SOLDIERTYPE *pSoldier, FLOAT fAimCap, FLOA extern BOOLEAN IsRoofPresentAtGridNo( INT32 sGridNo ); // Flugente: fire item from A to B (intended for mortarshells and launchable grenades) -BOOLEAN ArtilleryStrike( UINT16 usItem, UINT16 ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos ) +BOOLEAN ArtilleryStrike( UINT16 usItem, SoldierID ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos ) { FLOAT dForce, dDegrees; INT16 sDestX, sDestY, sSrcX, sSrcY; diff --git a/Tactical/Weapons.h b/Tactical/Weapons.h index 958d8642..650d18f3 100644 --- a/Tactical/Weapons.h +++ b/Tactical/Weapons.h @@ -536,7 +536,7 @@ FLOAT GetOverheatJamThreshold( OBJECTTYPE *pObj ); FLOAT GetOverheatDamageThresholdModifier( OBJECTTYPE *pObj ); FLOAT GetOverheatDamageThreshold( OBJECTTYPE *pObj ); -BOOLEAN ArtilleryStrike( UINT16 usItem, UINT16 ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos ); +BOOLEAN ArtilleryStrike( UINT16 usItem, SoldierID ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos ); // Flugente: functions for using several barrels at once UINT8 GetNextBarrelMode( UINT16 usItem, UINT8 aBarrelMode ); diff --git a/TileEngine/LightEffects.cpp b/TileEngine/LightEffects.cpp index ea734df8..cc51640e 100644 --- a/TileEngine/LightEffects.cpp +++ b/TileEngine/LightEffects.cpp @@ -537,7 +537,7 @@ void ResetLightEffects() } // Flugente: create and destroy light sources tied to a person -void CreatePersonalLight( INT32 sGridNo, UINT16 ubID ) +void CreatePersonalLight( INT32 sGridNo, SoldierID ubID ) { INT32 iLightIndex = NewLightEffectInternal( sGridNo, 0, 1 ); @@ -548,7 +548,7 @@ void CreatePersonalLight( INT32 sGridNo, UINT16 ubID ) } } -void RemovePersonalLights( UINT16 ubID ) +void RemovePersonalLights( SoldierID ubID ) { LIGHTEFFECT *pLight; diff --git a/TileEngine/LightEffects.h b/TileEngine/LightEffects.h index 869d2e82..00b9b603 100644 --- a/TileEngine/LightEffects.h +++ b/TileEngine/LightEffects.h @@ -25,7 +25,7 @@ typedef struct // Flugente: added variables necessary for dynamic (flash-)lighting INT32 flags; - UINT16 ubOwner; + SoldierID ubOwner; } LIGHTEFFECT; @@ -55,7 +55,7 @@ void ResetLightEffects(); BOOLEAN IsLightEffectAtTile( INT32 sGridNo ); // Flugente: create and destroy light sources tied to a person -void CreatePersonalLight( INT32 sGridNo, UINT16 ubID ); -void RemovePersonalLights( UINT16 ubID ); +void CreatePersonalLight( INT32 sGridNo, SoldierID ubID ); +void RemovePersonalLights(SoldierID ubID ); -#endif \ No newline at end of file +#endif