mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- food system: auto consumption now starts at -10% instead of -25%
- Moved key commands: 'Ctrl' + '.' now opens a message box. The commands to fill canteens and to clean weapons can be called from there. In the future, similar commands can be placed here git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5485 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -122,7 +122,6 @@
|
||||
|
||||
|
||||
#include "IMP Skill Trait.h" // added by Flugente
|
||||
#include "Food.h" // added by Flugente
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
@@ -225,7 +224,6 @@ void ToggleZBuffer();
|
||||
void TogglePlanningMode();
|
||||
void SetBurstMode();
|
||||
void SetScopeMode( INT32 usMapPos );
|
||||
void CleanWeapons();
|
||||
void ObliterateSector();
|
||||
void RandomizeMercProfile();
|
||||
void CreateNextCivType();
|
||||
@@ -4459,12 +4457,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
case '.':
|
||||
if ( fCtrl )
|
||||
{
|
||||
SectorFillCanteens();
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{
|
||||
HandleTacticalFunctionSelection(MercPtrs[ gusSelectedSoldier ], usMapPos );
|
||||
}
|
||||
}
|
||||
else if ( fAlt )
|
||||
{
|
||||
CleanWeapons();
|
||||
|
||||
/*// Flugente: spawn items while debugging
|
||||
if ( gusSelectedSoldier != NOBODY )
|
||||
{
|
||||
@@ -5279,46 +5278,6 @@ void SetScopeMode( INT32 usMapPos )
|
||||
}
|
||||
}
|
||||
|
||||
void CleanWeapons()
|
||||
{
|
||||
if ( !gGameExternalOptions.fDirtSystem )
|
||||
return;
|
||||
|
||||
// no functionality if not in tactical or in combat, or nobody is here
|
||||
if ( guiCurrentScreen != GAME_SCREEN || (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
return;
|
||||
|
||||
// if in turnbased mode, perform this action only for the selected merc, and use up APs
|
||||
if ( gTacticalStatus.uiFlags & TURNBASED )
|
||||
{
|
||||
if ( gusSelectedSoldier == NOBODY )
|
||||
return;
|
||||
|
||||
SOLDIERTYPE* pSoldier = MercPtrs[ gusSelectedSoldier ];
|
||||
|
||||
if ( pSoldier->bActive )
|
||||
pSoldier->CleanWeapon();
|
||||
}
|
||||
else // peform action for every merc in this sector
|
||||
{
|
||||
UINT8 bMercID, bLastTeamID;
|
||||
SOLDIERTYPE* pSoldier = NULL;
|
||||
|
||||
bMercID = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
||||
bLastTeamID = gTacticalStatus.Team[ gbPlayerNum ].bLastID;
|
||||
|
||||
// loop through all mercs
|
||||
for ( pSoldier = MercPtrs[ bMercID ]; bMercID <= bLastTeamID; ++bMercID, ++pSoldier )
|
||||
{
|
||||
//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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ObliterateSector()
|
||||
{
|
||||
INT32 cnt;
|
||||
|
||||
Reference in New Issue
Block a user