Minor fixes for already checked scripts.

This commit is contained in:
JezuzLizard 2021-03-18 14:58:37 -07:00
parent 26c957ebed
commit 9c9a729150
7 changed files with 11 additions and 13 deletions

View File

@ -1228,7 +1228,7 @@ hastacticalmask( player ) //checked changed at own discretion
isprimarydamage( meansofdeath ) //checked changed at own discretion
{
if ( meansofdeath != "MOD_RIFLE_BULLET" || meansofdeath == "MOD_PISTOL_BULLET" )
if ( meansofdeath == "MOD_RIFLE_BULLET" || meansofdeath == "MOD_PISTOL_BULLET" )
{
return 1;
}
@ -1281,7 +1281,7 @@ isplayerexplosiveweapon( weapon, meansofdeath ) //checked matches cerberus outpu
isheaddamage( hitloc ) //checked changed at own discretion
{
if ( hitloc == "helmet" && hitloc == "head" || hitloc == "neck" )
if ( hitloc == "helmet" || hitloc == "head" || hitloc == "neck" )
{
return 1;
}

View File

@ -524,7 +524,6 @@ updatecarryobjectorigin() //checked changed to match beta dump
foreach ( team in level.teams )
{
self.objpoints[ team ] maps/mp/gametypes/_objpoints::updateorigin( self.curorigin + self.offset3d );
_k656 = getNextArrayKey( _a656, _k656 );
}
}
else

View File

@ -1974,7 +1974,7 @@ callback_playerkilled( einflictor, attacker, idamage, smeansofdeath, sweapon, vd
pixendevent();
}
}
else if ( isDefined( attacker ) && attacker.classname == "trigger_hurt" || attacker.classname == "worldspawn" )
else if ( isDefined( attacker ) && attacker.classname == "trigger_hurt" || isDefined( attacker ) && attacker.classname == "worldspawn" )
{
dokillcam = 0;
lpattacknum = -1;

View File

@ -1401,7 +1401,7 @@ onspawnplayer( predictedspawn ) //fixed checked changed partially to match cerbe
}
if ( isDefined( level.customspawnlogic ) )
{
spawnpoint = self [[ level.customspawnlogic ]]( predictedspawn );
self [[ level.customspawnlogic ]]( predictedspawn );
if ( predictedspawn )
{
return;
@ -1426,8 +1426,7 @@ onspawnplayer( predictedspawn ) //fixed checked changed partially to match cerbe
structs = getstructarray( "initial_spawn", "script_noteworthy" );
if ( isdefined( structs ) )
{
i = 0;
while ( i < structs.size )
for ( i = 0; i < structs.size; i++ )
{
if ( isdefined( structs[ i ].script_string ) )
{
@ -1440,7 +1439,6 @@ onspawnplayer( predictedspawn ) //fixed checked changed partially to match cerbe
}
}
}
i++;
}
}
if ( !isDefined( spawnpoints ) || spawnpoints.size == 0 )

View File

@ -1930,7 +1930,7 @@ get_closest_2d( origin, ents ) //checked changed to match cerberus output
disable_trigger() //checked matches cerberus output
{
if ( !isDefined( self.disabled ) || !self.disabled )
if ( !is_true( self.disabled ) )
{
self.disabled = 1;
self.origin -= vectorScale( ( 0, 0, 1 ), 10000 );
@ -1939,7 +1939,7 @@ disable_trigger() //checked matches cerberus output
enable_trigger() //checked matches cerberus output
{
if ( !isDefined( self.disabled ) || !self.disabled )
if ( !is_true( self.disabled ) )
{
return;
}
@ -3389,11 +3389,11 @@ shock_onpain() //checked changed to match cerberus output
{
oldhealth = self.health;
self waittill( "damage", damage, attacker, direction_vec, point, mod );
if ( !is_true( level.shock_onpain ) )
if( IsDefined( level.shock_onpain ) && !level.shock_onpain )
{
continue;
}
if ( !is_true( self.shock_onpain ) )
if( IsDefined( self.shock_onpain ) && !self.shock_onpain )
{
continue;
}

View File

@ -1621,6 +1621,7 @@ weapon_supports_attachments( weaponname ) //checked changed at own discretion
{
return 1;
}
return 0;
}
random_attachment( weaponname, exclude ) //checked changed to match cerberus output

View File

@ -142,7 +142,7 @@ fan_trap_timeout() //checked does not match cerberus output did not change
n_duration = 0;
while ( n_duration < 25 )
{
wait 0,05;
wait 0.05;
n_duration += 0.05;
}
self.zombie_dmg_trig notify( "trap_finished_" + self.script_string );