mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user