mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Replaced
UINT8 CountAllMilitiaInSector(INT16 sMapX, INT16 sMapY); with UINT8 NumNonPlayerTeamMembersInSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubTeam ); git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7708 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "Isometric Utils.h"
|
||||
#include "DisplayCover.h"
|
||||
#include "worldman.h"
|
||||
#include "Queen Command.h"
|
||||
|
||||
// sevenfm: need this for correct calculation of traits menu position
|
||||
extern INT16 gsInterfaceLevel;
|
||||
@@ -459,8 +460,6 @@ ArtilleryTeam::Functions( UINT32 aVal )
|
||||
/////////////////////////////// Artillery Team Selection ////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////// Reinforcement Sector Selection ////////////////////////////////////////////
|
||||
extern UINT8 CountAllMilitiaInSector(INT16 sMapX, INT16 sMapY);
|
||||
|
||||
void
|
||||
ReinforcementSector::Setup( UINT32 aVal )
|
||||
{
|
||||
@@ -502,7 +501,7 @@ ReinforcementSector::Setup( UINT32 aVal )
|
||||
pOption = new POPUP_OPTION(&std::wstring( pStr ), new popupCallbackFunction<void, UINT32>( &Wrapper_Setup_ReinforcementNumber, sectornr ) );
|
||||
|
||||
// grey out if no reinforcements can be called from this sector
|
||||
if( !CountAllMilitiaInSector( loopX, loopY ) )
|
||||
if ( !NumNonPlayerTeamMembersInSector( loopX, loopY, MILITIA_TEAM ) )
|
||||
{
|
||||
// Set this option off.
|
||||
pOption->setAvail(new popupCallbackFunction<bool,void*>( &Popup_OptionOff, NULL ));
|
||||
@@ -544,7 +543,7 @@ ReinforcementNumber::Setup( UINT32 aVal )
|
||||
|
||||
CHAR16 pStr[300];
|
||||
|
||||
UINT8 numberofmilitia = CountAllMilitiaInSector( SECTORX(usSector), SECTORY(usSector) );
|
||||
UINT8 numberofmilitia = NumNonPlayerTeamMembersInSector( SECTORX( usSector ), SECTORY( usSector ), MILITIA_TEAM );
|
||||
|
||||
// 5 militia option
|
||||
swprintf( pStr, pSkillMenuStrings[SKILLMENU_X_MILITIA], 5 );
|
||||
|
||||
Reference in New Issue
Block a user