mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
changed hardcoded numbers to enums in preparation for total merc number increase
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6042 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2713,7 +2713,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve2");
|
||||
{
|
||||
if( gpCivs[ i ].pSoldier )
|
||||
{
|
||||
ubCurrentRank = 255;
|
||||
ubCurrentRank = MAX_AR_TEAM_SIZE;
|
||||
switch( gpCivs[ i ].pSoldier->ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_GREEN_MILITIA: ubCurrentRank = GREEN_MILITIA; break;
|
||||
|
||||
@@ -645,7 +645,7 @@ fFirstTimeInMapScreen = TRUE;
|
||||
// ------------------------
|
||||
if (gGameExternalOptions.fShowCamouflageFaces == TRUE )
|
||||
{
|
||||
for (int i=0;i<255;i++)
|
||||
for (int i=0;i<NUM_PROFILES;++i)
|
||||
{
|
||||
gCamoFace[i].gCamoface = FALSE;
|
||||
gCamoFace[i].gUrbanCamoface = FALSE;
|
||||
@@ -1117,7 +1117,7 @@ void ReStartingGame()
|
||||
if (gGameExternalOptions.fShowCamouflageFaces == TRUE )
|
||||
{
|
||||
//Camo Face
|
||||
for (int i=0;i<255;i++)
|
||||
for (int i=0;i<NUM_PROFILES;++i)
|
||||
{
|
||||
gCamoFace[i].gCamoface = FALSE;
|
||||
gCamoFace[i].gUrbanCamoface = FALSE;
|
||||
|
||||
@@ -5353,9 +5353,9 @@ return 1;
|
||||
|
||||
static int l_usStrategicInsertionDataProfileID(lua_State *L)
|
||||
{
|
||||
BOOLEAN Bool;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
UINT32 sGridNo = 0;
|
||||
//BOOLEAN Bool;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
UINT32 sGridNo = 0;
|
||||
|
||||
if ( lua_gettop(L) >= 1 )
|
||||
{
|
||||
@@ -5363,14 +5363,14 @@ UINT32 sGridNo = 0;
|
||||
|
||||
pSoldier = FindSoldierByProfileID( ID, FALSE );
|
||||
if (pSoldier)
|
||||
{
|
||||
sGridNo = pSoldier->usStrategicInsertionData;
|
||||
}
|
||||
{
|
||||
sGridNo = pSoldier->usStrategicInsertionData;
|
||||
}
|
||||
|
||||
lua_pushinteger(L, sGridNo);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_bNeutral(lua_State *L)
|
||||
@@ -6719,7 +6719,7 @@ static int l_Action_door_close (lua_State *L)
|
||||
//action
|
||||
static int l_SetOffBombsByFrequency (lua_State *L)
|
||||
{
|
||||
SOLDIERTYPE * pSoldier;
|
||||
//SOLDIERTYPE * pSoldier;
|
||||
|
||||
if ( lua_gettop(L) >= 2 )
|
||||
{
|
||||
@@ -10625,7 +10625,7 @@ static int l_CheckFact (lua_State *L)
|
||||
ubProfileID = lua_tointeger(L,i);
|
||||
}
|
||||
|
||||
if ( ubProfileID != 255 && CheckFact( fact, ubProfileID ) )
|
||||
if ( ubProfileID != NUM_PROFILES && CheckFact( fact, ubProfileID ) )
|
||||
{
|
||||
checkfact= TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user