mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Minor code improvements
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9147 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3568,28 +3568,25 @@ int i;
|
||||
|
||||
static int l_BoxerExists(lua_State *L)
|
||||
{
|
||||
BOOLEAN Bool;
|
||||
|
||||
Bool = BoxerExists( );
|
||||
BOOLEAN Bool = BoxerExists( );
|
||||
|
||||
lua_pushboolean(L, Bool);
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_gubBoxerID(lua_State *L)
|
||||
{
|
||||
UINT8 n = lua_gettop(L);
|
||||
UINT8 val, val2;
|
||||
|
||||
for (int i = 1; i <= n; i++)
|
||||
if ( n >= 2 )
|
||||
{
|
||||
if (i == 1) val = lua_tointeger(L, i);
|
||||
if (i == 2) val2 = lua_tointeger(L, i);
|
||||
}
|
||||
UINT8 val = lua_tointeger( L, 1 );
|
||||
UINT8 val2 = lua_tointeger( L, 2 );
|
||||
|
||||
if (val <= 2)
|
||||
gubBoxerID[val] = val2;
|
||||
if ( val <= 2 )
|
||||
gubBoxerID[val] = val2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -6407,7 +6407,7 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
}
|
||||
else
|
||||
{
|
||||
ubVolume = __max( 1, ( ubVolume * GetPercentNoiseVolume( pObj ) ) / 100 );
|
||||
ubVolume = __max( 1, ( ubVolume * noisefactor ) / 100 );
|
||||
}
|
||||
|
||||
MakeNoise( NOBODY, gridno, 0, pThrower ? pThrower->bOverTerrainType : FLAT_GROUND, ubVolume, NOISE_GUNFIRE );
|
||||
|
||||
Reference in New Issue
Block a user