mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +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 );
|
INT32 sGridNo = lua_tointeger( L, 3 );
|
||||||
BOOLEAN fHostile = lua_tointeger( L, 4 );
|
BOOLEAN fHostile = lua_tointeger( L, 4 );
|
||||||
|
|
||||||
SOLDIERTYPE* pSoldier = TacticalCreateArmedCivilian( usSoldierClass );
|
if ( gGameExternalOptions.bExtraCivilians )
|
||||||
|
|
||||||
if ( pSoldier )
|
|
||||||
{
|
{
|
||||||
if ( sGridNo != NOWHERE )
|
SOLDIERTYPE* pSoldier = TacticalCreateArmedCivilian( usSoldierClass );
|
||||||
|
|
||||||
|
if ( pSoldier )
|
||||||
{
|
{
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
if ( sGridNo != NOWHERE )
|
||||||
pSoldier->sInsertionGridNo = sGridNo;
|
{
|
||||||
}
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||||
|
pSoldier->sInsertionGridNo = sGridNo;
|
||||||
|
}
|
||||||
|
|
||||||
AddSoldierToSector( pSoldier->ubID );
|
AddSoldierToSector( pSoldier->ubID );
|
||||||
|
|
||||||
// So we can see them!
|
// So we can see them!
|
||||||
AllTeamsLookForAll( NO_INTERRUPTS );
|
AllTeamsLookForAll( NO_INTERRUPTS );
|
||||||
|
|
||||||
// set correct civ group
|
// set correct civ group
|
||||||
if ( usCivilianGroup )
|
if ( usCivilianGroup )
|
||||||
{
|
{
|
||||||
pSoldier->ubCivilianGroup = usCivilianGroup;
|
pSoldier->ubCivilianGroup = usCivilianGroup;
|
||||||
|
|
||||||
if ( fHostile )
|
if ( fHostile )
|
||||||
gTacticalStatus.fCivGroupHostile[pSoldier->ubCivilianGroup] = CIV_GROUP_WILL_BECOME_HOSTILE;
|
gTacticalStatus.fCivGroupHostile[pSoldier->ubCivilianGroup] = CIV_GROUP_WILL_BECOME_HOSTILE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user