mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- New command: On [Alt] + [N], all team members in the sector try to put on gas masks
- Fix: gasmask status was not always evaluated correctly git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8315 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -9250,30 +9250,14 @@ static int l_GetMercPtrsGroup (lua_State *L)
|
||||
}
|
||||
|
||||
static int l_WearGasMaskIfAvailable(lua_State *L)
|
||||
{
|
||||
UINT8 n = lua_gettop(L);
|
||||
int i = 0;
|
||||
UINT8 ubID = 0;
|
||||
BOOLEAN Bool = FALSE;
|
||||
SOLDIERTYPE * pSoldier;
|
||||
{
|
||||
if ( lua_gettop( L ) >= 1 )
|
||||
{
|
||||
UINT8 ubID = lua_tointeger( L, 1 );
|
||||
|
||||
for (i= 1; i<=n; i++ )
|
||||
{
|
||||
if (i == 1 ) ubID = lua_tointeger(L,i);
|
||||
}
|
||||
|
||||
if ( MercPtrs[ ubID ]->bInSector && MercPtrs[ ubID ]->bActive)
|
||||
Bool = TRUE;
|
||||
else
|
||||
Bool = FALSE;
|
||||
|
||||
if ( Bool == TRUE )
|
||||
{
|
||||
pSoldier = MercPtrs[ ubID ];
|
||||
|
||||
if (pSoldier)
|
||||
if ( MercPtrs[ubID] && MercPtrs[ubID]->bInSector && MercPtrs[ubID]->bActive )
|
||||
{
|
||||
WearGasMaskIfAvailable(pSoldier);
|
||||
WearGasMaskIfAvailable( MercPtrs[ubID] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user