mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- added second weapon cleaning operation to clean all guns
- added missing texts - cleaned up tripwire-related code git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5538 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -132,7 +132,7 @@ BOOLEAN gfJustFoundBoobyTrap = FALSE;
|
||||
|
||||
void StartBombMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo );
|
||||
void StartTacticalFunctionSelectionMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bLevel ); // added by Flugente
|
||||
void CleanWeapons();
|
||||
void CleanWeapons( BOOLEAN fCleanAll );
|
||||
|
||||
void StartCorpseMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bLevel ); // added by Flugente
|
||||
|
||||
@@ -4535,7 +4535,7 @@ void StartTacticalFunctionSelectionMessageBox( SOLDIERTYPE * pSoldier, INT32 sGr
|
||||
DoMessageBox( MSG_BOX_BASIC_SMALL_BUTTONS, TacticalStr[ FUNCTION_SELECTION_STR ], GAME_SCREEN, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS, TacticalFunctionSelectionMessageBoxCallBack, NULL );
|
||||
}
|
||||
|
||||
void CleanWeapons()
|
||||
void CleanWeapons( BOOLEAN fCleanAll )
|
||||
{
|
||||
if ( !gGameExternalOptions.fDirtSystem )
|
||||
return;
|
||||
@@ -4553,7 +4553,7 @@ void CleanWeapons()
|
||||
SOLDIERTYPE* pSoldier = MercPtrs[ gusSelectedSoldier ];
|
||||
|
||||
if ( pSoldier->bActive )
|
||||
pSoldier->CleanWeapon();
|
||||
pSoldier->CleanWeapon(fCleanAll);
|
||||
}
|
||||
else // peform action for every merc in this sector
|
||||
{
|
||||
@@ -4569,7 +4569,7 @@ void CleanWeapons()
|
||||
//if the merc is in this sector
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE && pSoldier->bInSector && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
|
||||
{
|
||||
pSoldier->CleanWeapon();
|
||||
pSoldier->CleanWeapon(fCleanAll);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4686,7 +4686,12 @@ void TacticalFunctionSelectionMessageBoxCallBack( UINT8 ubExitValue )
|
||||
SectorFillCanteens();
|
||||
break;
|
||||
case 2:
|
||||
CleanWeapons();
|
||||
// clean a single weapon
|
||||
CleanWeapons(FALSE);
|
||||
break;
|
||||
case 3:
|
||||
// clean all weapons
|
||||
CleanWeapons(TRUE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -665,7 +665,7 @@ extern OBJECTTYPE gTempObject;
|
||||
#define AC_IRONSIGHT 0x00400000 //4194304 // for attachable Iron Sights
|
||||
#define AC_FEEDER 0x00800000 //8388608 // allow external feeding
|
||||
#define AC_MODPOUCH 0x01000000 //16777216 // for new modular pouches
|
||||
#define AC_RIFLEGRENADE 0x02000000 //33554432 // rifle grenades are oneshot grenade launchers that launch themselves (and need bullet)
|
||||
#define AC_RIFLEGRENADE 0x02000000 //33554432 // GL, needs a bullet and blocks other firing modes
|
||||
#define AC_MISC15 0x04000000 //67108864
|
||||
#define AC_MISC16 0x08000000 //134217728
|
||||
#define AC_MISC17 0x10000000 //268435456
|
||||
@@ -800,7 +800,7 @@ extern OBJECTTYPE gTempObject;
|
||||
#define CORPSE_PANTS_BLUE 0x10000000 //268435456
|
||||
#define CORPSE_PANTS_BEIGE 0x20000000 //536870912
|
||||
#define CORPSE_STRIPPED 0x40000000 //1073741824
|
||||
//#define unused 0x80000000 //2147483648*/
|
||||
#define TRIPWIRE_ACTIVATED 0x80000000 //2147483648 // for tripwire activation (gets set and unset when activating tripwire)
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
// replaces candamage
|
||||
|
||||
@@ -14346,8 +14346,8 @@ OBJECTTYPE* SOLDIERTYPE::GetCleaningKit()
|
||||
return( pObj );
|
||||
}
|
||||
|
||||
// use any cleaning kits to clean weapons in inventory
|
||||
void SOLDIERTYPE::CleanWeapon()
|
||||
// use cleaning kits to clean weapons in inventory. fCleanAll = TRUE: clean all eapons found, otherwise just the first one
|
||||
void SOLDIERTYPE::CleanWeapon( BOOLEAN fCleanAll )
|
||||
{
|
||||
// in turnbased, this action costs APs. remove them if possible, otherwise, return
|
||||
INT16 apcost = APBPConstants[AP_CLEANINGKIT];
|
||||
@@ -14396,12 +14396,13 @@ void SOLDIERTYPE::CleanWeapon()
|
||||
// use up APs
|
||||
DeductPoints( this, apcost, 0, AFTERACTION_INTERRUPT );
|
||||
|
||||
// only clean one weapon, we don't want to clean weapons if we didn't plan to
|
||||
return;
|
||||
// if fCleanAll is false, only clean one weapon
|
||||
if (!fCleanAll )
|
||||
return;
|
||||
|
||||
// get out of here if we dont have enough APs for another cleaning operation
|
||||
//if ( !EnoughPoints( this, apcost, 0, TRUE ) )
|
||||
//return;
|
||||
if ( !EnoughPoints( this, apcost, 0, TRUE ) )
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,8 +1454,8 @@ public:
|
||||
// Flugente: return a cleaning kit from our inventory
|
||||
OBJECTTYPE* GetCleaningKit();
|
||||
|
||||
// use any cleaning kits to clean weapons in inventory
|
||||
void CleanWeapon();
|
||||
// use cleaning kits to clean weapons in inventory. fCleanAll = TRUE: clean all eapons found, otherwise just the first one
|
||||
void CleanWeapon( BOOLEAN fCleanAll );
|
||||
|
||||
// Flugente: functions for the covert ops trait
|
||||
|
||||
|
||||
Reference in New Issue
Block a user