mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Convert functions and globals to SoldierID
This commit is contained in:
@@ -3612,7 +3612,7 @@ void recieveNEWSMOKEEFFECT (RPCParameters *rpcParameters)
|
||||
}
|
||||
}
|
||||
|
||||
void send_gasdamage( SOLDIERTYPE * pSoldier, UINT16 usExplosiveClassID, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, UINT16 ubOwner )
|
||||
void send_gasdamage( SOLDIERTYPE * pSoldier, UINT16 usExplosiveClassID, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, SoldierID ubOwner )
|
||||
{
|
||||
explosiondamage_struct exp;
|
||||
exp.ubDamageFunc = 1;
|
||||
|
||||
@@ -117,7 +117,7 @@ void send_plant_explosive (UINT16 ubID,UINT16 usItem,UINT8 ubItemStatus,UINT16 u
|
||||
void send_detonate_explosive (UINT32 uiWorldIndex, UINT16 ubID);
|
||||
void send_spreadeffect ( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT16 ubOwner, BOOLEAN fSubsequent, INT8 bLevel, INT32 iSmokeEffectID );
|
||||
void send_newsmokeeffect(INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT16 ubOwner, INT32 iSmokeEffectID);
|
||||
void send_gasdamage( SOLDIERTYPE * pSoldier, UINT16 usExplosiveClassID, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, UINT16 ubOwner );
|
||||
void send_gasdamage( SOLDIERTYPE * pSoldier, UINT16 usExplosiveClassID, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, SoldierID ubOwner );
|
||||
void send_explosivedamage( UINT16 ubPerson, UINT16 ubOwner, INT32 sBombGridNo, INT16 sWoundAmt, INT16 sBreathAmt, UINT32 uiDist, UINT16 usItem, INT16 sSubsequent );
|
||||
void send_disarm_explosive(UINT32 sGridNo, UINT32 uiWorldIndex, UINT16 ubID);
|
||||
|
||||
|
||||
@@ -7400,7 +7400,7 @@ static int l_SetOffBombsByFrequency (lua_State *L)
|
||||
if ( lua_gettop(L) >= 2 )
|
||||
{
|
||||
INT8 ACTION = lua_tointeger(L,1);
|
||||
UINT8 ID = lua_tointeger(L,2);
|
||||
SoldierID ID = lua_tointeger(L,2);
|
||||
|
||||
|
||||
if (ACTION >= 1 || ACTION <=4)
|
||||
|
||||
@@ -1699,7 +1699,7 @@ void RemoveRandomItemFromArmsDealerInventory( UINT8 ubArmsDealer, UINT16 usItemI
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 usProfileID, UINT16 aMercID )
|
||||
BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 usProfileID, SoldierID aMercID )
|
||||
{
|
||||
//Get Dealer ID from from merc Id
|
||||
INT8 bArmsDealer = GetArmsDealerIDFromMercID( usProfileID );
|
||||
@@ -1710,7 +1710,7 @@ BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 usProfileID, UINT16 aMercID )
|
||||
// not if this isn't a proper profile
|
||||
if ( usProfileID == NO_PROFILE )
|
||||
{
|
||||
pSoldier = MercPtrs[aMercID];
|
||||
pSoldier = aMercID;
|
||||
|
||||
if ( pSoldier && pSoldier->sNonNPCTraderID > 0 )
|
||||
bArmsDealer = pSoldier->sNonNPCTraderID;
|
||||
|
||||
@@ -366,7 +366,7 @@ UINT32 GetTimeToFixItemBeingRepaired( UINT8 ubArmsDealer, UINT16 usItemIndex, UI
|
||||
BOOLEAN CanDealerTransactItem( UINT8 ubArmsDealer, UINT16 usItemIndex, BOOLEAN fPurchaseFromPlayer );
|
||||
BOOLEAN CanDealerRepairItem( UINT8 ubArmsDealer, UINT16 usItemIndex );
|
||||
|
||||
BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 usProfileID, UINT16 aMercID );
|
||||
BOOLEAN AddDeadArmsDealerItemsToWorld( UINT8 usProfileID, SoldierID aMercID );
|
||||
|
||||
void MakeObjectOutOfDealerItems( DEALER_SPECIAL_ITEM *pSpclItemInfo, OBJECTTYPE *pObject );
|
||||
void CreateObjectForDealer( int usItem, int status, int numObjects, OBJECTTYPE *pObject );
|
||||
@@ -393,4 +393,4 @@ extern void GuaranteeAtLeastXItemsOfIndex( UINT8 ubArmsDealer, UINT16 usItemInd
|
||||
extern void GuaranteeAtMostNumOfItemsForItem( UINT8 ubArmsDealer, INT16 sItemIndex, UINT8 ubAtMostNumItems );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+5
-5
@@ -72,11 +72,11 @@ CAMO_FACE gCamoFace[NUM_PROFILES];
|
||||
FACE_GEAR_VALUES zNewFaceGear[MAXITEMS];
|
||||
FACE_GEAR_VALUES zNewFaceGearIMP[MAXITEMS];
|
||||
|
||||
extern BOOLEAN gfSMDisableForItems;
|
||||
extern INT16 gsCurInterfacePanel;
|
||||
extern UINT16 gusSMCurrentMerc;
|
||||
extern BOOLEAN gfRerenderInterfaceFromHelpText;
|
||||
extern BOOLEAN gfInItemPickupMenu;
|
||||
extern BOOLEAN gfSMDisableForItems;
|
||||
extern INT16 gsCurInterfacePanel;
|
||||
extern SoldierID gusSMCurrentMerc;
|
||||
extern BOOLEAN gfRerenderInterfaceFromHelpText;
|
||||
extern BOOLEAN gfInItemPickupMenu;
|
||||
|
||||
BOOLEAN FaceRestoreSavedBackgroundRect( INT32 iFaceIndex, INT16 sDestLeft, INT16 sDestTop, INT16 sSrcLeft, INT16 sSrcTop, INT16 sWidth, INT16 sHeight );
|
||||
void SetupFinalTalkingDelay( FACETYPE *pFace );
|
||||
|
||||
@@ -1551,7 +1551,7 @@ UINT32 UIHandleChangeLevel( UI_EVENT *pUIEvent )
|
||||
}
|
||||
|
||||
|
||||
extern void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI );
|
||||
extern void InternalSelectSoldier( SoldierID usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI );
|
||||
|
||||
UINT32 UIHandleSelectMerc( UI_EVENT *pUIEvent )
|
||||
{
|
||||
@@ -1715,12 +1715,11 @@ UINT32 UIHandleMOnTerrain( UI_EVENT *pUIEvent )
|
||||
// THIS IS JUST A CRUDE TEST FOR NOW
|
||||
if ( pSoldier->stats.bLife < OKLIFE )
|
||||
{
|
||||
UINT16 ubID;
|
||||
// Show reg. cursor
|
||||
// GO INTO IDLE MODE
|
||||
// guiPendingOverrideEvent = I_CHANGE_TO_IDLE;
|
||||
// gusSelectedSoldier = NOBODY;
|
||||
ubID = FindNextActiveAndAliveMerc( pSoldier, FALSE, FALSE );
|
||||
SoldierID ubID = FindNextActiveAndAliveMerc( pSoldier, FALSE, FALSE );
|
||||
|
||||
if ( ubID != NOBODY )
|
||||
{
|
||||
|
||||
@@ -230,12 +230,12 @@ enum
|
||||
MOUSE_REGION gInvRegions[ NUM_INV_SLOTS ];
|
||||
|
||||
extern MOUSE_REGION gMPanelRegion;
|
||||
extern BOOLEAN fMapInventoryItem;
|
||||
extern BOOLEAN gfAddingMoneyToMercFromPlayersAccount;
|
||||
extern SOLDIERTYPE *gpSMCurrentMerc;
|
||||
extern UINT16 gubSelectSMPanelToMerc;
|
||||
extern BOOLEAN fMapInventoryItem;
|
||||
extern BOOLEAN gfAddingMoneyToMercFromPlayersAccount;
|
||||
extern SOLDIERTYPE *gpSMCurrentMerc;
|
||||
extern SoldierID gubSelectSMPanelToMerc;
|
||||
extern MOUSE_REGION gSM_SELMERCMoneyRegion;
|
||||
extern UINT32 guiMapInvSecondHandBlockout;
|
||||
extern UINT32 guiMapInvSecondHandBlockout;
|
||||
|
||||
//jackaians: global variables added for the stealing pickup menu
|
||||
BOOLEAN gfStealing = FALSE;
|
||||
|
||||
@@ -399,9 +399,9 @@ BOOLEAN gfDisableTacticalPanelButtons = FALSE;
|
||||
BOOLEAN gfAddingMoneyToMercFromPlayersAccount = FALSE;
|
||||
|
||||
BOOLEAN gfCheckForMouseOverItem = FALSE;
|
||||
UINT32 guiMouseOverItemTime = 0;
|
||||
INT8 gbCheckForMouseOverItemPos = 0;
|
||||
UINT16 gubSelectSMPanelToMerc = NOBODY;
|
||||
UINT32 guiMouseOverItemTime = 0;
|
||||
INT8 gbCheckForMouseOverItemPos = 0;
|
||||
SoldierID gubSelectSMPanelToMerc = NOBODY;
|
||||
BOOLEAN gfReEvaluateDisabledINVPanelButtons = FALSE;
|
||||
|
||||
UINT32 guiBrownBackgroundForTeamPanel;
|
||||
@@ -478,8 +478,8 @@ void HelpTextDoneCallback( void );
|
||||
|
||||
// Globals - for one - the current merc here
|
||||
INT8 gbSMCurStanceObj;
|
||||
UINT16 gusSMCurrentMerc = 0;
|
||||
SOLDIERTYPE *gpSMCurrentMerc = NULL;
|
||||
SoldierID gusSMCurrentMerc = NOBODY;
|
||||
SOLDIERTYPE *gpSMCurrentMerc = NULL;
|
||||
// CHRISL:
|
||||
extern INT8 gbCompatibleApplyItem;
|
||||
extern SOLDIERTYPE *gpItemPopupSoldier;
|
||||
@@ -589,11 +589,11 @@ INT16 GetUIApsToDisplay( SOLDIERTYPE *pSoldier )
|
||||
void CheckForDisabledForGiveItem( )
|
||||
{
|
||||
INT16 sDist;
|
||||
INT32 sDestGridNo;
|
||||
INT8 bDestLevel;
|
||||
INT32 sDestGridNo;
|
||||
INT8 bDestLevel;
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
UINT16 ubSrcSoldier;
|
||||
SoldierID ubSrcSoldier;
|
||||
|
||||
// CHRISL: If Merc hasn't been set, default to first merc
|
||||
if(gpSMCurrentMerc==NULL)
|
||||
@@ -646,17 +646,17 @@ void CheckForDisabledForGiveItem( )
|
||||
{
|
||||
if ( gusSMCurrentMerc != ubSrcSoldier )
|
||||
{
|
||||
sDestGridNo = MercPtrs[ gusSMCurrentMerc ]->sGridNo;
|
||||
bDestLevel = MercPtrs[ gusSMCurrentMerc ]->pathing.bLevel;
|
||||
sDestGridNo = gusSMCurrentMerc->sGridNo;
|
||||
bDestLevel = gusSMCurrentMerc->pathing.bLevel;
|
||||
|
||||
// Get distance....
|
||||
sDist = PythSpacesAway( MercPtrs[ ubSrcSoldier ]->sGridNo, sDestGridNo );
|
||||
sDist = PythSpacesAway( ubSrcSoldier->sGridNo, sDestGridNo );
|
||||
|
||||
// Check LOS....
|
||||
if ( SoldierTo3DLocationLineOfSightTest( MercPtrs[ ubSrcSoldier ], sDestGridNo, bDestLevel, 3, TRUE, CALC_FROM_ALL_DIRS ) )
|
||||
if ( SoldierTo3DLocationLineOfSightTest( ubSrcSoldier, sDestGridNo, bDestLevel, 3, TRUE, CALC_FROM_ALL_DIRS ) )
|
||||
{
|
||||
// UNCONSCIOUS GUYS ONLY 1 tile AWAY
|
||||
if ( MercPtrs[ gusSMCurrentMerc ]->stats.bLife < CONSCIOUSNESS )
|
||||
if ( gusSMCurrentMerc->stats.bLife < CONSCIOUSNESS )
|
||||
{
|
||||
if ( sDist <= PASSING_ITEM_DISTANCE_NOTOKLIFE )
|
||||
{
|
||||
@@ -669,7 +669,7 @@ void CheckForDisabledForGiveItem( )
|
||||
}
|
||||
}
|
||||
// anv: passengers in the same vehicle can pass items freely
|
||||
else if ( MercPtrs[ ubSrcSoldier ]->iVehicleId != -1 && MercPtrs[ ubSrcSoldier ]->iVehicleId == MercPtrs[ gusSMCurrentMerc ]->iVehicleId )
|
||||
else if ( ubSrcSoldier->iVehicleId != -1 && ubSrcSoldier->iVehicleId == gusSMCurrentMerc->iVehicleId )
|
||||
{
|
||||
gfSMDisableForItems = FALSE;
|
||||
}
|
||||
@@ -686,13 +686,13 @@ void CheckForDisabledForGiveItem( )
|
||||
}
|
||||
}
|
||||
|
||||
void SetSMPanelCurrentMerc( UINT16 ubNewID )
|
||||
void SetSMPanelCurrentMerc( SoldierID ubNewID )
|
||||
{
|
||||
gubSelectSMPanelToMerc = NOBODY;
|
||||
|
||||
gusSMCurrentMerc = ubNewID;
|
||||
|
||||
gpSMCurrentMerc = MercPtrs[ ubNewID ];
|
||||
gpSMCurrentMerc = ubNewID;
|
||||
|
||||
// Set to current guy's interface level
|
||||
//if ( gsInterfaceLevel != gpSMCurrentMerc->bUIInterfaceLevel )
|
||||
@@ -1384,7 +1384,7 @@ void EnableSMPanelButtons( BOOLEAN fEnable , BOOLEAN fFromItemPickup )
|
||||
}
|
||||
}
|
||||
|
||||
UINT16 GetSMPanelCurrentMerc( )
|
||||
SoldierID GetSMPanelCurrentMerc( )
|
||||
{
|
||||
return( gusSMCurrentMerc );
|
||||
}
|
||||
@@ -4798,8 +4798,6 @@ void BtnMuteCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
void BtnPrevMercCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
INT16 sID;
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
@@ -4811,9 +4809,9 @@ void BtnPrevMercCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
sID = FindPrevActiveAndAliveMerc( gpSMCurrentMerc, TRUE, TRUE );
|
||||
SoldierID sID = FindPrevActiveAndAliveMerc( gpSMCurrentMerc, TRUE, TRUE );
|
||||
|
||||
gubSelectSMPanelToMerc = (UINT16)sID;
|
||||
gubSelectSMPanelToMerc = sID;
|
||||
|
||||
if ( !gfInItemPickupMenu )
|
||||
{
|
||||
@@ -4846,8 +4844,6 @@ void BtnPrevMercCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
|
||||
void BtnNextMercCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
INT16 sID;
|
||||
|
||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||
return;
|
||||
|
||||
@@ -4859,10 +4855,10 @@ void BtnNextMercCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
{
|
||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||
|
||||
sID = FindNextActiveAndAliveMerc( gpSMCurrentMerc, TRUE, TRUE );
|
||||
SoldierID sID = FindNextActiveAndAliveMerc( gpSMCurrentMerc, TRUE, TRUE );
|
||||
|
||||
// Give him the panel!
|
||||
gubSelectSMPanelToMerc = (UINT16)sID;
|
||||
gubSelectSMPanelToMerc = sID;
|
||||
|
||||
if ( !gfInItemPickupMenu )
|
||||
{
|
||||
@@ -6251,13 +6247,13 @@ void MercFacePanelCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
}
|
||||
|
||||
extern void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI );
|
||||
extern void InternalSelectSoldier( SoldierID usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI );
|
||||
|
||||
void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
void HandleLocateSelectMerc( SoldierID ubID, INT8 bFlag )
|
||||
{
|
||||
BOOLEAN fSelect = FALSE;
|
||||
|
||||
if( !MercPtrs[ ubID ]->bActive )
|
||||
if( !ubID->bActive )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -6270,14 +6266,14 @@ void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
|
||||
|
||||
// ATE: No matter what we do... if below OKLIFE, just locate....
|
||||
if ( MercPtrs[ ubID ]->stats.bLife < OKLIFE )
|
||||
if ( ubID->stats.bLife < OKLIFE )
|
||||
{
|
||||
LocateSoldier( ubID, SETLOCATOR );
|
||||
return;
|
||||
}
|
||||
|
||||
// Flugente: frozen soldiers can't be selected
|
||||
if ( MercPtrs[ubID]->usSkillCooldown[SOLDIER_COOLDOWN_CRYO] )
|
||||
if ( ubID->usSkillCooldown[SOLDIER_COOLDOWN_CRYO] )
|
||||
{
|
||||
LocateSoldier( ubID, SETLOCATOR );
|
||||
return;
|
||||
@@ -6289,7 +6285,7 @@ void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
{
|
||||
// Select merc
|
||||
InternalSelectSoldier( ubID, TRUE, FALSE, TRUE);
|
||||
MercPtrs[ ubID ]->flags.fFlashLocator = FALSE;
|
||||
ubID->flags.fFlashLocator = FALSE;
|
||||
ResetMultiSelection( );
|
||||
}
|
||||
else
|
||||
@@ -6300,7 +6296,7 @@ void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( MercPtrs[ ubID ]->flags.fFlashLocator == FALSE )
|
||||
if ( ubID->flags.fFlashLocator == FALSE )
|
||||
{
|
||||
if ( gGameSettings.fOptions[ TOPTION_OLD_SELECTION_METHOD ] )
|
||||
{
|
||||
@@ -6364,7 +6360,7 @@ void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
if ( fSelect )
|
||||
{
|
||||
// Select merc, only if alive!
|
||||
if ( !( MercPtrs[ ubID ]->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
if ( !( ubID->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
InternalSelectSoldier( ubID, TRUE, FALSE, TRUE );
|
||||
}
|
||||
@@ -6374,36 +6370,36 @@ void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag )
|
||||
ResetMultiSelection( );
|
||||
|
||||
// Handle locate select merc....
|
||||
HandleMouseOverSoldierFaceForContMove( MercPtrs[ ubID ], TRUE );
|
||||
HandleMouseOverSoldierFaceForContMove( ubID, TRUE );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ShowRadioLocator( UINT16 ubID, UINT8 ubLocatorSpeed )
|
||||
void ShowRadioLocator( SoldierID ubID, UINT8 ubLocatorSpeed )
|
||||
{
|
||||
RESETTIMECOUNTER( MercPtrs[ ubID ]->timeCounters.FlashSelCounter, FLASH_SELECTOR_DELAY );
|
||||
RESETTIMECOUNTER( ubID->timeCounters.FlashSelCounter, FLASH_SELECTOR_DELAY );
|
||||
|
||||
//LocateSoldier( ubID, FALSE ); // IC - this is already being done outside of this function :)
|
||||
MercPtrs[ ubID ]->flags.fFlashLocator = TRUE;
|
||||
ubID->flags.fFlashLocator = TRUE;
|
||||
//gbPanelSelectedGuy = ubID; IC - had to move this outside to make this function versatile
|
||||
MercPtrs[ ubID ]->sLocatorFrame = 0;
|
||||
ubID->sLocatorFrame = 0;
|
||||
|
||||
if ( ubLocatorSpeed == SHOW_LOCATOR_NORMAL )
|
||||
{
|
||||
// If we are an AI guy, and we have the baton, make lower...
|
||||
// ( MercPtrs[ ubID ]->flags.uiStatusFlags & SOLDIER_UNDERAICONTROL && MercPtrs[ ubID ]->bTeam != gbPlayerNum )
|
||||
// ( ubID->flags.uiStatusFlags & SOLDIER_UNDERAICONTROL && ubID->bTeam != gbPlayerNum )
|
||||
//
|
||||
//ercPtrs[ ubID ]->ubNumLocateCycles = 3;
|
||||
//
|
||||
//se
|
||||
//
|
||||
MercPtrs[ ubID ]->ubNumLocateCycles = 5;
|
||||
ubID->ubNumLocateCycles = 5;
|
||||
//
|
||||
}
|
||||
else
|
||||
{
|
||||
MercPtrs[ ubID ]->ubNumLocateCycles = 3;
|
||||
ubID->ubNumLocateCycles = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ void UpdateTEAMPanel( );
|
||||
*/
|
||||
BOOLEAN InitializeTEAMPanelCoords( );
|
||||
|
||||
void SetSMPanelCurrentMerc( UINT16 ubNewID );
|
||||
void SetSMPanelCurrentMerc( SoldierID ubNewID );
|
||||
void SetTEAMPanelCurrentMerc( UINT16 ubNewID );
|
||||
UINT16 GetSMPanelCurrentMerc( );
|
||||
SoldierID GetSMPanelCurrentMerc( );
|
||||
void UpdateSMPanel( );
|
||||
|
||||
BOOLEAN InitTEAMSlots( );
|
||||
@@ -107,7 +107,7 @@ extern INT8 gbNewItem[ NUM_INV_SLOTS ];
|
||||
extern INT8 gbNewItemCycle[ NUM_INV_SLOTS ];
|
||||
extern UINT8 gubNewItemMerc;
|
||||
|
||||
void ShowRadioLocator( UINT16 ubID, UINT8 ubLocatorSpeed );
|
||||
void ShowRadioLocator( SoldierID ubID, UINT8 ubLocatorSpeed );
|
||||
void EndRadioLocator( UINT16 ubID );
|
||||
|
||||
|
||||
@@ -168,4 +168,4 @@ extern UINT8 gubDescBoxTotalAdvLines;
|
||||
// Jenilee: determine the cost of moving this item around in our inventory
|
||||
UINT16 GetInvMovementCost(OBJECTTYPE* pObj, INT16 old_pos, INT16 new_pos);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -185,9 +185,9 @@ BOOLEAN gfPanelAllocated = FALSE;
|
||||
|
||||
extern MOUSE_REGION gDisableRegion;
|
||||
extern MOUSE_REGION gUserTurnRegion;
|
||||
extern BOOLEAN gfUserTurnRegionActive;
|
||||
extern UINT16 gubSelectSMPanelToMerc;
|
||||
extern BOOLEAN gfIgnoreOnSelectedGuy;
|
||||
extern BOOLEAN gfUserTurnRegionActive;
|
||||
extern SoldierID gubSelectSMPanelToMerc;
|
||||
extern BOOLEAN gfIgnoreOnSelectedGuy;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -4216,7 +4216,7 @@ void BtnDoorMenuCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
if ( EnoughPoints( gOpenDoorMenu.pSoldier, APBPConstants[AP_OPEN_DOOR], APBPConstants[BP_OPEN_DOOR], FALSE ) )
|
||||
{
|
||||
// Set UI
|
||||
SetUIBusy( (UINT8)gOpenDoorMenu.pSoldier->ubID );
|
||||
SetUIBusy( gOpenDoorMenu.pSoldier->ubID );
|
||||
|
||||
if ( gOpenDoorMenu.fClosingDoor )
|
||||
{
|
||||
|
||||
@@ -482,7 +482,7 @@ void HandleUpDownArrowBackgrounds( );
|
||||
|
||||
void EndDeadlockMsg( );
|
||||
|
||||
void HandleLocateSelectMerc( UINT16 ubID, INT8 bFlag );
|
||||
void HandleLocateSelectMerc( SoldierID ubID, INT8 bFlag );
|
||||
|
||||
void DirtyMercPanelInterface( SOLDIERTYPE *pSoldier, UINT8 ubDirtyLevel );
|
||||
|
||||
@@ -581,4 +581,4 @@ void NCTHShowMounted( SOLDIERTYPE* pSoldier, UINT16* ptrBuf, UINT32 uiPitch, INT
|
||||
BOOLEAN HasBackgroundFlag( UINT8 usProfile, UINT64 aFlag );
|
||||
INT16 GetBackgroundValue( UINT8 usProfile, UINT16 aNr );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+30
-32
@@ -3287,9 +3287,9 @@ void SelectNextAvailSoldier( SOLDIERTYPE *pSoldier )
|
||||
|
||||
|
||||
|
||||
void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI )
|
||||
void InternalSelectSoldier( SoldierID usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect, BOOLEAN fFromUI )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier, *pOldSoldier;
|
||||
SOLDIERTYPE *pSoldier, *pOldSoldier;
|
||||
|
||||
// ARM: can't call SelectSoldier() in mapscreen, that will initialize interface panels!!!
|
||||
// ATE: Adjusted conditions a bit ( sometimes were not getting selected )
|
||||
@@ -3312,7 +3312,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
|
||||
|
||||
// Get guy
|
||||
pSoldier = MercPtrs[ usSoldierID ];
|
||||
pSoldier = usSoldierID;
|
||||
|
||||
if( ( pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE ) )
|
||||
{
|
||||
@@ -3460,7 +3460,7 @@ void InternalSelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fF
|
||||
|
||||
}
|
||||
|
||||
void SelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect )
|
||||
void SelectSoldier( SoldierID usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect )
|
||||
{
|
||||
InternalSelectSoldier( usSoldierID, fAcknowledge, fForceReselect, FALSE );
|
||||
}
|
||||
@@ -3575,14 +3575,13 @@ void SlideTo(SoldierID usSoldierID, BOOLEAN fSetLocator)
|
||||
ShowRadioLocator( usSoldierID, SHOW_LOCATOR_NORMAL );
|
||||
|
||||
// FIRST CHECK IF WE ARE ON SCREEN
|
||||
if ( GridNoOnScreen( MercPtrs[ usSoldierID ]->sGridNo ) )
|
||||
if ( GridNoOnScreen( usSoldierID->sGridNo ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// sGridNo here for DG compatibility
|
||||
gTacticalStatus.sSlideTarget = MercPtrs[ usSoldierID ]->sGridNo;
|
||||
gTacticalStatus.sSlideReason = usReasonID;
|
||||
gTacticalStatus.sSlideTarget = usSoldierID->sGridNo;
|
||||
|
||||
// Plot new path!
|
||||
gfPlotNewMovement = TRUE;
|
||||
@@ -3612,8 +3611,8 @@ void SlideToLocation( INT32 sDestGridNo )
|
||||
|
||||
void RebuildAllSoldierShadeTables( )
|
||||
{
|
||||
UINT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
UINT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
// Loop through all mercs and make go
|
||||
for ( pSoldier = Menptr, cnt = 0; cnt < TOTAL_SOLDIERS; pSoldier++, cnt++ )
|
||||
@@ -3628,11 +3627,11 @@ void RebuildAllSoldierShadeTables( )
|
||||
|
||||
void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 cnt;
|
||||
INT32 iNewSelectedSoldier = -1;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
BOOLEAN fMissionFailed = TRUE;
|
||||
INT8 bBuddyIndex;
|
||||
INT32 cnt;
|
||||
INT32 iNewSelectedSoldier = -1;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
BOOLEAN fMissionFailed = TRUE;
|
||||
INT8 bBuddyIndex;
|
||||
|
||||
VerifyPublicOpplistDueToDeath( pSoldier );
|
||||
|
||||
@@ -4169,7 +4168,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
// killing crows/cows is not worth any experience!
|
||||
if ( ( pSoldierOld->ubBodyType != CROW ) && ( pSoldierOld->ubBodyType != COW ) ) //&& pSoldierOld->ubLastDamageReason != TAKE_DAMAGE_BLOODLOSS ) // SANDRO - why not give exp for bleeding out?
|
||||
{
|
||||
UINT16 ubAssister = NOBODY;
|
||||
SoldierID ubAssister = NOBODY;
|
||||
|
||||
// if it was a kill by a player's merc
|
||||
if (pSoldierOld->ubAttackerID != NOBODY && pSoldierOld->ubAttackerID->bTeam == gbPlayerNum )
|
||||
@@ -4218,10 +4217,10 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
}
|
||||
|
||||
// if it was assisted by a player's merc
|
||||
if (ubAssister != NOBODY && MercPtrs[ ubAssister ]->bTeam == gbPlayerNum )
|
||||
if (ubAssister != NOBODY && ubAssister->bTeam == gbPlayerNum )
|
||||
{
|
||||
// EXPERIENCE CLASS GAIN: Earned an assist
|
||||
StatChange( MercPtrs[ ubAssister ], EXPERAMT, (UINT16)( 5 * pSoldierOld->stats.bExpLevel ), FALSE );
|
||||
StatChange( ubAssister, EXPERAMT, (UINT16)( 5 * pSoldierOld->stats.bExpLevel ), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4252,7 +4251,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
if( Get3RandomQualifiedMercs( &SoldierId1, &SoldierId2, NULL ) != 0 )
|
||||
{
|
||||
//Say the "he blew himself up quote"
|
||||
TacticalCharacterDialogue( &Menptr[SoldierId1], QUOTE_GREETING );
|
||||
TacticalCharacterDialogue( SoldierId1, QUOTE_GREETING );
|
||||
|
||||
//if there isnt a second soldier
|
||||
if( SoldierId2 == NOBODY )
|
||||
@@ -4261,7 +4260,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
}
|
||||
|
||||
//say the "darn he took the inventoruy with him"
|
||||
TacticalCharacterDialogue( &Menptr[SoldierId2], QUOTE_SMALL_TALK );
|
||||
TacticalCharacterDialogue( SoldierId2, QUOTE_SMALL_TALK );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -4272,7 +4271,7 @@ void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldierOld )
|
||||
UINT16 LastActiveTeamMember( UINT16 ubTeam )
|
||||
{
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
cnt = gTacticalStatus.Team[ ubTeam ].bLastID;
|
||||
|
||||
@@ -4682,8 +4681,8 @@ SOLDIERTYPE * CivilianGroupMemberChangesSides( SOLDIERTYPE * pAttacked )
|
||||
void CivilianGroupChangesSides( UINT8 ubCivilianGroup )
|
||||
{
|
||||
// change civ group side due to external event (wall blowing up)
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
gTacticalStatus.fCivGroupHostile[ ubCivilianGroup ] = CIV_GROUP_HOSTILE;
|
||||
|
||||
@@ -4741,9 +4740,8 @@ void HickCowAttacked( SOLDIERTYPE * pNastyGuy, SOLDIERTYPE * pTarget )
|
||||
void MilitiaChangesSides( )
|
||||
{
|
||||
// make all the militia change sides
|
||||
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
|
||||
if ( gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector == 0 )
|
||||
{
|
||||
@@ -4783,7 +4781,7 @@ gTacticalStatus.fCivGroupHostile[ ubLoop ] = CIV_GROUP_HOSTILE;
|
||||
UINT16 NumActiveAndConsciousTeamMembers( UINT8 ubTeam )
|
||||
{
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
UINT16 ubCount = 0;
|
||||
|
||||
cnt = gTacticalStatus.Team[ ubTeam ].bFirstID;
|
||||
@@ -4801,11 +4799,11 @@ UINT16 NumActiveAndConsciousTeamMembers( UINT8 ubTeam )
|
||||
}
|
||||
|
||||
|
||||
UINT16 FindNextActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs )
|
||||
SoldierID FindNextActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs )
|
||||
{
|
||||
UINT16 bLastTeamID;
|
||||
UINT16 cnt;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
|
||||
cnt = pSoldier->ubID + 1;
|
||||
bLastTeamID = gTacticalStatus.Team[ pSoldier->bTeam ].bLastID;
|
||||
@@ -4915,11 +4913,11 @@ SOLDIERTYPE *FindNextActiveSquad( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
|
||||
UINT16 FindPrevActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs )
|
||||
SoldierID FindPrevActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs )
|
||||
{
|
||||
UINT16 bLastTeamID;
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
UINT16 bLastTeamID;
|
||||
INT32 cnt;
|
||||
SOLDIERTYPE *pTeamSoldier;
|
||||
|
||||
|
||||
// loop back
|
||||
|
||||
+4
-4
@@ -70,7 +70,7 @@ struct TacticalStatusType
|
||||
INT32 sPanicTriggerGridNoUnused;
|
||||
INT16 sHandGrid;
|
||||
UINT16 ubSpottersCalledForBy;
|
||||
UINT16 ubTheChosenOne;
|
||||
SoldierID ubTheChosenOne;
|
||||
UINT32 uiTimeOfLastInput;
|
||||
UINT32 uiTimeSinceDemoOn;
|
||||
UINT32 uiCountdownToRestart;
|
||||
@@ -224,7 +224,7 @@ void EndTurn( UINT8 ubNextTeam );
|
||||
void StartPlayerTeamTurn( BOOLEAN fDoBattleSnd, BOOLEAN fEnteringCombatMode );
|
||||
void EndTacticalDemo( );
|
||||
|
||||
void SelectSoldier( UINT16 usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect );
|
||||
void SelectSoldier( SoldierID usSoldierID, BOOLEAN fAcknowledge, BOOLEAN fForceReselect );
|
||||
|
||||
//Kaiden: Function declaration from UB to reveal all items after combat.
|
||||
void RevealAllDroppedEnemyItems();
|
||||
@@ -241,8 +241,8 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier );
|
||||
UINT16 LastActiveTeamMember( UINT16 ubTeam );
|
||||
BOOLEAN SoldierOnVisibleWorldTile( SOLDIERTYPE *pSoldier );
|
||||
|
||||
UINT16 FindNextActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs );
|
||||
UINT16 FindPrevActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs );
|
||||
SoldierID FindNextActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs );
|
||||
SoldierID FindPrevActiveAndAliveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife, BOOLEAN fOnlyRegularMercs );
|
||||
|
||||
BOOLEAN CheckForPlayerTeamInMissionExit( );
|
||||
void HandleNPCTeamMemberDeath( SOLDIERTYPE *pSoldier );
|
||||
|
||||
@@ -2021,51 +2021,53 @@ void HandleAltMouseRTX2Button(UINT32 *puiNewEvent)
|
||||
// sevenfm: original mouse commands functionality
|
||||
void HandleMouseRTWheel( void )
|
||||
{
|
||||
UINT16 bID;
|
||||
// nothing in hand and either not in SM panel, or the matching button is enabled if we are in SM panel
|
||||
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) &&
|
||||
( ( gsCurInterfacePanel != SM_PANEL ) || ( ButtonList[ iSMPanelButtons[ NEXTMERC_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) )
|
||||
{
|
||||
if ( gViewportRegion.WheelState > 0 ) //wheel up
|
||||
{
|
||||
//change stance ->DOWN
|
||||
if ( _KeyDown( ALT ) )
|
||||
SoldierID bID;
|
||||
// nothing in hand and either not in SM panel, or the matching button is enabled if we are in SM panel
|
||||
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) &&
|
||||
( ( gsCurInterfacePanel != SM_PANEL ) || ( ButtonList[ iSMPanelButtons[ NEXTMERC_BUTTON ] ]->uiFlags & BUTTON_ENABLED ) ) )
|
||||
{
|
||||
if ( gViewportRegion.WheelState > 0 ) //wheel up
|
||||
{
|
||||
//change stance ->DOWN
|
||||
if ( _KeyDown( ALT ) )
|
||||
{
|
||||
if ( (gusSelectedSoldier != NOBODY) && ( gpItemPointer == NULL ) )
|
||||
GotoLowerStance(gusSelectedSoldier);
|
||||
GotoLowerStance(gusSelectedSoldier);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{ //Select prev merc
|
||||
bID = FindPrevActiveAndAliveMerc( gusSelectedSoldier, TRUE, TRUE );
|
||||
HandleLocateSelectMerc( bID, LOCATEANDSELECT_MERC );
|
||||
// Center to guy....
|
||||
LocateSoldier( gusSelectedSoldier, SETLOCATOR );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//change stance ->UP
|
||||
if ( _KeyDown( ALT ) )
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{ //Select prev merc
|
||||
bID = FindPrevActiveAndAliveMerc( gusSelectedSoldier, TRUE, TRUE );
|
||||
HandleLocateSelectMerc( bID, LOCATEANDSELECT_MERC );
|
||||
// Center to guy....
|
||||
LocateSoldier( gusSelectedSoldier, SETLOCATOR );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//change stance ->UP
|
||||
if ( _KeyDown( ALT ) )
|
||||
{
|
||||
if ( (gusSelectedSoldier != NOBODY) && ( gpItemPointer == NULL ) )
|
||||
GotoHeigherStance( gusSelectedSoldier );
|
||||
GotoHeigherStance( gusSelectedSoldier );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"wheel %d", gViewportRegion.WheelState);
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{ //Select next merc
|
||||
bID = FindNextMercInTeamPanel( gusSelectedSoldier, FALSE, FALSE );
|
||||
HandleLocateSelectMerc( bID, LOCATEANDSELECT_MERC );
|
||||
// Center to guy....
|
||||
LocateSoldier( gusSelectedSoldier, SETLOCATOR );
|
||||
}
|
||||
}
|
||||
//*puiNewEvent = M_ON_TERRAIN; ????????????????
|
||||
}
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"wheel %d", gViewportRegion.WheelState);
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{ //Select next merc
|
||||
bID = FindNextMercInTeamPanel( gusSelectedSoldier, FALSE, FALSE );
|
||||
HandleLocateSelectMerc( bID, LOCATEANDSELECT_MERC );
|
||||
// Center to guy....
|
||||
LocateSoldier( gusSelectedSoldier, SETLOCATOR );
|
||||
}
|
||||
}
|
||||
//*puiNewEvent = M_ON_TERRAIN; ????????????????
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HandleMouseRTMButton( UINT32 *puiNewEvent )
|
||||
{
|
||||
if ( _KeyDown( ALT ) )
|
||||
@@ -2078,6 +2080,8 @@ void HandleMouseRTMButton( UINT32 *puiNewEvent )
|
||||
else
|
||||
*puiNewEvent = LC_LOOK;
|
||||
}
|
||||
|
||||
|
||||
void HandleMouseRTX1Button( UINT32 *puiNewEvent )
|
||||
{
|
||||
if ( !_KeyDown( ALT ) && !_KeyDown( SHIFT ))
|
||||
|
||||
@@ -379,17 +379,17 @@ BOOLEAN gfPerformTransactionInProgress = FALSE;
|
||||
|
||||
BOOLEAN gfCommonQuoteUsedThisSession[ NUM_COMMON_SK_QUOTES ];
|
||||
|
||||
extern SOLDIERTYPE *gpSMCurrentMerc;
|
||||
extern SOLDIERTYPE *gpItemDescSoldier;
|
||||
extern SOLDIERTYPE *gpSMCurrentMerc;
|
||||
extern SOLDIERTYPE *gpItemDescSoldier;
|
||||
extern MOUSE_REGION gItemDescAttachmentRegions[MAX_ATTACHMENTS];
|
||||
extern MOUSE_REGION gInvDesc;
|
||||
extern BOOLEAN gfSMDisableForItems;
|
||||
extern OBJECTTYPE *gpItemDescObject;
|
||||
extern OBJECTTYPE *gpItemDescPrevObject;
|
||||
extern OBJECTTYPE *gpItemDescPrevObject;
|
||||
extern void HandleShortCutExitState( void );
|
||||
extern UINT16 gubSelectSMPanelToMerc;
|
||||
extern INT32 giItemDescAmmoButton;
|
||||
extern BOOLEAN gfSMDisableForItems;
|
||||
extern OBJECTTYPE *gpItemDescObject;
|
||||
extern OBJECTTYPE *gpItemDescPrevObject;
|
||||
extern OBJECTTYPE *gpItemDescPrevObject;
|
||||
extern void HandleShortCutExitState( void );
|
||||
extern SoldierID gubSelectSMPanelToMerc;
|
||||
extern INT32 giItemDescAmmoButton;
|
||||
|
||||
extern BOOLEAN BltVSurfaceUsingDD( HVSURFACE hDestVSurface, HVSURFACE hSrcVSurface, UINT32 fBltFlags, INT32 iDestX, INT32 iDestY, RECT *SrcRect );
|
||||
|
||||
@@ -1686,16 +1686,13 @@ void GetShopKeeperInterfaceUserInput()
|
||||
|
||||
case SPACE:
|
||||
{
|
||||
UINT8 ubID;
|
||||
|
||||
DeleteItemDescriptionBox( );
|
||||
|
||||
// skip Robot and EPCs
|
||||
ubID = FindNextActiveAndAliveMerc( gpSMCurrentMerc, FALSE, TRUE );
|
||||
|
||||
SoldierID ubID = FindNextActiveAndAliveMerc( gpSMCurrentMerc, FALSE, TRUE );
|
||||
gubSelectSMPanelToMerc = ubID;
|
||||
|
||||
LocateSoldier( ubID, DONTSETLOCATOR );
|
||||
|
||||
// refresh background for player slots (in case item values change due to Flo's discount)
|
||||
gubSkiDirtyLevel = SKI_DIRTY_LEVEL2;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ extern void PlaySoldierFootstepSound( SOLDIERTYPE *pSoldier );
|
||||
extern UINT16 NumCapableEnemyInSector( );
|
||||
extern BOOLEAN gfKillingGuysForLosingBattle;
|
||||
|
||||
extern UINT16 gubInterruptProvoker;
|
||||
extern SoldierID gubInterruptProvoker;
|
||||
|
||||
extern UINT16 PickSoldierReadyAnimation( SOLDIERTYPE *pSoldier, BOOLEAN fEndReady, BOOLEAN fHipStance );
|
||||
|
||||
|
||||
+1
-3
@@ -1327,8 +1327,6 @@ void RebuildSquad( INT8 bSquadValue )
|
||||
|
||||
void UpdateCurrentlySelectedMerc( SOLDIERTYPE *pSoldier, INT8 bSquadValue )
|
||||
{
|
||||
UINT16 ubID;
|
||||
|
||||
// if this squad is the current one and and the psoldier is the currently selected soldier, get rid of 'em
|
||||
if( bSquadValue != iCurrentTacticalSquad )
|
||||
{
|
||||
@@ -1338,7 +1336,7 @@ void UpdateCurrentlySelectedMerc( SOLDIERTYPE *pSoldier, INT8 bSquadValue )
|
||||
// Are we the selected guy?
|
||||
if( gusSelectedSoldier == pSoldier->ubID )
|
||||
{
|
||||
ubID = FindNextActiveAndAliveMerc( pSoldier, FALSE, FALSE );
|
||||
SoldierID ubID = FindNextActiveAndAliveMerc( pSoldier, FALSE, FALSE );
|
||||
|
||||
if ( ubID != NOBODY && ubID != gusSelectedSoldier )
|
||||
{
|
||||
|
||||
+44
-45
@@ -87,7 +87,7 @@ void HandleManNoLongerSeen( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent, INT
|
||||
// The_Bob - real time sneaking code 01/06/09
|
||||
extern void CancelItemPointer(void);
|
||||
extern BOOLEAN NobodyAlerted(void);
|
||||
extern void ShowRadioLocator( UINT16 ubID, UINT8 ubLocatorSpeed );
|
||||
extern void ShowRadioLocator( SoldierID ubID, UINT8 ubLocatorSpeed );
|
||||
//#define TESTOPPLIST
|
||||
|
||||
// for ManSeesMan()
|
||||
@@ -116,7 +116,7 @@ BOOLEAN gfMikeShouldSayHi = FALSE;
|
||||
BOOLEAN gfMorrisShouldSayHi = FALSE;
|
||||
#endif
|
||||
|
||||
UINT16 gubBestToMakeSighting[BEST_SIGHTING_ARRAY_SIZE];
|
||||
SoldierID gubBestToMakeSighting[BEST_SIGHTING_ARRAY_SIZE];
|
||||
UINT8 gubBestToMakeSightingSize = 0;
|
||||
//BOOLEAN gfHumanSawSomeoneInRealtime;
|
||||
|
||||
@@ -124,11 +124,11 @@ BOOLEAN gfDelayResolvingBestSightingDueToDoor = FALSE;
|
||||
|
||||
#define SHOULD_BECOME_HOSTILE_SIZE 32
|
||||
|
||||
UINT16 gubShouldBecomeHostileOrSayQuote[ SHOULD_BECOME_HOSTILE_SIZE ];
|
||||
SoldierID gubShouldBecomeHostileOrSayQuote[ SHOULD_BECOME_HOSTILE_SIZE ];
|
||||
UINT8 gubNumShouldBecomeHostileOrSayQuote;
|
||||
|
||||
// NB this ID is set for someone opening a door
|
||||
UINT16 gubInterruptProvoker = NOBODY;
|
||||
SoldierID gubInterruptProvoker = NOBODY;
|
||||
|
||||
INT8 gbPublicOpplist[MAXTEAMS][TOTAL_SOLDIERS];
|
||||
INT8 gbSeenOpponents[TOTAL_SOLDIERS][TOTAL_SOLDIERS];
|
||||
@@ -356,9 +356,8 @@ INT16 AdjustMaxSightRangeForEnvEffects( SOLDIERTYPE *pSoldier, INT8 bLightLevel,
|
||||
|
||||
void SwapBestSightingPositions( INT8 bPos1, INT8 bPos2 )
|
||||
{
|
||||
UINT16 ubTemp;
|
||||
SoldierID ubTemp = gubBestToMakeSighting[ bPos1 ];
|
||||
|
||||
ubTemp = gubBestToMakeSighting[ bPos1 ];
|
||||
gubBestToMakeSighting[ bPos1 ] = gubBestToMakeSighting[ bPos2 ];
|
||||
gubBestToMakeSighting[ bPos2 ] = ubTemp;
|
||||
}
|
||||
@@ -406,7 +405,7 @@ void ReevaluateBestSightingPosition( SOLDIERTYPE * pSoldier, INT8 bInterruptDuel
|
||||
// must percolate him down
|
||||
for ( ubLoop2 = ubLoop + 1; ubLoop2 < gubBestToMakeSightingSize; ubLoop2++ )
|
||||
{
|
||||
if ( gubBestToMakeSighting[ ubLoop2 ] != NOBODY && MercPtrs[ gubBestToMakeSighting[ ubLoop2 - 1 ] ]->aiData.bInterruptDuelPts < MercPtrs[ gubBestToMakeSighting[ ubLoop2 ] ]->aiData.bInterruptDuelPts )
|
||||
if ( gubBestToMakeSighting[ ubLoop2 ] != NOBODY && gubBestToMakeSighting[ ubLoop2 - 1 ]->aiData.bInterruptDuelPts < gubBestToMakeSighting[ ubLoop2 ]->aiData.bInterruptDuelPts )
|
||||
{
|
||||
SwapBestSightingPositions( (UINT8) (ubLoop2 - 1), ubLoop2 );
|
||||
}
|
||||
@@ -439,11 +438,11 @@ void ReevaluateBestSightingPosition( SOLDIERTYPE * pSoldier, INT8 bInterruptDuel
|
||||
{
|
||||
for ( ubLoop = 0; ubLoop < gubBestToMakeSightingSize; ubLoop++ )
|
||||
{
|
||||
if ( pSoldier->RecognizeAsCombatant(gubBestToMakeSighting[ ubLoop ]) && (gubBestToMakeSighting[ ubLoop ] == NOBODY) || ( gubBestToMakeSighting[ ubLoop ] != NOBODY && bInterruptDuelPts > MercPtrs[ gubBestToMakeSighting[ ubLoop ] ]->aiData.bInterruptDuelPts ) )
|
||||
if ( pSoldier->RecognizeAsCombatant(gubBestToMakeSighting[ ubLoop ]) && (gubBestToMakeSighting[ ubLoop ] == NOBODY) || ( gubBestToMakeSighting[ ubLoop ] != NOBODY && bInterruptDuelPts > gubBestToMakeSighting[ ubLoop ]->aiData.bInterruptDuelPts ) )
|
||||
{
|
||||
if ( gubBestToMakeSighting[ gubBestToMakeSightingSize - 1 ] != NOBODY )
|
||||
{
|
||||
MercPtrs[ gubBestToMakeSighting[ gubBestToMakeSightingSize - 1 ] ]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
gubBestToMakeSighting[ gubBestToMakeSightingSize - 1 ]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP: resetting points for %d to zilch", pSoldier->ubID ) );
|
||||
}
|
||||
|
||||
@@ -468,7 +467,7 @@ void ReevaluateBestSightingPosition( SOLDIERTYPE * pSoldier, INT8 bInterruptDuel
|
||||
{
|
||||
if ( (gubBestToMakeSighting[ ubLoop ] != NOBODY) )
|
||||
{
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP entry %d: %d (%d pts)", ubLoop, gubBestToMakeSighting[ ubLoop ], MercPtrs[ gubBestToMakeSighting[ ubLoop ] ]->aiData.bInterruptDuelPts ) );
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP entry %d: %d (%d pts)", ubLoop, gubBestToMakeSighting[ ubLoop ], gubBestToMakeSighting[ ubLoop ]->aiData.bInterruptDuelPts ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,52 +502,51 @@ void HandleBestSightingPositionInRealtime( void )
|
||||
{ // The_Bob - real time sneaking code 01/06/09
|
||||
// if real time sneaking conditions are met...
|
||||
// this is now in the preferences window - SANDRO
|
||||
if (gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] && MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam == OUR_TEAM && NobodyAlerted() )
|
||||
if (gGameSettings.fOptions[TOPTION_ALLOW_REAL_TIME_SNEAK] && gubBestToMakeSighting[ 0 ]->bTeam == OUR_TEAM && NobodyAlerted() )
|
||||
{
|
||||
// get rid of the item under cursor (we gotta react FAST)
|
||||
CancelItemPointer();
|
||||
// select (and center screen on) the merc who saw the enemy
|
||||
// HEADROCK HAM 3.6: A much-requested toggle.
|
||||
if (gusSelectedSoldier != MercPtrs[gubBestToMakeSighting[ 0 ]]->ubID &&
|
||||
!gGameExternalOptions.fNoAutoFocusChangeInRealtimeSneak)
|
||||
SelectSoldier (MercPtrs[gubBestToMakeSighting[ 0 ]]->ubID, false, true);
|
||||
if (gusSelectedSoldier != gubBestToMakeSighting[ 0 ]->ubID && !gGameExternalOptions.fNoAutoFocusChangeInRealtimeSneak)
|
||||
SelectSoldier(gubBestToMakeSighting[ 0 ]->ubID, false, true);
|
||||
// if not quiet, emit a message warning the player
|
||||
if (!gGameExternalOptions.fQuietRealTimeSneak)
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_RTM_ENEMIES_SPOOTED]);
|
||||
|
||||
return; // and do nothing
|
||||
}
|
||||
else if ( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam != OUR_TEAM && MercPtrs[gubBestToMakeSighting[ 0 ]]->aiData.bOppCnt > 0 )
|
||||
else if ( gubBestToMakeSighting[ 0 ]->bTeam != OUR_TEAM && gubBestToMakeSighting[ 0 ]->aiData.bOppCnt > 0 )
|
||||
{
|
||||
// otherwise, simply award the turn to the team that saw the enemy first
|
||||
EnterCombatMode( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam );
|
||||
EnterCombatMode( gubBestToMakeSighting[ 0 ]->bTeam );
|
||||
}
|
||||
else
|
||||
// otherwise, simply award the turn to the team that saw the enemy first
|
||||
EnterCombatMode( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam );
|
||||
EnterCombatMode( gubBestToMakeSighting[ 0 ]->bTeam );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
// if 1st and 2nd on same team, or 1st and 3rd on same team, or there IS no 3rd, award turn to 1st
|
||||
if ( /*MercPtrs[gubBestToMakeSighting[ 0 ]]->aiData.bOppCnt > 0 &&*/ ( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam == MercPtrs[gubBestToMakeSighting[ 1 ]]->bTeam ) ||
|
||||
( (gubBestToMakeSighting[ 2 ] == NOBODY) || ( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam == MercPtrs[gubBestToMakeSighting[ 2 ]]->bTeam ) )
|
||||
if ( /*gubBestToMakeSighting[ 0 ]->aiData.bOppCnt > 0 &&*/ ( gubBestToMakeSighting[ 0 ]->bTeam == gubBestToMakeSighting[ 1 ]->bTeam ) ||
|
||||
( (gubBestToMakeSighting[ 2 ] == NOBODY) || ( gubBestToMakeSighting[ 0 ]->bTeam == gubBestToMakeSighting[ 2 ]->bTeam ) )
|
||||
)
|
||||
{
|
||||
EnterCombatMode( MercPtrs[gubBestToMakeSighting[ 0 ]]->bTeam );
|
||||
EnterCombatMode( gubBestToMakeSighting[ 0 ]->bTeam );
|
||||
}
|
||||
else //if ( MercPtrs[gubBestToMakeSighting[ 1 ]]->aiData.bOppCnt > 0 ) // give turn to 2nd best but interrupt to 1st
|
||||
else //if ( gubBestToMakeSighting[ 1 ]->aiData.bOppCnt > 0 ) // give turn to 2nd best but interrupt to 1st
|
||||
{
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "Entering combat mode: turn for 2nd best, int for best" );
|
||||
|
||||
EnterCombatMode( MercPtrs[gubBestToMakeSighting[ 1 ]]->bTeam );
|
||||
EnterCombatMode( gubBestToMakeSighting[ 1 ]->bTeam );
|
||||
// 2nd guy loses control
|
||||
AddToIntList( gubBestToMakeSighting[ 1 ], FALSE, TRUE);
|
||||
// 1st guy gains control
|
||||
AddToIntList( gubBestToMakeSighting[ 0 ], TRUE, TRUE);
|
||||
// done
|
||||
DoneAddingToIntList( MercPtrs[gubBestToMakeSighting[ 0 ]], TRUE, SIGHTINTERRUPT );
|
||||
DoneAddingToIntList( gubBestToMakeSighting[ 0 ], TRUE, SIGHTINTERRUPT );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -557,8 +555,8 @@ void HandleBestSightingPositionInRealtime( void )
|
||||
{
|
||||
if ( gubBestToMakeSighting[ ubLoop ] != NOBODY )
|
||||
{
|
||||
MercPtrs[ gubBestToMakeSighting[ ubLoop ]]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP: done, resetting points for %d to zilch", MercPtrs[ gubBestToMakeSighting[ ubLoop ] ]->ubID ) );
|
||||
gubBestToMakeSighting[ ubLoop ]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP: done, resetting points for %d to zilch", gubBestToMakeSighting[ ubLoop ]->ubID ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,7 +581,7 @@ void HandleBestSightingPositionInTurnbased( void )
|
||||
|
||||
if ( gubBestToMakeSighting[ 0 ] != NOBODY )
|
||||
{
|
||||
if ( MercPtrs[ gubBestToMakeSighting[ 0 ] ]->bTeam != gTacticalStatus.ubCurrentTeam )
|
||||
if ( gubBestToMakeSighting[ 0 ]->bTeam != gTacticalStatus.ubCurrentTeam )
|
||||
{
|
||||
|
||||
// interrupt!
|
||||
@@ -605,7 +603,7 @@ void HandleBestSightingPositionInTurnbased( void )
|
||||
}
|
||||
|
||||
}
|
||||
else if ( MercPtrs[ gubBestToMakeSighting[ ubLoop ] ]->bTeam == gTacticalStatus.ubCurrentTeam )
|
||||
else if ( gubBestToMakeSighting[ ubLoop ]->bTeam == gTacticalStatus.ubCurrentTeam )
|
||||
{
|
||||
fOk = TRUE;
|
||||
break;
|
||||
@@ -621,7 +619,7 @@ void HandleBestSightingPositionInTurnbased( void )
|
||||
AddToIntList( gubBestToMakeSighting[ ubLoop2 ], TRUE, TRUE);
|
||||
}
|
||||
// done
|
||||
DoneAddingToIntList( MercPtrs[ gubBestToMakeSighting[ ubLoop ] ], TRUE, SIGHTINTERRUPT );
|
||||
DoneAddingToIntList( gubBestToMakeSighting[ ubLoop ], TRUE, SIGHTINTERRUPT );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -629,8 +627,8 @@ void HandleBestSightingPositionInTurnbased( void )
|
||||
{
|
||||
if ( gubBestToMakeSighting[ ubLoop ] != NOBODY )
|
||||
{
|
||||
MercPtrs[ gubBestToMakeSighting[ ubLoop ]]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP (TB): done, resetting points for %d to zilch", MercPtrs[ gubBestToMakeSighting[ ubLoop ] ]->ubID ) );
|
||||
gubBestToMakeSighting[ ubLoop ]->aiData.bInterruptDuelPts = NO_INTERRUPT;
|
||||
DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "RBSP (TB): done, resetting points for %d to zilch", gubBestToMakeSighting[ ubLoop ]->ubID ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,13 +670,13 @@ void InitSightArrays( void )
|
||||
}
|
||||
}
|
||||
|
||||
void AddToShouldBecomeHostileOrSayQuoteList( UINT16 ubID )
|
||||
void AddToShouldBecomeHostileOrSayQuoteList( SoldierID ubID )
|
||||
{
|
||||
UINT16 ubLoop;
|
||||
|
||||
Assert( gubNumShouldBecomeHostileOrSayQuote < SHOULD_BECOME_HOSTILE_SIZE );
|
||||
|
||||
if ( MercPtrs[ ubID ]->stats.bLife < OKLIFE )
|
||||
if ( ubID->stats.bLife < OKLIFE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -696,15 +694,15 @@ void AddToShouldBecomeHostileOrSayQuoteList( UINT16 ubID )
|
||||
gubNumShouldBecomeHostileOrSayQuote++;
|
||||
}
|
||||
|
||||
UINT16 SelectSpeakerFromHostileOrSayQuoteList( void )
|
||||
SoldierID SelectSpeakerFromHostileOrSayQuoteList( void )
|
||||
{
|
||||
UINT16 ubProfileList[ SHOULD_BECOME_HOSTILE_SIZE ]; // NB list of merc IDs, not profiles!
|
||||
SoldierID IDList[ SHOULD_BECOME_HOSTILE_SIZE ];
|
||||
UINT8 ubLoop, ubNumProfiles = 0;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
|
||||
for ( ubLoop = 0; ubLoop < gubNumShouldBecomeHostileOrSayQuote; ubLoop++ )
|
||||
{
|
||||
pSoldier = MercPtrs[ gubShouldBecomeHostileOrSayQuote[ ubLoop ] ];
|
||||
pSoldier = gubShouldBecomeHostileOrSayQuote[ ubLoop ];
|
||||
if ( pSoldier->ubProfile != NO_PROFILE )
|
||||
{
|
||||
|
||||
@@ -713,7 +711,7 @@ UINT16 SelectSpeakerFromHostileOrSayQuoteList( void )
|
||||
|
||||
if ( NPCHasUnusedHostileRecord( pSoldier->ubProfile, APPROACH_DECLARATION_OF_HOSTILITY ) )
|
||||
{
|
||||
ubProfileList[ ubNumProfiles ] = gubShouldBecomeHostileOrSayQuote[ ubLoop ];
|
||||
IDList[ ubNumProfiles ] = gubShouldBecomeHostileOrSayQuote[ ubLoop ];
|
||||
ubNumProfiles++;
|
||||
}
|
||||
else
|
||||
@@ -731,7 +729,7 @@ UINT16 SelectSpeakerFromHostileOrSayQuoteList( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
return( ubProfileList[ Random( ubNumProfiles ) ] );
|
||||
return(IDList[ Random( ubNumProfiles ) ] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -745,7 +743,8 @@ void CheckHostileOrSayQuoteList( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT16 ubSpeaker, ubLoop;
|
||||
SoldierID ubSpeaker;
|
||||
UINT16 ubLoop;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
|
||||
ubSpeaker = SelectSpeakerFromHostileOrSayQuoteList();
|
||||
@@ -754,7 +753,7 @@ void CheckHostileOrSayQuoteList( void )
|
||||
// make sure everyone on this list is hostile
|
||||
for ( ubLoop = 0; ubLoop < gubNumShouldBecomeHostileOrSayQuote; ubLoop++ )
|
||||
{
|
||||
pSoldier = MercPtrs[ gubShouldBecomeHostileOrSayQuote[ ubLoop ] ];
|
||||
pSoldier = gubShouldBecomeHostileOrSayQuote[ ubLoop ];
|
||||
if ( pSoldier->aiData.bNeutral )
|
||||
{
|
||||
MakeCivHostile(pSoldier);
|
||||
@@ -789,13 +788,13 @@ void CheckHostileOrSayQuoteList( void )
|
||||
// stop everyone?
|
||||
|
||||
// We want to make this guy visible to the player.
|
||||
if ( MercPtrs[ ubSpeaker ]->bVisible != TRUE )
|
||||
if ( ubSpeaker->bVisible != TRUE )
|
||||
{
|
||||
gbPublicOpplist[ gbPlayerNum ][ ubSpeaker ] = HEARD_THIS_TURN;
|
||||
HandleSight( MercPtrs[ ubSpeaker ], SIGHT_LOOK | SIGHT_RADIO );
|
||||
HandleSight( ubSpeaker, SIGHT_LOOK | SIGHT_RADIO );
|
||||
}
|
||||
// trigger hater
|
||||
TriggerNPCWithIHateYouQuote( MercPtrs[ ubSpeaker ]->ubProfile );
|
||||
TriggerNPCWithIHateYouQuote( ubSpeaker->ubProfile );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1743,8 +1742,8 @@ void AllTeamsLookForAll(UINT8 ubAllowInterrupts)
|
||||
InterruptsAllowed = TRUE;
|
||||
*/
|
||||
|
||||
// reset interrupt only guynum which may have been used
|
||||
gubInterruptProvoker = NOBODY;
|
||||
// reset interrupt only guynum which may have been used
|
||||
gubInterruptProvoker = NOBODY;
|
||||
}
|
||||
|
||||
|
||||
@@ -5528,7 +5527,7 @@ UINT8 DoorOpeningNoise( SOLDIERTYPE *pSoldier )
|
||||
return( ubDoorNoise );
|
||||
}
|
||||
|
||||
void MakeNoise(UINT16 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrType, UINT8 ubVolume, UINT8 ubNoiseType, STR16 zNoiseMessage )
|
||||
void MakeNoise(SoldierID ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrType, UINT8 ubVolume, UINT8 ubNoiseType, STR16 zNoiseMessage )
|
||||
{
|
||||
EV_S_NOISE SNoise;
|
||||
|
||||
|
||||
+2
-2
@@ -139,7 +139,7 @@ void DebugSoldierPage4( );
|
||||
|
||||
UINT8 MovementNoise( SOLDIERTYPE *pSoldier );
|
||||
UINT8 DoorOpeningNoise( SOLDIERTYPE *pSoldier );
|
||||
void MakeNoise(UINT16 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrType, UINT8 ubVolume, UINT8 ubNoiseType, STR16 zNoiseMessage = NULL );
|
||||
void MakeNoise(SoldierID ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrType, UINT8 ubVolume, UINT8 ubNoiseType, STR16 zNoiseMessage = NULL );
|
||||
void OurNoise( UINT16 ubNoiseMaker, INT32 sGridNo, INT8 bLevel, UINT8 ubTerrType, UINT8 ubVolume, UINT8 ubNoiseType, STR16 zNoiseMessage = NULL );
|
||||
|
||||
void ResolveInterruptsVs( SOLDIERTYPE * pSoldier, UINT8 ubInterruptType);
|
||||
@@ -164,7 +164,7 @@ void CheckHostileOrSayQuoteList( void );
|
||||
void InitOpplistForDoorOpening( void );
|
||||
UINT8 DoorOpeningNoise( SOLDIERTYPE * pSoldier );
|
||||
|
||||
void AddToShouldBecomeHostileOrSayQuoteList( UINT16 ubID );
|
||||
void AddToShouldBecomeHostileOrSayQuoteList( SoldierID ubID );
|
||||
|
||||
//extern INT8 gbLightSighting[1][16];
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
void MakeClosestEnemyChosenOne()
|
||||
{
|
||||
UINT32 cnt;
|
||||
INT16 sPathCost, sShortestPath = 1000;
|
||||
INT8 bOldKeys = -1;
|
||||
UINT16 ubClosestEnemy = NOBODY;
|
||||
UINT32 cnt;
|
||||
INT16 sPathCost, sShortestPath = 1000;
|
||||
INT8 bOldKeys = -1;
|
||||
SoldierID ubClosestEnemy = NOBODY;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
INT8 bPanicTrigger;
|
||||
INT32 sPanicTriggerGridNo;
|
||||
INT8 bPanicTrigger;
|
||||
INT32 sPanicTriggerGridNo;
|
||||
|
||||
if ( ! (gTacticalStatus.fPanicFlags & PANIC_TRIGGERS_HERE) )
|
||||
{
|
||||
@@ -162,7 +162,7 @@ void MakeClosestEnemyChosenOne()
|
||||
NumMessage("TEST MSG: The chosen one is ",TheChosenOne);
|
||||
#endif
|
||||
|
||||
pSoldier = MercPtrs[gTacticalStatus.ubTheChosenOne];
|
||||
pSoldier = gTacticalStatus.ubTheChosenOne;
|
||||
if ( pSoldier->aiData.bAlertStatus < STATUS_RED )
|
||||
{
|
||||
pSoldier->aiData.bAlertStatus = STATUS_RED;
|
||||
|
||||
@@ -172,15 +172,15 @@ EXPLOSION_DATA gExpAniData[ NUM_EXP_TYPES ] =
|
||||
|
||||
#define MAX_BOMB_QUEUE 40
|
||||
ExplosionQueueElement gExplosionQueue[MAX_BOMB_QUEUE];
|
||||
UINT8 gubElementsOnExplosionQueue = 0;
|
||||
BOOLEAN gfExplosionQueueActive = FALSE;
|
||||
UINT8 gubElementsOnExplosionQueue = 0;
|
||||
BOOLEAN gfExplosionQueueActive = FALSE;
|
||||
|
||||
BOOLEAN gfExplosionQueueMayHaveChangedSight = FALSE;
|
||||
UINT16 gubPersonToSetOffExplosions = NOBODY;
|
||||
BOOLEAN gfExplosionQueueMayHaveChangedSight = FALSE;
|
||||
SoldierID gubPersonToSetOffExplosions = NOBODY;
|
||||
|
||||
INT32 gsTempActionGridNo = NOWHERE;
|
||||
|
||||
extern UINT16 gubInterruptProvoker;
|
||||
extern SoldierID gubInterruptProvoker;
|
||||
|
||||
#define NUM_EXPLOSION_SLOTS 100
|
||||
|
||||
@@ -245,7 +245,7 @@ void RecountExplosions( void )
|
||||
extern void HandleLoyaltyForDemolitionOfBuilding( SOLDIERTYPE *pSoldier, INT16 sPointsDmg );
|
||||
|
||||
// GENERATE EXPLOSION
|
||||
void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, BOOLEAN fLocate, INT8 bLevel, UINT8 ubDirection, OBJECTTYPE * pObj )
|
||||
void InternalIgniteExplosion( SoldierID ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, BOOLEAN fLocate, INT8 bLevel, UINT8 ubDirection, OBJECTTYPE * pObj )
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
if (is_networked) {
|
||||
@@ -273,7 +273,7 @@ void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT3
|
||||
// Let's check for the attacker first.
|
||||
if ( ubOwner != NOBODY )
|
||||
{
|
||||
OBJECTTYPE* pUsedGun = MercPtrs[ ubOwner ]->GetUsedWeapon( &MercPtrs [ ubOwner ]->inv[MercPtrs[ubOwner]->ubAttackingHand] );
|
||||
OBJECTTYPE* pUsedGun = ubOwner->GetUsedWeapon( &( ubOwner->inv[ ubOwner->ubAttackingHand ] ) );
|
||||
|
||||
ammotype = (*pUsedGun)[0]->data.gun.ubGunAmmoType;
|
||||
|
||||
@@ -283,7 +283,7 @@ void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT3
|
||||
}
|
||||
|
||||
// Flugente: campaign stats
|
||||
if ( MercPtrs[ ubOwner ]->bTeam == OUR_TEAM )
|
||||
if ( ubOwner->bTeam == OUR_TEAM )
|
||||
{
|
||||
if ( Item[ usItem ].usItemClass & IC_EXPLOSV )
|
||||
gCampaignStats.AddConsumption(CAMPAIGN_CONSUMED_EXPLOSIVES, (FLOAT)(Item[usItem].ubWeight) );
|
||||
@@ -344,7 +344,7 @@ void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT3
|
||||
UINT16 tmp;
|
||||
if ( Item[ usItem ].usItemClass & IC_EXPLOSV && ubOwner != NOBODY && ubOwner < NUM_PROFILES && InARoom( sGridNo, &tmp ) )
|
||||
{
|
||||
HandleLoyaltyForDemolitionOfBuilding( MercPtrs[ubOwner], Explosive[ Item[ usItem ].ubClassIndex ].ubDamage );
|
||||
HandleLoyaltyForDemolitionOfBuilding( ubOwner, Explosive[ Item[ usItem ].ubClassIndex ].ubDamage );
|
||||
|
||||
// Flugente: campaign stats
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_BUILDINGS_DAMAGED;
|
||||
@@ -386,7 +386,7 @@ void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT3
|
||||
}
|
||||
|
||||
|
||||
void IgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubDirection, OBJECTTYPE * pObj )
|
||||
void IgniteExplosion( SoldierID ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubDirection, OBJECTTYPE * pObj )
|
||||
{
|
||||
InternalIgniteExplosion( ubOwner, sX, sY, sZ, sGridNo, usItem, TRUE, bLevel, ubDirection, pObj );
|
||||
}
|
||||
@@ -1898,7 +1898,7 @@ BOOLEAN DamageSoldierFromBlast( UINT16 ubPerson, UINT16 ubOwner, INT32 sBombGrid
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, UINT16 ubOwner, BOOL fFromRemoteClient )
|
||||
BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, SoldierID ubOwner, BOOL fFromRemoteClient )
|
||||
{
|
||||
// OJW - 20091028
|
||||
if (is_networked && is_client)
|
||||
@@ -1916,7 +1916,7 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
||||
}
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"DishOutGasDamage ( ubSoldierID : %i , ubExplosiveType : %i , sSubsequent : %i , recompileMoveCosts : %i , sWoundAmt : %i , sBreathAmt : %i , ubOwner : %i , fRemote : %i)\n", pSoldier->ubID , pExplosive->ubType , sSubsequent , fRecompileMovementCosts , sWoundAmt , sBreathAmt , ubOwner , fFromRemoteClient );
|
||||
sprintf(tmpMPDbgString,"DishOutGasDamage ( ubSoldierID : %i , ubExplosiveType : %i , sSubsequent : %i , recompileMoveCosts : %i , sWoundAmt : %i , sBreathAmt : %i , ubOwner : %i , fRemote : %i)\n", pSoldier->ubID.i , pExplosive->ubType , sSubsequent , fRecompileMovementCosts , sWoundAmt , sBreathAmt , ubOwner.i , fFromRemoteClient );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
#endif
|
||||
}
|
||||
@@ -2155,9 +2155,9 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
||||
pSoldier->DoMercBattleSound( BATTLE_SOUND_HIT1 );
|
||||
}
|
||||
|
||||
if ( ubOwner != NOBODY && MercPtrs[ ubOwner ]->bTeam == gbPlayerNum && pSoldier->bTeam != gbPlayerNum )
|
||||
if ( ubOwner != NOBODY && ubOwner->bTeam == gbPlayerNum && pSoldier->bTeam != gbPlayerNum )
|
||||
{
|
||||
ProcessImplicationsOfPCAttack( MercPtrs[ ubOwner ], &pSoldier, REASON_EXPLOSION );
|
||||
ProcessImplicationsOfPCAttack( ubOwner, &pSoldier, REASON_EXPLOSION );
|
||||
}
|
||||
}
|
||||
return( fRecompileMovementCosts );
|
||||
@@ -3800,7 +3800,7 @@ void AddBombToQueue( UINT32 uiWorldBombIndex, UINT32 uiTimeStamp, BOOL fFromRemo
|
||||
if (soldierID == NOBODY)
|
||||
soldierID = wi.object[0]->data.misc.ubBombOwner - 2; // undo the hack
|
||||
|
||||
if (IsOurSoldier(gubPersonToSetOffExplosions) || IsOurSoldier((SOLDIERTYPE*)soldierID))
|
||||
if (IsOurSoldier((SOLDIERTYPE*)gubPersonToSetOffExplosions) || IsOurSoldier((SOLDIERTYPE*)soldierID))
|
||||
{
|
||||
// we set off the bomb (could be failed disarm) or we own it, tell the other clients we are setting it off
|
||||
send_detonate_explosive(iWorldIndex,gubPersonToSetOffExplosions);
|
||||
@@ -3827,7 +3827,7 @@ void AddBombToQueue( UINT32 uiWorldBombIndex, UINT32 uiTimeStamp, BOOL fFromRemo
|
||||
}
|
||||
|
||||
// Flugente: activate everything connected to a tripwire in the surrounding if sGridNo on level bLevel with regard to the tripwire netwrok and hierarchy determined by ubFlag
|
||||
BOOLEAN ActivateSurroundingTripwire( UINT16 ubID, INT32 sGridNo, INT8 bLevel, UINT32 ubFlag )
|
||||
BOOLEAN ActivateSurroundingTripwire( SoldierID ubID, INT32 sGridNo, INT8 bLevel, UINT32 ubFlag )
|
||||
{
|
||||
UINT32 uiTimeStamp= GetJA2Clock();
|
||||
BOOLEAN fFoundMine = FALSE;
|
||||
@@ -4285,9 +4285,9 @@ void HandleExplosionQueue( void )
|
||||
// re-enable sight
|
||||
gTacticalStatus.uiFlags &= (~DISALLOW_SIGHT);
|
||||
|
||||
if ( gubPersonToSetOffExplosions != NOBODY && !(MercPtrs[ gubPersonToSetOffExplosions ]->flags.uiStatusFlags & SOLDIER_PC) )
|
||||
if ( gubPersonToSetOffExplosions != NOBODY && !(gubPersonToSetOffExplosions->flags.uiStatusFlags & SOLDIER_PC) )
|
||||
{
|
||||
FreeUpNPCFromPendingAction( MercPtrs[ gubPersonToSetOffExplosions ] );
|
||||
FreeUpNPCFromPendingAction( gubPersonToSetOffExplosions );
|
||||
}
|
||||
|
||||
if (gfExplosionQueueMayHaveChangedSight)
|
||||
@@ -4588,11 +4588,11 @@ void DecayBombTimers( void )
|
||||
// ATE: CC black magic....
|
||||
if ( (*pObj)[0]->data.misc.ubBombOwner > 1 )
|
||||
{
|
||||
gubPersonToSetOffExplosions = (UINT8) ((*pObj)[0]->data.misc.ubBombOwner - 2);
|
||||
gubPersonToSetOffExplosions = ((*pObj)[0]->data.misc.ubBombOwner - 2);
|
||||
// SANDRO - merc records - detonating explosives
|
||||
if ( MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile != NO_PROFILE && MercPtrs[ gubPersonToSetOffExplosions ]->bTeam == gbPlayerNum )
|
||||
if ( gubPersonToSetOffExplosions->ubProfile != NO_PROFILE && gubPersonToSetOffExplosions->bTeam == gbPlayerNum )
|
||||
{
|
||||
gMercProfiles[ MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile ].records.usExpDetonated++;
|
||||
gMercProfiles[ gubPersonToSetOffExplosions->ubProfile ].records.usExpDetonated++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4642,11 +4642,11 @@ void DecayBombTimers( void )
|
||||
// ATE: CC black magic....
|
||||
if ( (*pObj)[0]->data.misc.ubBombOwner > 1 )
|
||||
{
|
||||
gubPersonToSetOffExplosions = (UINT8) ((*pObj)[0]->data.misc.ubBombOwner - 2);
|
||||
gubPersonToSetOffExplosions = ((*pObj)[0]->data.misc.ubBombOwner - 2);
|
||||
// SANDRO - merc records - detonating explosives
|
||||
if ( MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile != NO_PROFILE && MercPtrs[ gubPersonToSetOffExplosions ]->bTeam == gbPlayerNum )
|
||||
if ( gubPersonToSetOffExplosions->ubProfile != NO_PROFILE && gubPersonToSetOffExplosions->bTeam == gbPlayerNum )
|
||||
{
|
||||
gMercProfiles[ MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile ].records.usExpDetonated++;
|
||||
gMercProfiles[ gubPersonToSetOffExplosions->ubProfile ].records.usExpDetonated++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4667,7 +4667,7 @@ void DecayBombTimers( void )
|
||||
}
|
||||
}
|
||||
|
||||
void SetOffBombsByFrequency( UINT16 ubID, INT8 bFrequency )
|
||||
void SetOffBombsByFrequency( SoldierID ubID, INT8 bFrequency )
|
||||
{
|
||||
UINT32 uiWorldBombIndex;
|
||||
UINT32 uiTimeStamp;
|
||||
@@ -4893,7 +4893,7 @@ void SetOffPanicBombs( UINT16 ubID, INT8 bPanicTrigger )
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN SetOffBombsInGridNo( UINT16 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8 bLevel )
|
||||
BOOLEAN SetOffBombsInGridNo( SoldierID ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8 bLevel )
|
||||
{
|
||||
UINT32 uiWorldBombIndex;
|
||||
UINT32 uiTimeStamp;
|
||||
@@ -4916,7 +4916,7 @@ BOOLEAN SetOffBombsInGridNo( UINT16 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8
|
||||
if ( !fAllBombs && ubID != NOBODY && ItemIsATMine(pObj->usItem))
|
||||
{
|
||||
// if this is not a vehicle, not a robot and not a tank, don't activate
|
||||
if ( !(MercPtrs[ubID]->flags.uiStatusFlags & SOLDIER_VEHICLE) && !AM_A_ROBOT( MercPtrs[ubID] ) && !ARMED_VEHICLE( MercPtrs[ubID] ) && !ENEMYROBOT( MercPtrs[ubID] ) )
|
||||
if ( !(ubID->flags.uiStatusFlags & SOLDIER_VEHICLE) && !AM_A_ROBOT( ubID ) && !ARMED_VEHICLE( ubID ) && !ENEMYROBOT( ubID ) )
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4977,7 +4977,7 @@ BOOLEAN SetOffBombsInGridNo( UINT16 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8
|
||||
|
||||
// SANDRO - merc records
|
||||
// only if we blew up somebody not in our team(no achievement for blowing our guys :)), only if owner exists and have profile
|
||||
if ( (MercPtrs[ubID]->bTeam != gbPlayerNum) && ((*pObj)[0]->data.misc.ubBombOwner > 1) )
|
||||
if ( (ubID->bTeam != gbPlayerNum) && ((*pObj)[0]->data.misc.ubBombOwner > 1) )
|
||||
{
|
||||
if ( MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->ubProfile != NO_PROFILE && MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->bTeam == gbPlayerNum )
|
||||
gMercProfiles[ MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->ubProfile ].records.usExpDetonated++;
|
||||
|
||||
@@ -100,8 +100,8 @@ extern EXPLOSIONTYPE gExplosionData[ NUM_EXPLOSION_SLOTS ];
|
||||
extern UINT8 gubElementsOnExplosionQueue;
|
||||
extern BOOLEAN gfExplosionQueueActive;
|
||||
|
||||
void IgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubDirection = DIRECTION_IRRELEVANT, OBJECTTYPE * pObj =NULL );
|
||||
void InternalIgniteExplosion( UINT16 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, BOOLEAN fLocate, INT8 bLevel, UINT8 ubDirection = DIRECTION_IRRELEVANT, OBJECTTYPE * pObj =NULL );
|
||||
void IgniteExplosion( SoldierID ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubDirection = DIRECTION_IRRELEVANT, OBJECTTYPE * pObj =NULL );
|
||||
void InternalIgniteExplosion( SoldierID ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32 sGridNo, UINT16 usItem, BOOLEAN fLocate, INT8 bLevel, UINT8 ubDirection = DIRECTION_IRRELEVANT, OBJECTTYPE * pObj =NULL );
|
||||
|
||||
|
||||
void GenerateExplosion( EXPLOSION_PARAMS *pExpParams );
|
||||
@@ -110,8 +110,8 @@ void GenerateExplosion( EXPLOSION_PARAMS *pExpParams );
|
||||
void HandleExplosionWarningAnimations( );
|
||||
|
||||
void DecayBombTimers( void );
|
||||
void SetOffBombsByFrequency( UINT16 ubID, INT8 bFrequency );
|
||||
BOOLEAN SetOffBombsInGridNo( UINT16 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8 bLevel );
|
||||
void SetOffBombsByFrequency( SoldierID ubID, INT8 bFrequency );
|
||||
BOOLEAN SetOffBombsInGridNo( SoldierID ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8 bLevel );
|
||||
void ActivateSwitchInGridNo( UINT16 ubID, INT32 sGridNo );
|
||||
void SetOffPanicBombs( UINT16 ubID, INT8 bPanicTrigger );
|
||||
|
||||
@@ -137,12 +137,12 @@ void RemoveActiveExplosionMarkers();
|
||||
|
||||
// OJW - 20091028 - Explosion damage sync
|
||||
BOOLEAN DamageSoldierFromBlast( UINT16 ubPerson, UINT16 ubOwner, INT32 sBombGridNo, INT16 sWoundAmt, INT16 sBreathAmt, UINT32 uiDist, UINT16 usItem, INT16 sSubsequent, BOOL fFromRemoteClient = FALSE );
|
||||
BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, UINT16 ubOwner, BOOL fFromRemoteClient = FALSE );
|
||||
BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, INT16 sSubsequent, BOOLEAN fRecompileMovementCosts, INT16 sWoundAmt, INT16 sBreathAmt, SoldierID ubOwner, BOOL fFromRemoteClient = FALSE );
|
||||
void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT16 ubOwner, BOOLEAN fSubsequent, INT8 bLevel, INT32 iSmokeEffectNum, BOOL fFromRemoteClient = FALSE, BOOL fNewSmokeEffect = FALSE );
|
||||
void AddBombToQueue( UINT32 uiWorldBombIndex, UINT32 uiTimeStamp, BOOL fFromRemoteClient = FALSE );
|
||||
|
||||
// Flugente: activate everything connected to a tripwire in the surrounding if sGridNo on level bLevel with regard to the tripwire netwrok and hierarchy determined by ubFlag
|
||||
BOOLEAN ActivateSurroundingTripwire( UINT16 ubID, INT32 sGridNo, INT8 bLevel, UINT32 ubFlag );
|
||||
BOOLEAN ActivateSurroundingTripwire( SoldierID ubID, INT32 sGridNo, INT8 bLevel, UINT32 ubFlag );
|
||||
|
||||
// Flugente: A special function for tripwire gun traps. Search if pObj has a gun attached. If so, fire a shot from that gun in a specific direction. Afterwards place the gun on the ground
|
||||
void CheckAndFireTripwireGun( OBJECTTYPE* pObj, INT32 sGridNo, INT8 bLevel, UINT16 ubId, UINT8 ubDirection );
|
||||
|
||||
Reference in New Issue
Block a user