mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: ALLOW_EXTRA_CIVILIANS did not affect CreateArmedCivilain
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8672 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+19
-16
@@ -12887,28 +12887,31 @@ static int l_CreateArmedCivilain( lua_State *L )
|
||||
INT32 sGridNo = lua_tointeger( L, 3 );
|
||||
BOOLEAN fHostile = lua_tointeger( L, 4 );
|
||||
|
||||
SOLDIERTYPE* pSoldier = TacticalCreateArmedCivilian( usSoldierClass );
|
||||
|
||||
if ( pSoldier )
|
||||
if ( gGameExternalOptions.bExtraCivilians )
|
||||
{
|
||||
if ( sGridNo != NOWHERE )
|
||||
SOLDIERTYPE* pSoldier = TacticalCreateArmedCivilian( usSoldierClass );
|
||||
|
||||
if ( pSoldier )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||
pSoldier->sInsertionGridNo = sGridNo;
|
||||
}
|
||||
if ( sGridNo != NOWHERE )
|
||||
{
|
||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||
pSoldier->sInsertionGridNo = sGridNo;
|
||||
}
|
||||
|
||||
AddSoldierToSector( pSoldier->ubID );
|
||||
AddSoldierToSector( pSoldier->ubID );
|
||||
|
||||
// So we can see them!
|
||||
AllTeamsLookForAll( NO_INTERRUPTS );
|
||||
// So we can see them!
|
||||
AllTeamsLookForAll( NO_INTERRUPTS );
|
||||
|
||||
// set correct civ group
|
||||
if ( usCivilianGroup )
|
||||
{
|
||||
pSoldier->ubCivilianGroup = usCivilianGroup;
|
||||
// set correct civ group
|
||||
if ( usCivilianGroup )
|
||||
{
|
||||
pSoldier->ubCivilianGroup = usCivilianGroup;
|
||||
|
||||
if ( fHostile )
|
||||
gTacticalStatus.fCivGroupHostile[pSoldier->ubCivilianGroup] = CIV_GROUP_WILL_BECOME_HOSTILE;
|
||||
if ( fHostile )
|
||||
gTacticalStatus.fCivGroupHostile[pSoldier->ubCivilianGroup] = CIV_GROUP_WILL_BECOME_HOSTILE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user