checked 11 patch_mp mp scripts

checked _acousticsensor.gsc, _ballistic_knife.gsc, _bouncingbetty.gsc, _empgrenade.gsc, _entityheadicons.gsc, _flashgrenades.gsc, _mgturret.gsc, _scrambler.gsc, _sensor_grenade.gsc, _teargrenades.gsc, and _treadfx.gsc.
This commit is contained in:
JezuzLizard 2020-07-10 08:00:00 -07:00
parent 9cbb7470c3
commit 7817efc738
12 changed files with 440 additions and 502 deletions

View File

@ -1,3 +1,4 @@
//checked includes match cerberus output
#include maps/mp/gametypes/_damagefeedback; #include maps/mp/gametypes/_damagefeedback;
#include maps/mp/gametypes/_globallogic_player; #include maps/mp/gametypes/_globallogic_player;
#include maps/mp/_scoreevents; #include maps/mp/_scoreevents;
@ -7,13 +8,13 @@
#include maps/mp/gametypes/_weaponobjects; #include maps/mp/gametypes/_weaponobjects;
#include common_scripts/utility; #include common_scripts/utility;
init() init() //checked matches cerberus output
{ {
level._effect[ "acousticsensor_enemy_light" ] = loadfx( "misc/fx_equip_light_red" ); level._effect[ "acousticsensor_enemy_light" ] = loadfx( "misc/fx_equip_light_red" );
level._effect[ "acousticsensor_friendly_light" ] = loadfx( "misc/fx_equip_light_green" ); level._effect[ "acousticsensor_friendly_light" ] = loadfx( "misc/fx_equip_light_green" );
} }
createacousticsensorwatcher() createacousticsensorwatcher() //checked matches cerberus output
{ {
watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "acoustic_sensor", "acoustic_sensor_mp", self.team ); watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "acoustic_sensor", "acoustic_sensor_mp", self.team );
watcher.onspawn = ::onspawnacousticsensor; watcher.onspawn = ::onspawnacousticsensor;
@ -25,7 +26,7 @@ createacousticsensorwatcher()
watcher.ondamage = ::watchacousticsensordamage; watcher.ondamage = ::watchacousticsensordamage;
} }
onspawnacousticsensor( watcher, player ) onspawnacousticsensor( watcher, player ) //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self thread maps/mp/gametypes/_weaponobjects::onspawnuseweaponobject( watcher, player ); self thread maps/mp/gametypes/_weaponobjects::onspawnuseweaponobject( watcher, player );
@ -41,7 +42,7 @@ onspawnacousticsensor( watcher, player )
self thread watchshutdown( player, self.origin ); self thread watchshutdown( player, self.origin );
} }
acousticsensordetonate( attacker, weaponname ) acousticsensordetonate( attacker, weaponname ) //checked matches cerberus output
{ {
from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname ); from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname );
if ( !from_emp ) if ( !from_emp )
@ -60,12 +61,12 @@ acousticsensordetonate( attacker, weaponname )
self destroyent(); self destroyent();
} }
destroyent() destroyent() //checked matches cerberus output
{ {
self delete(); self delete();
} }
watchshutdown( player, origin ) watchshutdown( player, origin ) //checked matches cerberus output
{ {
self waittill_any( "death", "hacked" ); self waittill_any( "death", "hacked" );
if ( isDefined( player ) ) if ( isDefined( player ) )
@ -74,7 +75,7 @@ watchshutdown( player, origin )
} }
} }
watchacousticsensordamage( watcher ) watchacousticsensordamage( watcher ) //checked changed to match cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "hacked" ); self endon( "hacked" );
@ -84,82 +85,75 @@ watchacousticsensordamage( watcher )
{ {
self.damagetaken = 0; self.damagetaken = 0;
} }
for ( ;; ) while ( 1 )
{ {
while ( 1 ) self.maxhealth = 100000;
self.health = self.maxhealth;
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags );
if ( !isDefined( attacker ) || !isplayer( attacker ) )
{ {
self.maxhealth = 100000; continue;
self.health = self.maxhealth; }
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags ); if ( level.teambased && attacker.team == self.owner.team && attacker != self.owner )
if ( !isDefined( attacker ) || !isplayer( attacker ) ) {
continue;
}
if ( isDefined( weaponname ) )
{
switch( weaponname )
{ {
continue; case "concussion_grenade_mp":
} case "flash_grenade_mp":
while ( level.teambased && attacker.team == self.owner.team && attacker != self.owner ) if ( watcher.stuntime > 0 )
{ {
continue; self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime );
} }
if ( isDefined( weaponname ) ) if ( level.teambased && self.owner.team != attacker.team )
{ {
switch( weaponname ) if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
case "concussion_grenade_mp":
case "flash_grenade_mp":
if ( watcher.stuntime > 0 )
{ {
self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime ); attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
if ( level.teambased && self.owner.team != attacker.team )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
continue;
}
else
{
if ( !level.teambased && self.owner != attacker )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
}
} }
} }
case "emp_grenade_mp": else if ( !level.teambased && self.owner != attacker )
damage = damagemax; {
default: if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) ) {
{ attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback(); }
}
break;
} }
}
else
{
weaponname = "";
}
while ( isplayer( attacker ) && level.teambased && isDefined( attacker.team ) && self.owner.team == attacker.team && attacker != self.owner )
{
continue; continue;
} case "emp_grenade_mp":
if ( type == "MOD_MELEE" ) damage = damagemax;
{ default:
self.damagetaken = damagemax; if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
} {
else attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
{ }
self.damagetaken += damage; break;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
return;
}
} }
} }
else
{
weaponname = "";
}
if ( isplayer( attacker ) && level.teambased && isDefined( attacker.team ) && self.owner.team == attacker.team && attacker != self.owner )
{
continue;
}
if ( type == "MOD_MELEE" )
{
self.damagetaken = damagemax;
}
else
{
self.damagetaken += damage;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
return;
}
} }
} }

View File

@ -1,14 +1,15 @@
//checked includes match cerberus output
#include maps/mp/_challenges; #include maps/mp/_challenges;
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
init() init() //checked matches cerberus output
{ {
precachemodel( "t6_wpn_ballistic_knife_projectile" ); precachemodel( "t6_wpn_ballistic_knife_projectile" );
precachemodel( "t6_wpn_ballistic_knife_blade_retrieve" ); precachemodel( "t6_wpn_ballistic_knife_blade_retrieve" );
} }
onspawn( watcher, player ) onspawn( watcher, player ) //checked changed to match cerberus output
{ {
player endon( "death" ); player endon( "death" );
player endon( "disconnect" ); player endon( "disconnect" );
@ -31,12 +32,9 @@ onspawn( watcher, player )
{ {
isfriendly = 1; isfriendly = 1;
} }
else else if ( level.teambased && isai( prey ) && player.team == prey.aiteam )
{ {
if ( level.teambased && isai( prey ) && player.team == prey.aiteam ) isfriendly = 1;
{
isfriendly = 1;
}
} }
if ( !isfriendly ) if ( !isfriendly )
{ {
@ -49,13 +47,10 @@ onspawn( watcher, player )
retrievable_model linkto( prey, bone ); retrievable_model linkto( prey, bone );
} }
} }
else else if ( isfriendly )
{ {
if ( isfriendly ) retrievable_model physicslaunch( normal, ( randomint( 10 ), randomint( 10 ), randomint( 10 ) ) );
{ normal = ( 0, 0, 1 );
retrievable_model physicslaunch( normal, ( randomint( 10 ), randomint( 10 ), randomint( 10 ) ) );
normal = ( 0, 0, 1 );
}
} }
} }
watcher.objectarray[ watcher.objectarray.size ] = retrievable_model; watcher.objectarray[ watcher.objectarray.size ] = retrievable_model;
@ -76,7 +71,7 @@ onspawn( watcher, player )
} }
} }
wait_to_show_glowing_model( prey ) wait_to_show_glowing_model( prey ) //checked matches cerberus output
{ {
level endon( "game_ended" ); level endon( "game_ended" );
self endon( "death" ); self endon( "death" );
@ -91,7 +86,7 @@ wait_to_show_glowing_model( prey )
glowing_retrievable_model setmodel( "t6_wpn_ballistic_knife_blade_retrieve" ); glowing_retrievable_model setmodel( "t6_wpn_ballistic_knife_blade_retrieve" );
} }
watch_shutdown() watch_shutdown() //checked matches cerberus output
{ {
pickuptrigger = self.pickuptrigger; pickuptrigger = self.pickuptrigger;
glowing_model = self.glowing_model; glowing_model = self.glowing_model;
@ -106,7 +101,7 @@ watch_shutdown()
} }
} }
onspawnretrievetrigger( watcher, player ) onspawnretrievetrigger( watcher, player ) //checked matches cerberus output
{ {
player endon( "death" ); player endon( "death" );
player endon( "disconnect" ); player endon( "disconnect" );
@ -147,7 +142,7 @@ onspawnretrievetrigger( watcher, player )
retrievable_model thread watch_shutdown(); retrievable_model thread watch_shutdown();
} }
watch_use_trigger( trigger, model, callback, playersoundonuse, npcsoundonuse ) watch_use_trigger( trigger, model, callback, playersoundonuse, npcsoundonuse ) //checked changed to match cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "delete" ); self endon( "delete" );
@ -156,11 +151,11 @@ watch_use_trigger( trigger, model, callback, playersoundonuse, npcsoundonuse )
while ( 1 ) while ( 1 )
{ {
trigger waittill( "trigger", player ); trigger waittill( "trigger", player );
while ( !isalive( player ) ) if ( !isalive( player ) )
{ {
continue; continue;
} }
while ( !player isonground() ) if ( !player isonground() )
{ {
continue; continue;
} }
@ -172,7 +167,7 @@ watch_use_trigger( trigger, model, callback, playersoundonuse, npcsoundonuse )
{ {
continue; continue;
} }
while ( !player hasweapon( "knife_ballistic_mp" ) ) if ( !player hasweapon( "knife_ballistic_mp" ) )
{ {
continue; continue;
} }
@ -198,11 +193,11 @@ watch_use_trigger( trigger, model, callback, playersoundonuse, npcsoundonuse )
player playsound( npcsoundonuse ); player playsound( npcsoundonuse );
} }
self thread [[ callback ]]( player ); self thread [[ callback ]]( player );
return; break;
} }
} }
pick_up( player ) pick_up( player ) //checked matches cerberus output
{ {
self destroy_ent(); self destroy_ent();
current_weapon = player getcurrentweapon(); current_weapon = player getcurrentweapon();
@ -227,7 +222,7 @@ pick_up( player )
} }
} }
destroy_ent() destroy_ent() //checked matches cerberus output
{ {
if ( isDefined( self ) ) if ( isDefined( self ) )
{ {
@ -244,7 +239,7 @@ destroy_ent()
} }
} }
dropknivestoground() dropknivestoground() //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
for ( ;; ) for ( ;; )
@ -254,16 +249,16 @@ dropknivestoground()
} }
} }
droptoground( origin, radius ) droptoground( origin, radius ) //checked changed to match cerberus output
{ {
if ( distancesquared( origin, self.origin ) < ( radius * radius ) ) if ( distancesquared( origin, self.origin ) < ( radius * radius ) )
{ {
self physicslaunch( ( 0, 0, 1 ), vectorScale( ( 0, 0, 1 ), 5 ) ); self physicslaunch( ( 0, 0, 1 ), vectorScale( ( 1, 1, 1 ), 5 ) );
self thread updateretrievetrigger(); self thread updateretrievetrigger();
} }
} }
updateretrievetrigger() updateretrievetrigger() //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self waittill( "stationary" ); self waittill( "stationary" );
@ -271,3 +266,4 @@ updateretrievetrigger()
trigger.origin = ( self.origin[ 0 ], self.origin[ 1 ], self.origin[ 2 ] + 10 ); trigger.origin = ( self.origin[ 0 ], self.origin[ 1 ], self.origin[ 2 ] + 10 );
trigger linkto( self ); trigger linkto( self );
} }

View File

@ -1,10 +1,11 @@
//checked includes match cerberus output
#include maps/mp/_scoreevents; #include maps/mp/_scoreevents;
#include maps/mp/_challenges; #include maps/mp/_challenges;
#include maps/mp/gametypes/_weaponobjects; #include maps/mp/gametypes/_weaponobjects;
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
init() init() //checked matches cerberus output
{ {
precachemodel( "t6_wpn_bouncing_betty_world" ); precachemodel( "t6_wpn_bouncing_betty_world" );
level.bettyexplosionfx = loadfx( "weapon/bouncing_betty/fx_betty_explosion" ); level.bettyexplosionfx = loadfx( "weapon/bouncing_betty/fx_betty_explosion" );
@ -13,19 +14,19 @@ init()
level._effect[ "fx_betty_friendly_light" ] = loadfx( "weapon/bouncing_betty/fx_betty_light_green" ); level._effect[ "fx_betty_friendly_light" ] = loadfx( "weapon/bouncing_betty/fx_betty_light_green" );
level._effect[ "fx_betty_enemy_light" ] = loadfx( "weapon/bouncing_betty/fx_betty_light_red" ); level._effect[ "fx_betty_enemy_light" ] = loadfx( "weapon/bouncing_betty/fx_betty_light_red" );
level.bettymindist = 20; level.bettymindist = 20;
level.bettygraceperiod = 0,6; level.bettygraceperiod = 0.6;
level.bettyradius = 192; level.bettyradius = 192;
level.bettystuntime = 1; level.bettystuntime = 1;
level.bettydamageradius = 256; level.bettydamageradius = 256;
level.bettydamagemax = 210; level.bettydamagemax = 210;
level.bettydamagemin = 70; level.bettydamagemin = 70;
level.bettyjumpheight = 65; level.bettyjumpheight = 65;
level.bettyjumptime = 0,65; level.bettyjumptime = 0.65;
level.bettyrotatevelocity = ( 0, 750, 32 ); level.bettyrotatevelocity = ( 0, 750, 32 );
level.bettyactivationdelay = 0,1; level.bettyactivationdelay = 0.1;
} }
createbouncingbettywatcher() createbouncingbettywatcher() //checked matches cerberus output
{ {
watcher = self createproximityweaponobjectwatcher( "bouncingbetty", "bouncingbetty_mp", self.team ); watcher = self createproximityweaponobjectwatcher( "bouncingbetty", "bouncingbetty_mp", self.team );
watcher.onspawn = ::onspawnbouncingbetty; watcher.onspawn = ::onspawnbouncingbetty;
@ -46,7 +47,7 @@ createbouncingbettywatcher()
watcher.activationdelay = level.bettyactivationdelay; watcher.activationdelay = level.bettyactivationdelay;
} }
onspawnbouncingbetty( watcher, owner ) onspawnbouncingbetty( watcher, owner ) //checked matches cerberus output
{ {
onspawnproximityweaponobject( watcher, owner ); onspawnproximityweaponobject( watcher, owner );
self thread spawnminemover(); self thread spawnminemover();
@ -69,14 +70,14 @@ spawnminemover()
self thread killminemoveronpickup(); self thread killminemoveronpickup();
} }
killminemoveronpickup() killminemoveronpickup() //checked matches cerberus output
{ {
self.minemover endon( "death" ); self.minemover endon( "death" );
self waittill_any( "picked_up", "hacked" ); self waittill_any( "picked_up", "hacked" );
self killminemover(); self killminemover();
} }
killminemover() killminemover() //checked matches cerberus output
{ {
if ( isDefined( self.minemover ) ) if ( isDefined( self.minemover ) )
{ {
@ -88,7 +89,7 @@ killminemover()
} }
} }
bouncingbettydetonate( attacker, weaponname ) bouncingbettydetonate( attacker, weaponname ) //checked matches cerberus output
{ {
if ( isDefined( weaponname ) ) if ( isDefined( weaponname ) )
{ {
@ -114,7 +115,7 @@ bouncingbettydetonate( attacker, weaponname )
} }
} }
bouncingbettydestroyed() bouncingbettydestroyed() //checked matches cerberus output
{ {
playfx( level.bettydestroyedfx, self.origin ); playfx( level.bettydestroyedfx, self.origin );
playsoundatposition( "dst_equipment_destroy", self.origin ); playsoundatposition( "dst_equipment_destroy", self.origin );
@ -134,7 +135,7 @@ bouncingbettydestroyed()
self delete(); self delete();
} }
bouncingbettyjumpandexplode() bouncingbettyjumpandexplode() //checked matches cerberus output
{ {
explodepos = self.origin + ( 0, 0, level.bettyjumpheight ); explodepos = self.origin + ( 0, 0, level.bettyjumpheight );
self moveto( explodepos, level.bettyjumptime, level.bettyjumptime, 0 ); self moveto( explodepos, level.bettyjumptime, level.bettyjumptime, 0 );
@ -146,14 +147,14 @@ bouncingbettyjumpandexplode()
self thread mineexplode(); self thread mineexplode();
} }
mineexplode() mineexplode() //checked matches cerberus output
{ {
if ( !isDefined( self ) || !isDefined( self.owner ) ) if ( !isDefined( self ) || !isDefined( self.owner ) )
{ {
return; return;
} }
self playsound( "fly_betty_explo" ); self playsound( "fly_betty_explo" );
wait 0,05; wait 0.05;
if ( !isDefined( self ) || !isDefined( self.owner ) ) if ( !isDefined( self ) || !isDefined( self.owner ) )
{ {
return; return;
@ -161,7 +162,7 @@ mineexplode()
self hide(); self hide();
self radiusdamage( self.origin, level.bettydamageradius, level.bettydamagemax, level.bettydamagemin, self.owner, "MOD_EXPLOSIVE", "bouncingbetty_mp" ); self radiusdamage( self.origin, level.bettydamageradius, level.bettydamagemax, level.bettydamagemin, self.owner, "MOD_EXPLOSIVE", "bouncingbetty_mp" );
playfx( level.bettyexplosionfx, self.origin ); playfx( level.bettyexplosionfx, self.origin );
wait 0,2; wait 0.2;
if ( !isDefined( self ) || !isDefined( self.owner ) ) if ( !isDefined( self ) || !isDefined( self.owner ) )
{ {
return; return;
@ -173,3 +174,4 @@ mineexplode()
self.killcament delete(); self.killcament delete();
self delete(); self delete();
} }

View File

@ -1,14 +1,15 @@
//checked includes match cerberus output
#include maps/mp/killstreaks/_emp; #include maps/mp/killstreaks/_emp;
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
init() init() //checked matches cerberus output
{ {
precacheshellshock( "flashbang" ); precacheshellshock( "flashbang" );
thread onplayerconnect(); thread onplayerconnect();
} }
onplayerconnect() onplayerconnect() //checked matches cerberus output
{ {
for ( ;; ) for ( ;; )
{ {
@ -17,7 +18,7 @@ onplayerconnect()
} }
} }
onplayerspawned() onplayerspawned() //checked matches cerberus output
{ {
self endon( "disconnect" ); self endon( "disconnect" );
for ( ;; ) for ( ;; )
@ -27,7 +28,7 @@ onplayerspawned()
} }
} }
monitorempgrenade() monitorempgrenade() //checked changed to match cerberus output
{ {
self endon( "disconnect" ); self endon( "disconnect" );
self endon( "death" ); self endon( "death" );
@ -43,30 +44,28 @@ monitorempgrenade()
} }
hurtvictim = 1; hurtvictim = 1;
hurtattacker = 0; hurtattacker = 0;
/*
/# /#
assert( isDefined( self.team ) ); assert( isDefined( self.team ) );
#/ #/
*/
if ( level.teambased && isDefined( attacker ) && isDefined( attacker.team ) && attacker.team == self.team && attacker != self ) if ( level.teambased && isDefined( attacker ) && isDefined( attacker.team ) && attacker.team == self.team && attacker != self )
{ {
if ( level.friendlyfire == 0 ) if ( level.friendlyfire == 0 )
{ {
continue;
} }
} else if ( level.friendlyfire == 1 )
else if ( level.friendlyfire == 1 ) {
{ hurtattacker = 0;
hurtattacker = 0; hurtvictim = 1;
hurtvictim = 1; }
break; else if ( level.friendlyfire == 2 )
} {
else if ( level.friendlyfire == 2 ) hurtvictim = 0;
{ hurtattacker = 1;
hurtvictim = 0; }
hurtattacker = 1; else if ( level.friendlyfire == 3 )
break;
}
else
{
if ( level.friendlyfire == 3 )
{ {
hurtattacker = 1; hurtattacker = 1;
hurtvictim = 1; hurtvictim = 1;
@ -84,13 +83,13 @@ monitorempgrenade()
} }
} }
applyemp( attacker ) applyemp( attacker ) //checked matches cerberus output
{ {
self notify( "applyEmp" ); self notify( "applyEmp" );
self endon( "applyEmp" ); self endon( "applyEmp" );
self endon( "disconnect" ); self endon( "disconnect" );
self endon( "death" ); self endon( "death" );
wait 0,05; wait 0.05;
if ( self == attacker ) if ( self == attacker )
{ {
if ( isDefined( self.empendtime ) ) if ( isDefined( self.empendtime ) )
@ -117,7 +116,7 @@ applyemp( attacker )
self.empgrenaded = 1; self.empgrenaded = 1;
self shellshock( "flashbang", 1 ); self shellshock( "flashbang", 1 );
self.empendtime = getTime() + ( self.empduration * 1000 ); self.empendtime = getTime() + ( self.empduration * 1000 );
self thread emprumbleloop( 0,75 ); self thread emprumbleloop( 0.75 );
self setempjammed( 1 ); self setempjammed( 1 );
self thread empgrenadedeathwaiter(); self thread empgrenadedeathwaiter();
wait self.empduration; wait self.empduration;
@ -125,7 +124,7 @@ applyemp( attacker )
self checktoturnoffemp(); self checktoturnoffemp();
} }
empgrenadedeathwaiter() empgrenadedeathwaiter() //checked matches cerberus output
{ {
self notify( "empGrenadeDeathWaiter" ); self notify( "empGrenadeDeathWaiter" );
self endon( "empGrenadeDeathWaiter" ); self endon( "empGrenadeDeathWaiter" );
@ -134,17 +133,17 @@ empgrenadedeathwaiter()
self checktoturnoffemp(); self checktoturnoffemp();
} }
checktoturnoffemp() checktoturnoffemp() //checked changed to match cerberus output
{ {
self.empgrenaded = 0; self.empgrenaded = 0;
if ( level.teambased || maps/mp/killstreaks/_emp::emp_isteamemped( self.team ) && !level.teambased && isDefined( level.empplayer ) && level.empplayer != self ) if ( level.teambased && maps/mp/killstreaks/_emp::emp_isteamemped( self.team ) || !level.teambased && isDefined( level.empplayer ) && level.empplayer != self )
{ {
return; return;
} }
self setempjammed( 0 ); self setempjammed( 0 );
} }
emprumbleloop( duration ) emprumbleloop( duration ) //checked matches cerberus output
{ {
self endon( "emp_rumble_loop" ); self endon( "emp_rumble_loop" );
self notify( "emp_rumble_loop" ); self notify( "emp_rumble_loop" );
@ -152,11 +151,11 @@ emprumbleloop( duration )
while ( getTime() < goaltime ) while ( getTime() < goaltime )
{ {
self playrumbleonentity( "damage_heavy" ); self playrumbleonentity( "damage_heavy" );
wait 0,05; wait 0.05;
} }
} }
watchempexplosion( owner, weaponname ) watchempexplosion( owner, weaponname ) //checked changed to match cerberus output
{ {
owner endon( "disconnect" ); owner endon( "disconnect" );
owner endon( "team_changed" ); owner endon( "team_changed" );
@ -165,20 +164,17 @@ watchempexplosion( owner, weaponname )
owner addweaponstat( weaponname, "used", 1 ); owner addweaponstat( weaponname, "used", 1 );
self waittill( "explode", origin, surface ); self waittill( "explode", origin, surface );
ents = getdamageableentarray( origin, 512 ); ents = getdamageableentarray( origin, 512 );
_a223 = ents; foreach ( ent in ents )
_k223 = getFirstArrayKey( _a223 );
while ( isDefined( _k223 ) )
{ {
ent = _a223[ _k223 ];
ent dodamage( 1, origin, owner, owner, "none", "MOD_GRENADE_SPLASH", 0, weaponname ); ent dodamage( 1, origin, owner, owner, "none", "MOD_GRENADE_SPLASH", 0, weaponname );
_k223 = getNextArrayKey( _a223, _k223 );
} }
} }
watchempgrenadeshutdown() watchempgrenadeshutdown() //checked matches cerberus output
{ {
self endon( "explode" ); self endon( "explode" );
self waittill( "death" ); self waittill( "death" );
wait 0,05; wait 0.05;
self notify( "shutdown_empgrenade" ); self notify( "shutdown_empgrenade" );
} }

View File

@ -1,6 +1,7 @@
//checked includes match cerberus output
#include common_scripts/utility; #include common_scripts/utility;
init() init() //checked matches cerberus output
{ {
if ( isDefined( level.initedentityheadicons ) ) if ( isDefined( level.initedentityheadicons ) )
{ {
@ -11,12 +12,14 @@ init()
return; return;
} }
level.initedentityheadicons = 1; level.initedentityheadicons = 1;
/*
/# /#
assert( isDefined( game[ "entity_headicon_allies" ] ), "Allied head icons are not defined. Check the team set for the level." ); assert( isDefined( game[ "entity_headicon_allies" ] ), "Allied head icons are not defined. Check the team set for the level." );
#/ #/
/# /#
assert( isDefined( game[ "entity_headicon_axis" ] ), "Axis head icons are not defined. Check the team set for the level." ); assert( isDefined( game[ "entity_headicon_axis" ] ), "Axis head icons are not defined. Check the team set for the level." );
#/ #/
*/
precacheshader( game[ "entity_headicon_allies" ] ); precacheshader( game[ "entity_headicon_allies" ] );
precacheshader( game[ "entity_headicon_axis" ] ); precacheshader( game[ "entity_headicon_axis" ] );
if ( !level.teambased ) if ( !level.teambased )
@ -26,7 +29,7 @@ init()
level.entitieswithheadicons = []; level.entitieswithheadicons = [];
} }
setentityheadicon( team, owner, offset, icon, constant_size ) setentityheadicon( team, owner, offset, icon, constant_size ) //checked changed to match cerberus output
{ {
if ( !level.teambased && !isDefined( owner ) ) if ( !level.teambased && !isDefined( owner ) )
{ {
@ -57,16 +60,14 @@ setentityheadicon( team, owner, offset, icon, constant_size )
{ {
self.entityheadiconoffset = ( 0, 0, 0 ); self.entityheadiconoffset = ( 0, 0, 0 );
} }
while ( isDefined( self.entityheadicons ) ) if ( isDefined( self.entityheadicons ) )
{ {
i = 0; for ( i = 0; i < self.entityheadicons.size; i++ )
while ( i < self.entityheadicons.size )
{ {
if ( isDefined( self.entityheadicons[ i ] ) ) if ( isDefined( self.entityheadicons[ i ] ) )
{ {
self.entityheadicons[ i ] destroy(); self.entityheadicons[ i ] destroy();
} }
i++;
} }
} }
self.entityheadicons = []; self.entityheadicons = [];
@ -79,84 +80,80 @@ setentityheadicon( team, owner, offset, icon, constant_size )
{ {
if ( !isplayer( owner ) ) if ( !isplayer( owner ) )
{ {
/*
/# /#
assert( isDefined( owner.owner ), "entity has to have an owner if it's not a player" ); assert( isDefined( owner.owner ), "entity has to have an owner if it's not a player" );
#/ #/
*/
owner = owner.owner; owner = owner.owner;
} }
owner updateentityheadclienticon( self, icon, constant_size ); owner updateentityheadclienticon( self, icon, constant_size );
} }
else else if ( isDefined( owner ) && team != "none" )
{ {
if ( isDefined( owner ) && team != "none" ) owner updateentityheadteamicon( self, team, icon, constant_size );
{
owner updateentityheadteamicon( self, team, icon, constant_size );
}
} }
self thread destroyheadiconsondeath(); self thread destroyheadiconsondeath();
} }
updateentityheadteamicon( entity, team, icon, constant_size ) updateentityheadteamicon( entity, team, icon, constant_size ) //checked matches cerberus output
{ {
headicon = newteamhudelem( team ); headicon = newteamhudelem( team );
headicon.archived = 1; headicon.archived = 1;
headicon.x = entity.entityheadiconoffset[ 0 ]; headicon.x = entity.entityheadiconoffset[ 0 ];
headicon.y = entity.entityheadiconoffset[ 1 ]; headicon.y = entity.entityheadiconoffset[ 1 ];
headicon.z = entity.entityheadiconoffset[ 2 ]; headicon.z = entity.entityheadiconoffset[ 2 ];
headicon.alpha = 0,8; headicon.alpha = 0.8;
headicon setshader( icon, 6, 6 ); headicon setshader( icon, 6, 6 );
headicon setwaypoint( constant_size ); headicon setwaypoint( constant_size );
headicon settargetent( entity ); headicon settargetent( entity );
entity.entityheadicons[ entity.entityheadicons.size ] = headicon; entity.entityheadicons[ entity.entityheadicons.size ] = headicon;
} }
updateentityheadclienticon( entity, icon, constant_size ) updateentityheadclienticon( entity, icon, constant_size ) //checked matches cerberus output
{ {
headicon = newclienthudelem( self ); headicon = newclienthudelem( self );
headicon.archived = 1; headicon.archived = 1;
headicon.x = entity.entityheadiconoffset[ 0 ]; headicon.x = entity.entityheadiconoffset[ 0 ];
headicon.y = entity.entityheadiconoffset[ 1 ]; headicon.y = entity.entityheadiconoffset[ 1 ];
headicon.z = entity.entityheadiconoffset[ 2 ]; headicon.z = entity.entityheadiconoffset[ 2 ];
headicon.alpha = 0,8; headicon.alpha = 0.8;
headicon setshader( icon, 6, 6 ); headicon setshader( icon, 6, 6 );
headicon setwaypoint( constant_size ); headicon setwaypoint( constant_size );
headicon settargetent( entity ); headicon settargetent( entity );
entity.entityheadicons[ entity.entityheadicons.size ] = headicon; entity.entityheadicons[ entity.entityheadicons.size ] = headicon;
} }
destroyheadiconsondeath() destroyheadiconsondeath() //checked changed to match cerberus output
{ {
self waittill_any( "death", "hacked" ); self waittill_any( "death", "hacked" );
i = 0; for ( i = 0; i < self.entityheadicons.size; i++ )
while ( i < self.entityheadicons.size )
{ {
if ( isDefined( self.entityheadicons[ i ] ) ) if ( isDefined( self.entityheadicons[ i ] ) )
{ {
self.entityheadicons[ i ] destroy(); self.entityheadicons[ i ] destroy();
} }
i++;
} }
} }
destroyentityheadicons() destroyentityheadicons() //checked changed to match cerberus output
{ {
while ( isDefined( self.entityheadicons ) ) if ( isDefined( self.entityheadicons ) )
{ {
i = 0; for ( i = 0; i < self.entityheadicons.size; i++ )
while ( i < self.entityheadicons.size )
{ {
if ( isDefined( self.entityheadicons[ i ] ) ) if ( isDefined( self.entityheadicons[ i ] ) )
{ {
self.entityheadicons[ i ] destroy(); self.entityheadicons[ i ] destroy();
} }
i++;
} }
} }
} }
updateentityheadiconpos( headicon ) updateentityheadiconpos( headicon ) //checked matches cerberus output
{ {
headicon.x = self.origin[ 0 ] + self.entityheadiconoffset[ 0 ]; headicon.x = self.origin[ 0 ] + self.entityheadiconoffset[ 0 ];
headicon.y = self.origin[ 1 ] + self.entityheadiconoffset[ 1 ]; headicon.y = self.origin[ 1 ] + self.entityheadiconoffset[ 1 ];
headicon.z = self.origin[ 2 ] + self.entityheadiconoffset[ 2 ]; headicon.z = self.origin[ 2 ] + self.entityheadiconoffset[ 2 ];
} }

View File

@ -1,6 +1,7 @@
//checked includes match cerberus output
#include maps/mp/_utility; #include maps/mp/_utility;
main() main() //checked matches cerberus output
{ {
precacheshellshock( "flashbang" ); precacheshellshock( "flashbang" );
level.sound_flash_start = ""; level.sound_flash_start = "";
@ -8,17 +9,17 @@ main()
level.sound_flash_stop = ""; level.sound_flash_stop = "";
} }
startmonitoringflash() startmonitoringflash() //checked matches cerberus output
{ {
self thread monitorflash(); self thread monitorflash();
} }
stopmonitoringflash( disconnected ) stopmonitoringflash( disconnected ) //checked matches cerberus output
{ {
self notify( "stop_monitoring_flash" ); self notify( "stop_monitoring_flash" );
} }
flashrumbleloop( duration ) flashrumbleloop( duration ) //checked matches cerberus output
{ {
self endon( "stop_monitoring_flash" ); self endon( "stop_monitoring_flash" );
self endon( "flash_rumble_loop" ); self endon( "flash_rumble_loop" );
@ -27,46 +28,45 @@ flashrumbleloop( duration )
while ( getTime() < goaltime ) while ( getTime() < goaltime )
{ {
self playrumbleonentity( "damage_heavy" ); self playrumbleonentity( "damage_heavy" );
wait 0,05; wait 0.05;
} }
} }
monitorflash_internal( amount_distance, amount_angle, attacker, direct_on_player ) monitorflash_internal( amount_distance, amount_angle, attacker, direct_on_player ) //checked changed to match cerberus output
{ {
hurtattacker = 0; hurtattacker = 0;
hurtvictim = 1; hurtvictim = 1;
if ( amount_angle < 0,5 ) if ( amount_angle < 0.5 )
{ {
amount_angle = 0,5; amount_angle = 0.5;
} }
else else if ( amount_angle > 0.8 )
{ {
if ( amount_angle > 0,8 ) amount_angle = 1;
{
amount_angle = 1;
}
} }
if ( isDefined( attacker ) && attacker == self ) if ( isDefined( attacker ) && attacker == self )
{ {
amount_distance *= 0,5; amount_distance *= 0.5;
} }
duration = amount_distance * amount_angle * 6; duration = amount_distance * amount_angle * 6;
if ( duration < 0,25 ) if ( duration < 0.25 )
{ {
return; return;
} }
rumbleduration = undefined; rumbleduration = undefined;
if ( duration > 2 ) if ( duration > 2 )
{ {
rumbleduration = 0,75; rumbleduration = 0.75;
} }
else else
{ {
rumbleduration = 0,25; rumbleduration = 0.25;
} }
/*
/# /#
assert( isDefined( self.team ) ); assert( isDefined( self.team ) );
#/ #/
*/
if ( level.teambased && isDefined( attacker ) && isDefined( attacker.team ) && attacker.team == self.team && attacker != self ) if ( level.teambased && isDefined( attacker ) && isDefined( attacker.team ) && attacker.team == self.team && attacker != self )
{ {
if ( level.friendlyfire == 0 ) if ( level.friendlyfire == 0 )
@ -78,25 +78,22 @@ monitorflash_internal( amount_distance, amount_angle, attacker, direct_on_player
} }
else if ( level.friendlyfire == 2 ) else if ( level.friendlyfire == 2 )
{ {
duration *= 0,5; duration *= 0.5;
rumbleduration *= 0,5; rumbleduration *= 0.5;
hurtvictim = 0; hurtvictim = 0;
hurtattacker = 1; hurtattacker = 1;
} }
else else if ( level.friendlyfire == 3 )
{ {
if ( level.friendlyfire == 3 ) duration *= 0.5;
{ rumbleduration *= 0.5;
duration *= 0,5; hurtattacker = 1;
rumbleduration *= 0,5;
hurtattacker = 1;
}
} }
} }
if ( self hasperk( "specialty_flashprotection" ) ) if ( self hasperk( "specialty_flashprotection" ) )
{ {
duration *= 0,1; duration *= 0.1;
rumbleduration *= 0,1; rumbleduration *= 0.1;
} }
if ( hurtvictim ) if ( hurtvictim )
{ {
@ -119,14 +116,14 @@ monitorflash_internal( amount_distance, amount_angle, attacker, direct_on_player
} }
} }
monitorflash() monitorflash() //checked changed to match cerberus output
{ {
self endon( "disconnect" ); self endon( "disconnect" );
self.flashendtime = 0; self.flashendtime = 0;
while ( 1 ) while ( 1 )
{ {
self waittill( "flashbang", amount_distance, amount_angle, attacker ); self waittill( "flashbang", amount_distance, amount_angle, attacker );
while ( !isalive( self ) ) if ( !isalive( self ) )
{ {
continue; continue;
} }
@ -134,7 +131,7 @@ monitorflash()
} }
} }
monitorrcbombflash() monitorrcbombflash() //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self.flashendtime = 0; self.flashendtime = 0;
@ -150,7 +147,7 @@ monitorrcbombflash()
} }
} }
applyflash( duration, rumbleduration, attacker ) applyflash( duration, rumbleduration, attacker ) //checked matches cerberus output
{ {
if ( !isDefined( self.flashduration ) || duration > self.flashduration ) if ( !isDefined( self.flashduration ) || duration > self.flashduration )
{ {
@ -161,7 +158,7 @@ applyflash( duration, rumbleduration, attacker )
self.flashrumbleduration = rumbleduration; self.flashrumbleduration = rumbleduration;
} }
self thread playflashsound( duration ); self thread playflashsound( duration );
wait 0,05; wait 0.05;
if ( isDefined( self.flashduration ) ) if ( isDefined( self.flashduration ) )
{ {
self shellshock( "flashbang", self.flashduration, 0 ); self shellshock( "flashbang", self.flashduration, 0 );
@ -176,7 +173,7 @@ applyflash( duration, rumbleduration, attacker )
self.flashrumbleduration = undefined; self.flashrumbleduration = undefined;
} }
playflashsound( duration ) playflashsound( duration ) //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "disconnect" ); self endon( "disconnect" );
@ -186,20 +183,21 @@ playflashsound( duration )
flashsound thread deleteentonownerdeath( self ); flashsound thread deleteentonownerdeath( self );
flashsound playsound( level.sound_flash_start ); flashsound playsound( level.sound_flash_start );
flashsound playloopsound( level.sound_flash_loop ); flashsound playloopsound( level.sound_flash_loop );
if ( duration > 0,5 ) if ( duration > 0.5 )
{ {
wait ( duration - 0,5 ); wait ( duration - 0.5 );
} }
flashsound playsound( level.sound_flash_start ); flashsound playsound( level.sound_flash_start );
flashsound stoploopsound( 0,5 ); flashsound stoploopsound( 0.5 );
wait 0,5; wait 0.5;
flashsound notify( "delete" ); flashsound notify( "delete" );
flashsound delete(); flashsound delete();
} }
deleteentonownerdeath( owner ) deleteentonownerdeath( owner ) //checked matches cerberus output
{ {
self endon( "delete" ); self endon( "delete" );
owner waittill( "death" ); owner waittill( "death" );
self delete(); self delete();
} }

View File

@ -1,28 +1,26 @@
//checked includes match cerberus output
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
main() main() //checked changed to match cerberus output dvar taken from beta dump
{ {
if ( getDvar( #"7C9A91DF" ) == "" ) if ( getDvar( "mg42" ) == "" )
{ {
setdvar( "mgTurret", "off" ); setdvar( "mgTurret", "off" );
} }
level.magic_distance = 24; level.magic_distance = 24;
turretinfos = getentarray( "turretInfo", "targetname" ); turretinfos = getentarray( "turretInfo", "targetname" );
index = 0; for ( index = 0; index < turretinfos.size; index++ )
while ( index < turretinfos.size )
{ {
turretinfos[ index ] delete(); turretinfos[ index ] delete();
index++;
} }
} }
set_difficulty( difficulty ) set_difficulty( difficulty ) //checked changed to match cerberus output
{ {
init_turret_difficulty_settings(); init_turret_difficulty_settings();
turrets = getentarray( "misc_turret", "classname" ); turrets = getentarray( "misc_turret", "classname" );
index = 0; for ( index = 0; index < turrets.size; index++ )
while ( index < turrets.size )
{ {
if ( isDefined( turrets[ index ].script_skilloverride ) ) if ( isDefined( turrets[ index ].script_skilloverride ) )
{ {
@ -45,39 +43,37 @@ set_difficulty( difficulty )
break; break;
break; break;
default: default:
}
} }
turret_set_difficulty( turrets[ index ], difficulty ); turret_set_difficulty( turrets[ index ], difficulty );
index++;
} }
} }
} }
init_turret_difficulty_settings() init_turret_difficulty_settings() //checked matches cerberus output
{ {
level.mgturretsettings[ "easy" ][ "convergenceTime" ] = 2,5; level.mgturretsettings[ "easy" ][ "convergenceTime" ] = 2.5;
level.mgturretsettings[ "easy" ][ "suppressionTime" ] = 3; level.mgturretsettings[ "easy" ][ "suppressionTime" ] = 3;
level.mgturretsettings[ "easy" ][ "accuracy" ] = 0,38; level.mgturretsettings[ "easy" ][ "accuracy" ] = 0.38;
level.mgturretsettings[ "easy" ][ "aiSpread" ] = 2; level.mgturretsettings[ "easy" ][ "aiSpread" ] = 2;
level.mgturretsettings[ "easy" ][ "playerSpread" ] = 0,5; level.mgturretsettings[ "easy" ][ "playerSpread" ] = 0.5;
level.mgturretsettings[ "medium" ][ "convergenceTime" ] = 1,5; level.mgturretsettings[ "medium" ][ "convergenceTime" ] = 1.5;
level.mgturretsettings[ "medium" ][ "suppressionTime" ] = 3; level.mgturretsettings[ "medium" ][ "suppressionTime" ] = 3;
level.mgturretsettings[ "medium" ][ "accuracy" ] = 0,38; level.mgturretsettings[ "medium" ][ "accuracy" ] = 0.38;
level.mgturretsettings[ "medium" ][ "aiSpread" ] = 2; level.mgturretsettings[ "medium" ][ "aiSpread" ] = 2;
level.mgturretsettings[ "medium" ][ "playerSpread" ] = 0,5; level.mgturretsettings[ "medium" ][ "playerSpread" ] = 0.5;
level.mgturretsettings[ "hard" ][ "convergenceTime" ] = 0,8; level.mgturretsettings[ "hard" ][ "convergenceTime" ] = 0.8;
level.mgturretsettings[ "hard" ][ "suppressionTime" ] = 3; level.mgturretsettings[ "hard" ][ "suppressionTime" ] = 3;
level.mgturretsettings[ "hard" ][ "accuracy" ] = 0,38; level.mgturretsettings[ "hard" ][ "accuracy" ] = 0.38;
level.mgturretsettings[ "hard" ][ "aiSpread" ] = 2; level.mgturretsettings[ "hard" ][ "aiSpread" ] = 2;
level.mgturretsettings[ "hard" ][ "playerSpread" ] = 0,5; level.mgturretsettings[ "hard" ][ "playerSpread" ] = 0.5;
level.mgturretsettings[ "fu" ][ "convergenceTime" ] = 0,4; level.mgturretsettings[ "fu" ][ "convergenceTime" ] = 0.4;
level.mgturretsettings[ "fu" ][ "suppressionTime" ] = 3; level.mgturretsettings[ "fu" ][ "suppressionTime" ] = 3;
level.mgturretsettings[ "fu" ][ "accuracy" ] = 0,38; level.mgturretsettings[ "fu" ][ "accuracy" ] = 0.38;
level.mgturretsettings[ "fu" ][ "aiSpread" ] = 2; level.mgturretsettings[ "fu" ][ "aiSpread" ] = 2;
level.mgturretsettings[ "fu" ][ "playerSpread" ] = 0,5; level.mgturretsettings[ "fu" ][ "playerSpread" ] = 0.5;
} }
turret_set_difficulty( turret, difficulty ) turret_set_difficulty( turret, difficulty ) //checked matches cerberus output
{ {
turret.convergencetime = level.mgturretsettings[ difficulty ][ "convergenceTime" ]; turret.convergencetime = level.mgturretsettings[ difficulty ][ "convergenceTime" ];
turret.suppressiontime = level.mgturretsettings[ difficulty ][ "suppressionTime" ]; turret.suppressiontime = level.mgturretsettings[ difficulty ][ "suppressionTime" ];
@ -86,7 +82,7 @@ turret_set_difficulty( turret, difficulty )
turret.playerspread = level.mgturretsettings[ difficulty ][ "playerSpread" ]; turret.playerspread = level.mgturretsettings[ difficulty ][ "playerSpread" ];
} }
turret_suppression_fire( targets ) turret_suppression_fire( targets ) //checked matches beta dump
{ {
self endon( "death" ); self endon( "death" );
self endon( "stop_suppression_fire" ); self endon( "stop_suppression_fire" );
@ -109,36 +105,27 @@ turret_suppression_fire( targets )
} }
} }
burst_fire_settings( setting ) burst_fire_settings( setting ) //checked changed to match cerberus output
{ {
if ( setting == "delay" ) if ( setting == "delay" )
{ {
return 0,2; return 0.2;
} }
else else if ( setting == "delay_range" )
{ {
if ( setting == "delay_range" ) return 0.5;
{ }
return 0,5; else if ( setting == "burst" )
} {
else return 0.5;
{ }
if ( setting == "burst" ) else if ( setting == "burst_range" )
{ {
return 0,5; return 4;
}
else
{
if ( setting == "burst_range" )
{
return 4;
}
}
}
} }
} }
burst_fire( turret, manual_target ) burst_fire( turret, manual_target ) //checked matches cerberus output
{ {
turret endon( "death" ); turret endon( "death" );
turret endon( "stopfiring" ); turret endon( "stopfiring" );
@ -190,7 +177,7 @@ burst_fire( turret, manual_target )
} }
} }
burst_fire_unmanned() burst_fire_unmanned() //checked changed at own discretion
{ {
self notify( "stop_burst_fire_unmanned" ); self notify( "stop_burst_fire_unmanned" );
self endon( "stop_burst_fire_unmanned" ); self endon( "stop_burst_fire_unmanned" );
@ -243,7 +230,7 @@ burst_fire_unmanned()
self cleartargetentity(); self cleartargetentity();
self settargetentity( self.manual_targets[ randomint( self.manual_targets.size ) ] ); self settargetentity( self.manual_targets[ randomint( self.manual_targets.size ) ] );
} }
duration = ( pauseuntiltime - getTime() ) * 0,001; duration = ( pauseuntiltime - getTime() ) * 0.001;
if ( self isfiringturret() && duration <= 0 ) if ( self isfiringturret() && duration <= 0 )
{ {
if ( turretstate != "fire" ) if ( turretstate != "fire" )
@ -259,32 +246,28 @@ burst_fire_unmanned()
self.script_shooting = 0; self.script_shooting = 0;
duration = turret_delay + randomfloat( turret_delay_range ); duration = turret_delay + randomfloat( turret_delay_range );
pauseuntiltime = getTime() + int( duration * 1000 ); pauseuntiltime = getTime() + int( duration * 1000 );
continue;
} }
else else if ( turretstate != "aim" )
{ {
if ( turretstate != "aim" ) turretstate = "aim";
{
turretstate = "aim";
}
self thread turret_timer( duration );
self waittill( "turretstatechange" );
} }
self thread turret_timer( duration );
self waittill( "turretstatechange" );
} }
} }
do_shoot() do_shoot() //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "turretstatechange" ); self endon( "turretstatechange" );
for ( ;; ) for ( ;; )
{ {
self shootturret(); self shootturret();
wait 0,112; wait 0.112;
} }
} }
turret_timer( duration ) turret_timer( duration ) //checked matches cerberus output
{ {
if ( duration <= 0 ) if ( duration <= 0 )
{ {
@ -298,7 +281,7 @@ turret_timer( duration )
} }
} }
random_spread( ent ) random_spread( ent ) //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self notify( "stop random_spread" ); self notify( "stop random_spread" );
@ -317,6 +300,7 @@ random_spread( ent )
ent.origin = self.manual_target.origin; ent.origin = self.manual_target.origin;
} }
ent.origin += ( 20 - randomfloat( 40 ), 20 - randomfloat( 40 ), 20 - randomfloat( 60 ) ); ent.origin += ( 20 - randomfloat( 40 ), 20 - randomfloat( 40 ), 20 - randomfloat( 60 ) );
wait 0,2; wait 0.2;
} }
} }

View File

@ -1,3 +1,4 @@
//checked includes match cerberus output
#include maps/mp/gametypes/_damagefeedback; #include maps/mp/gametypes/_damagefeedback;
#include maps/mp/gametypes/_globallogic_player; #include maps/mp/gametypes/_globallogic_player;
#include maps/mp/_challenges; #include maps/mp/_challenges;
@ -6,7 +7,7 @@
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
init() init() //checked matches cerberus output
{ {
level._effect[ "scrambler_enemy_light" ] = loadfx( "misc/fx_equip_light_red" ); level._effect[ "scrambler_enemy_light" ] = loadfx( "misc/fx_equip_light_red" );
level._effect[ "scrambler_friendly_light" ] = loadfx( "misc/fx_equip_light_green" ); level._effect[ "scrambler_friendly_light" ] = loadfx( "misc/fx_equip_light_green" );
@ -16,7 +17,7 @@ init()
level.scramblerinnerradiussq = 360000; level.scramblerinnerradiussq = 360000;
} }
createscramblerwatcher() createscramblerwatcher() //checked matches cerberus output
{ {
watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "scrambler", "scrambler_mp", self.team ); watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "scrambler", "scrambler_mp", self.team );
watcher.onspawn = ::onspawnscrambler; watcher.onspawn = ::onspawnscrambler;
@ -28,7 +29,7 @@ createscramblerwatcher()
watcher.ondamage = ::watchscramblerdamage; watcher.ondamage = ::watchscramblerdamage;
} }
onspawnscrambler( watcher, player ) onspawnscrambler( watcher, player ) //checked matches cerberus output
{ {
player endon( "disconnect" ); player endon( "disconnect" );
self endon( "death" ); self endon( "death" );
@ -46,7 +47,7 @@ onspawnscrambler( watcher, player )
level notify( "scrambler_spawn" ); level notify( "scrambler_spawn" );
} }
scramblerdetonate( attacker, weaponname ) scramblerdetonate( attacker, weaponname ) //checked matches cerberus output
{ {
from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname ); from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname );
if ( !from_emp ) if ( !from_emp )
@ -61,7 +62,7 @@ scramblerdetonate( attacker, weaponname )
self delete(); self delete();
} }
watchshutdown( player ) watchshutdown( player ) //checked matches cerberus output
{ {
self waittill_any( "death", "hacked" ); self waittill_any( "death", "hacked" );
level notify( "scrambler_death" ); level notify( "scrambler_death" );
@ -71,12 +72,12 @@ watchshutdown( player )
} }
} }
destroyent() destroyent() //checked matches cerberus output
{ {
self delete(); self delete();
} }
watchscramblerdamage( watcher ) watchscramblerdamage( watcher ) //checked changed to match beta dump
{ {
self endon( "death" ); self endon( "death" );
self endon( "hacked" ); self endon( "hacked" );
@ -86,86 +87,78 @@ watchscramblerdamage( watcher )
{ {
self.damagetaken = 0; self.damagetaken = 0;
} }
for ( ;; ) while ( 1 )
{ {
while ( 1 ) self.maxhealth = 100000;
self.health = self.maxhealth;
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags );
if ( !isDefined( attacker ) || !isplayer( attacker ) )
{ {
self.maxhealth = 100000; continue;
self.health = self.maxhealth; }
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags ); if ( level.teambased && attacker.team == self.owner.team && attacker != self.owner )
if ( !isDefined( attacker ) || !isplayer( attacker ) ) {
continue;
}
if ( isDefined( weaponname ) )
{
switch( weaponname )
{ {
continue; case "concussion_grenade_mp":
} case "flash_grenade_mp":
while ( level.teambased && attacker.team == self.owner.team && attacker != self.owner ) if ( watcher.stuntime > 0 )
{ {
continue; self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime );
} }
if ( isDefined( weaponname ) ) if ( level.teambased && self.owner.team != attacker.team )
{ {
switch( weaponname ) if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
case "concussion_grenade_mp":
case "flash_grenade_mp":
if ( watcher.stuntime > 0 )
{ {
self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime ); attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
if ( level.teambased && self.owner.team != attacker.team )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
continue;
}
else
{
if ( !level.teambased && self.owner != attacker )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
}
} }
} }
case "emp_grenade_mp": else if ( !level.teambased && self.owner != attacker )
damage = damagemax; {
default: if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) ) {
{ attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback(); }
}
break;
} }
}
else
{
weaponname = "";
}
while ( isplayer( attacker ) && level.teambased && isDefined( attacker.team ) && self.owner.team == attacker.team && attacker != self.owner )
{
continue; continue;
} case "emp_grenade_mp":
if ( type == "MOD_MELEE" ) damage = damagemax;
{ default:
self.damagetaken = damagemax; if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
} {
else attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
{ }
self.damagetaken += damage; break;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
}
} }
} }
else
{
weaponname = "";
}
if ( isplayer( attacker ) && level.teambased && isDefined( attacker.team ) && self.owner.team == attacker.team && attacker != self.owner )
{
continue;
}
if ( type == "MOD_MELEE" )
{
self.damagetaken = damagemax;
}
else
{
self.damagetaken += damage;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
}
} }
} }
ownersameteam( owner1, owner2 ) ownersameteam( owner1, owner2 ) //checked matches cerberus output
{ {
if ( !level.teambased ) if ( !level.teambased )
{ {
@ -182,7 +175,7 @@ ownersameteam( owner1, owner2 )
return owner1.team == owner2.team; return owner1.team == owner2.team;
} }
checkscramblerstun() checkscramblerstun() //checked partially changed to match cerberus output see info.md
{ {
scramblers = getentarray( "grenade", "classname" ); scramblers = getentarray( "grenade", "classname" );
if ( isDefined( self.name ) && self.name == "scrambler_mp" ) if ( isDefined( self.name ) && self.name == "scrambler_mp" )
@ -198,31 +191,29 @@ checkscramblerstun()
i++; i++;
continue; continue;
} }
else if ( !isDefined( scrambler.name ) ) if ( !isDefined( scrambler.name ) )
{ {
i++; i++;
continue; continue;
} }
else if ( scrambler.name != "scrambler_mp" ) if ( scrambler.name != "scrambler_mp" )
{ {
i++; i++;
continue; continue;
} }
else if ( ownersameteam( self.owner, scrambler.owner ) ) if ( ownersameteam( self.owner, scrambler.owner ) )
{ {
i++; i++;
continue; continue;
} }
else flattenedselforigin = ( self.origin[ 0 ], self.origin[ 1 ], 0 );
flattenedscramblerorigin = ( scrambler.origin[ 0 ], scrambler.origin[ 1 ], 0 );
if ( distancesquared( flattenedselforigin, flattenedscramblerorigin ) < level.scramblerouterradiussq )
{ {
flattenedselforigin = ( self.origin[ 0 ], self.origin[ 1 ], 0 ); return 1;
flattenedscramblerorigin = ( scrambler.origin[ 0 ], scrambler.origin[ 1 ], 0 );
if ( distancesquared( flattenedselforigin, flattenedscramblerorigin ) < level.scramblerouterradiussq )
{
return 1;
}
} }
i++; i++;
} }
return 0; return 0;
} }

View File

@ -1,3 +1,4 @@
//checked includes match cerberus output
#include maps/mp/gametypes/_damagefeedback; #include maps/mp/gametypes/_damagefeedback;
#include maps/mp/gametypes/_globallogic_player; #include maps/mp/gametypes/_globallogic_player;
#include maps/mp/_utility; #include maps/mp/_utility;
@ -8,12 +9,12 @@
#include maps/mp/gametypes/_weaponobjects; #include maps/mp/gametypes/_weaponobjects;
#include common_scripts/utility; #include common_scripts/utility;
init() init() //checked matches cerberus output
{ {
level.isplayertrackedfunc = ::isplayertracked; level.isplayertrackedfunc = ::isplayertracked;
} }
createsensorgrenadewatcher() createsensorgrenadewatcher() //checked matches cerberus output
{ {
watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "sensor_grenade", "sensor_grenade_mp", self.team ); watcher = self maps/mp/gametypes/_weaponobjects::createuseweaponobjectwatcher( "sensor_grenade", "sensor_grenade_mp", self.team );
watcher.headicon = 0; watcher.headicon = 0;
@ -26,7 +27,7 @@ createsensorgrenadewatcher()
watcher.enemydestroy = 1; watcher.enemydestroy = 1;
} }
onspawnsensorgrenade( watcher, player ) onspawnsensorgrenade( watcher, player ) //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self thread maps/mp/gametypes/_weaponobjects::onspawnuseweaponobject( watcher, player ); self thread maps/mp/gametypes/_weaponobjects::onspawnuseweaponobject( watcher, player );
@ -40,7 +41,7 @@ onspawnsensorgrenade( watcher, player )
self thread watchforexplode( player ); self thread watchforexplode( player );
} }
watchforstationary( owner ) watchforstationary( owner ) //checked matches cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "hacked" ); self endon( "hacked" );
@ -51,7 +52,7 @@ watchforstationary( owner )
checkfortracking( self.origin ); checkfortracking( self.origin );
} }
watchforexplode( owner ) watchforexplode( owner ) //checked matches cerberus output
{ {
self endon( "hacked" ); self endon( "hacked" );
self endon( "delete" ); self endon( "delete" );
@ -61,18 +62,15 @@ watchforexplode( owner )
checkfortracking( origin + ( 0, 0, 1 ) ); checkfortracking( origin + ( 0, 0, 1 ) );
} }
checkfortracking( origin ) checkfortracking( origin ) //checked changed to match cerberus output
{ {
if ( isDefined( self.owner ) == 0 ) if ( isDefined( self.owner ) == 0 )
{ {
return; return;
} }
players = level.players; players = level.players;
_a85 = level.players; foreach ( player in level.players )
_k85 = getFirstArrayKey( _a85 );
while ( isDefined( _k85 ) )
{ {
player = _a85[ _k85 ];
if ( player isenemyplayer( self.owner ) ) if ( player isenemyplayer( self.owner ) )
{ {
if ( !player hasperk( "specialty_nomotionsensor" ) ) if ( !player hasperk( "specialty_nomotionsensor" ) )
@ -87,11 +85,10 @@ checkfortracking( origin )
} }
} }
} }
_k85 = getNextArrayKey( _a85, _k85 );
} }
} }
tracksensorgrenadevictim( victim ) tracksensorgrenadevictim( victim ) //checked matches cerberus output
{ {
if ( !isDefined( self.sensorgrenadedata ) ) if ( !isDefined( self.sensorgrenadedata ) )
{ {
@ -103,7 +100,7 @@ tracksensorgrenadevictim( victim )
} }
} }
isplayertracked( player, time ) isplayertracked( player, time ) //checked matches cerberus output
{ {
playertracked = 0; playertracked = 0;
if ( isDefined( self.sensorgrenadedata ) && isDefined( self.sensorgrenadedata[ player.clientid ] ) ) if ( isDefined( self.sensorgrenadedata ) && isDefined( self.sensorgrenadedata[ player.clientid ] ) )
@ -116,7 +113,7 @@ isplayertracked( player, time )
return playertracked; return playertracked;
} }
sensorgrenadedestroyed( attacker, weaponname ) sensorgrenadedestroyed( attacker, weaponname ) //checked matches cerberus output
{ {
from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname ); from_emp = maps/mp/killstreaks/_emp::isempweapon( weaponname );
if ( !from_emp ) if ( !from_emp )
@ -135,7 +132,7 @@ sensorgrenadedestroyed( attacker, weaponname )
self delete(); self delete();
} }
watchsensorgrenadedamage( watcher ) watchsensorgrenadedamage( watcher ) //checked changed to match beta dump
{ {
self endon( "death" ); self endon( "death" );
self endon( "hacked" ); self endon( "hacked" );
@ -145,81 +142,77 @@ watchsensorgrenadedamage( watcher )
{ {
self.damagetaken = 0; self.damagetaken = 0;
} }
for ( ;; ) while ( 1 )
{ {
while ( 1 ) self.maxhealth = 100000;
self.health = self.maxhealth;
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags );
if ( !isDefined( attacker ) || !isplayer( attacker ) )
{ {
self.maxhealth = 100000; continue;
self.health = self.maxhealth; }
self waittill( "damage", damage, attacker, direction, point, type, tagname, modelname, partname, weaponname, idflags ); if ( level.teambased && isplayer( attacker ) )
if ( !isDefined( attacker ) || !isplayer( attacker ) ) {
if ( !level.hardcoremode && self.owner.team == attacker.pers[ "team" ] && self.owner != attacker )
{ {
continue; continue;
} }
while ( level.teambased && isplayer( attacker ) ) }
if ( isDefined( weaponname ) )
{
switch( weaponname )
{ {
while ( !level.hardcoremode && self.owner.team == attacker.pers[ "team" ] && self.owner != attacker ) case "concussion_grenade_mp":
{ case "flash_grenade_mp":
if ( watcher.stuntime > 0 )
{
self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime );
}
if ( level.teambased && self.owner.team != attacker.team )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
}
else
{
if ( !level.teambased && self.owner != attacker )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
}
}
continue; continue;
} case "emp_grenade_mp":
} damage = damagemax;
if ( isDefined( weaponname ) ) default:
{ if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
switch( weaponname ) {
{ attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
case "concussion_grenade_mp":
case "flash_grenade_mp":
if ( watcher.stuntime > 0 )
{
self thread maps/mp/gametypes/_weaponobjects::stunstart( watcher, watcher.stuntime );
}
if ( level.teambased && self.owner.team != attacker.team )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
continue;
}
else
{
if ( !level.teambased && self.owner != attacker )
{
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
}
}
} }
case "emp_grenade_mp": break;
damage = damagemax;
default:
if ( maps/mp/gametypes/_globallogic_player::dodamagefeedback( weaponname, attacker ) )
{
attacker maps/mp/gametypes/_damagefeedback::updatedamagefeedback();
}
break;
}
}
else
{
weaponname = "";
}
if ( type == "MOD_MELEE" )
{
self.damagetaken = damagemax;
}
else
{
self.damagetaken += damage;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
return;
}
} }
} }
else
{
weaponname = "";
}
if ( type == "MOD_MELEE" )
{
self.damagetaken = damagemax;
}
else
{
self.damagetaken += damage;
}
if ( self.damagetaken >= damagemax )
{
watcher thread maps/mp/gametypes/_weaponobjects::waitanddetonate( self, 0, attacker, weaponname );
return;
}
} }
} }

View File

@ -1,6 +1,7 @@
//checked includes match cerberus output
#include maps/mp/gametypes/_perplayer; #include maps/mp/gametypes/_perplayer;
main() main() //checked matches cerberus output
{ {
level.tearradius = 170; level.tearradius = 170;
level.tearheight = 128; level.tearheight = 128;
@ -13,20 +14,20 @@ main()
maps/mp/gametypes/_perplayer::enable( fgmonitor ); maps/mp/gametypes/_perplayer::enable( fgmonitor );
} }
startmonitoringtearusage() startmonitoringtearusage() //checked matches cerberus output
{ {
self thread monitortearusage(); self thread monitortearusage();
} }
stopmonitoringtearusage( disconnected ) stopmonitoringtearusage( disconnected ) //checked matches cerberus output
{ {
self notify( "stop_monitoring_tear_usage" ); self notify( "stop_monitoring_tear_usage" );
} }
monitortearusage() monitortearusage() //checked changed to match cerberus output
{ {
self endon( "stop_monitoring_tear_usage" ); self endon( "stop_monitoring_tear_usage" );
wait 0,05; wait 0.05;
if ( !self hasweapon( "tear_grenade_mp" ) ) if ( !self hasweapon( "tear_grenade_mp" ) )
{ {
return; return;
@ -35,19 +36,15 @@ monitortearusage()
while ( 1 ) while ( 1 )
{ {
ammo = self getammocount( "tear_grenade_mp" ); ammo = self getammocount( "tear_grenade_mp" );
while ( ammo < prevammo ) if ( ammo < prevammo )
{ {
num = prevammo - ammo; num = prevammo - ammo;
/# for ( i = 0; i < num; i++ )
#/
i = 0;
while ( i < num )
{ {
grenades = getentarray( "grenade", "classname" ); grenades = getentarray( "grenade", "classname" );
bestdist = undefined; bestdist = undefined;
bestg = undefined; bestg = undefined;
g = 0; for ( g = 0; g < grenades.size; g++ )
while ( g < grenades.size )
{ {
if ( !isDefined( grenades[ g ].teargrenade ) ) if ( !isDefined( grenades[ g ].teargrenade ) )
{ {
@ -58,29 +55,27 @@ monitortearusage()
bestg = g; bestg = g;
} }
} }
g++;
} }
if ( isDefined( bestdist ) ) if ( isDefined( bestdist ) )
{ {
grenades[ bestg ].teargrenade = 1; grenades[ bestg ].teargrenade = 1;
grenades[ bestg ] thread teargrenade_think( self.team ); grenades[ bestg ] thread teargrenade_think( self.team );
} }
i++;
} }
} }
prevammo = ammo; prevammo = ammo;
wait 0,05; wait 0.05;
} }
} }
teargrenade_think( team ) teargrenade_think( team ) //checked matches cerberus output
{ {
wait level.teargrenadetimer; wait level.teargrenadetimer;
ent = spawnstruct(); ent = spawnstruct();
ent thread tear( self.origin ); ent thread tear( self.origin );
} }
tear( pos ) tear( pos ) //checked changed to match beta dump
{ {
trig = spawn( "trigger_radius", pos, 0, level.tearradius, level.tearheight ); trig = spawn( "trigger_radius", pos, 0, level.tearradius, level.tearheight );
starttime = getTime(); starttime = getTime();
@ -89,7 +84,7 @@ tear( pos )
while ( 1 ) while ( 1 )
{ {
trig waittill( "trigger", player ); trig waittill( "trigger", player );
while ( player.sessionstate != "playing" ) if ( player.sessionstate != "playing" )
{ {
continue; continue;
} }
@ -98,16 +93,16 @@ tear( pos )
curheight = level.tearheight; curheight = level.tearheight;
if ( time < level.teargasfillduration ) if ( time < level.teargasfillduration )
{ {
currad *= time / level.teargasfillduration; currad = currad * ( time / level.teargasfillduration );
curheight *= time / level.teargasfillduration; curheight = curheight * ( time / level.teargasfillduration );
} }
offset = ( player.origin + vectorScale( ( 0, 0, 1 ), 32 ) ) - pos; offset = ( player.origin + vectorScale( ( 0, 0, 1 ), 32 ) ) - pos;
offset2d = ( offset[ 0 ], offset[ 1 ], 0 ); offset2d = ( offset[ 0 ], offset[ 1 ], 0 );
while ( lengthsquared( offset2d ) > ( currad * currad ) ) if ( lengthsquared( offset2d ) > ( currad * currad ) )
{ {
continue; continue;
} }
while ( ( player.origin[ 2 ] - pos[ 2 ] ) > curheight ) if ( ( player.origin[ 2 ] - pos[ 2 ] ) > curheight )
{ {
continue; continue;
} }
@ -119,13 +114,13 @@ tear( pos )
} }
} }
teartimer() teartimer() //checked matches cerberus output
{ {
wait level.teargasduration; wait level.teargasduration;
self notify( "tear_timeout" ); self notify( "tear_timeout" );
} }
teargassuffering() teargassuffering() //checked changed to match cerberus output
{ {
self endon( "death" ); self endon( "death" );
self endon( "disconnect" ); self endon( "disconnect" );
@ -140,10 +135,7 @@ teargassuffering()
{ {
break; break;
} }
else wait 1;
{
wait 1;
}
} }
self shellshock( "teargas", 1 ); self shellshock( "teargas", 1 );
if ( self mayapplyscreeneffect() ) if ( self mayapplyscreeneffect() )
@ -152,7 +144,7 @@ teargassuffering()
} }
} }
drawcylinder( pos, rad, height ) drawcylinder( pos, rad, height ) //checked changed to match beta dump
{ {
time = 0; time = 0;
while ( 1 ) while ( 1 )
@ -161,27 +153,23 @@ drawcylinder( pos, rad, height )
curheight = height; curheight = height;
if ( time < level.teargasfillduration ) if ( time < level.teargasfillduration )
{ {
currad *= time / level.teargasfillduration; currad = currad * ( time / level.teargasfillduration );
curheight *= time / level.teargasfillduration; curheight = curheight * ( time / level.teargasfillduration );
} }
r = 0; for ( r = 0; r < 20; r++ )
while ( r < 20 )
{ {
theta = ( r / 20 ) * 360; theta = ( r / 20 ) * 360;
theta2 = ( ( r + 1 ) / 20 ) * 360; theta2 = ( ( r + 1 ) / 20 ) * 360;
line( pos + ( cos( theta ) * currad, sin( theta ) * currad, 0 ), pos + ( cos( theta2 ) * currad, sin( theta2 ) * currad, 0 ) ); line( pos + ( cos( theta ) * currad, sin( theta ) * currad, 0 ), pos + ( cos( theta2 ) * currad, sin( theta2 ) * currad, 0 ) );
line( pos + ( cos( theta ) * currad, sin( theta ) * currad, curheight ), pos + ( cos( theta2 ) * currad, sin( theta2 ) * currad, curheight ) ); line( pos + ( cos( theta ) * currad, sin( theta ) * currad, curheight ), pos + ( cos( theta2 ) * currad, sin( theta2 ) * currad, curheight ) );
line( pos + ( cos( theta ) * currad, sin( theta ) * currad, 0 ), pos + ( cos( theta ) * currad, sin( theta ) * currad, curheight ) ); line( pos + ( cos( theta ) * currad, sin( theta ) * currad, 0 ), pos + ( cos( theta ) * currad, sin( theta ) * currad, curheight ) );
r++;
} }
time += 0,05; time += 0.05;
if ( time > level.teargasduration ) if ( time > level.teargasduration )
{ {
return; return;
} }
else wait 0.05;
{
wait 0,05;
}
} }
} }

View File

@ -1,5 +1,5 @@
loadtreadfx( vehicle ) loadtreadfx( vehicle ) //checked matches cerberus output
{ {
treadfx = vehicle.treadfxnamearray; treadfx = vehicle.treadfxnamearray;
if ( isDefined( treadfx ) ) if ( isDefined( treadfx ) )
@ -116,13 +116,12 @@ loadtreadfx( vehicle )
} }
} }
preloadtreadfx( vehicle ) preloadtreadfx( vehicle ) //checked changed to match cerberus output
{ {
treadfx = getvehicletreadfxarray( vehicle ); treadfx = getvehicletreadfxarray( vehicle );
i = 0; for ( i = 0; i < treadfx.size; i++ )
while ( i < treadfx.size )
{ {
loadfx( treadfx[ i ] ); loadfx( treadfx[ i ] );
i++;
} }
} }

View File

@ -27,14 +27,20 @@ patch_mp/maps/codescripts/character_mp.gsc
patch_mp/maps/codescripts/delete.gsc patch_mp/maps/codescripts/delete.gsc
patch_mp/maps/codescripts/struct.gsc patch_mp/maps/codescripts/struct.gsc
patch_mp/maps/mp/_acousticsensor.gsc
patch_mp/maps/mp/_ambientpackage.gsc patch_mp/maps/mp/_ambientpackage.gsc
patch_mp/maps/mp/_audio.gsc patch_mp/maps/mp/_audio.gsc
patch_mp/maps/mp/_ballistic_knife.gsc
patch_mp/maps/mp/_bb.gsc patch_mp/maps/mp/_bb.gsc
patch_mp/maps/mp/_bouncingbetty.gsc
patch_mp/maps/mp/_busing.gsc patch_mp/maps/mp/_busing.gsc
patch_mp/maps/mp/_compass.gsc patch_mp/maps/mp/_compass.gsc
patch_mp/maps/mp/_demo.gsc patch_mp/maps/mp/_demo.gsc
patch_mp/maps/mp/_development_dvars.gsc patch_mp/maps/mp/_development_dvars.gsc
patch_mp/maps/mp/_empgrenade.gsc
patch_mp/maps/mp/_entityheadicons.gsc
patch_mp/maps/mp/_explosive_bolt.gsc patch_mp/maps/mp/_explosive_bolt.gsc
patch_mp/maps/mp/_flashgrenades.gsc
patch_mp/maps/mp/_fxanim.gsc patch_mp/maps/mp/_fxanim.gsc
patch_mp/maps/mp/_medals.gsc patch_mp/maps/mp/_medals.gsc
patch_mp/maps/mp/_menus.gsc patch_mp/maps/mp/_menus.gsc
@ -42,8 +48,12 @@ patch_mp/maps/mp/_multi_extracam.gsc
patch_mp/maps/mp/_music.gsc patch_mp/maps/mp/_music.gsc
patch_mp/maps/mp/_pc.gsc patch_mp/maps/mp/_pc.gsc
patch_mp/maps/mp/_satchel_charge.gsc patch_mp/maps/mp/_satchel_charge.gsc
patch_mp/maps/mp/_scrambler.gsc
patch_mp/maps/mp/_sensor_grenade.gsc
patch_mp/maps/mp/_smokegrenade.gsc patch_mp/maps/mp/_smokegrenade.gsc
patch_mp/maps/mp/_sticky_grenade.gsc patch_mp/maps/mp/_sticky_grenade.gsc
patch_mp/maps/mp/_teargrenades.gsc
patch_mp/maps/mp/_treadfx.gsc
patch_mp/maps/mp/mp_bridge.gsc patch_mp/maps/mp/mp_bridge.gsc
patch_mp/maps/mp/mp_carrier.gsc patch_mp/maps/mp/mp_carrier.gsc
patch_mp/maps/mp/mp_castaway.sc patch_mp/maps/mp/mp_castaway.sc
@ -149,19 +159,9 @@ patch_mp/maps/mp/teams/_teamset_multiteam.gsc
``` ```
patch_mp/maps/common_scripts/utility.gsc patch_mp/maps/common_scripts/utility.gsc
patch_mp/maps/mp/_acousticsensor.gsc
patch_mp/maps/mp/_art.gsc
patch_mp/maps/mp/_ballistic_knife.gsc
patch_mp/maps/mp/_bouncingbetty.gsc
patch_mp/maps/mp/_challenges.gsc patch_mp/maps/mp/_challenges.gsc
patch_mp/maps/mp/_createfx.gsc
patch_mp/maps/mp/_createfxmenu.gsc
patch_mp/maps/mp/_createfxundo.gsc
patch_mp/maps/mp/_decoy.gsc patch_mp/maps/mp/_decoy.gsc
patch_mp/maps/mp/_destructible.gsc patch_mp/maps/mp/_destructible.gsc
patch_mp/maps/mp/_empgrenade.gsc
patch_mp/maps/mp/_entityheadicons.gsc
patch_mp/maps/mp/_flashgrenades.gsc
patch_mp/maps/mp/_fx.gsc patch_mp/maps/mp/_fx.gsc
patch_mp/maps/mp/_gameadvertisement.gsc patch_mp/maps/mp/_gameadvertisement.gsc
patch_mp/maps/mp/_gamerep.gsc patch_mp/maps/mp/_gamerep.gsc
@ -175,13 +175,8 @@ patch_mp/maps/mp/_popups.gsc
patch_mp/maps/mp/_proximity_grenade.gsc patch_mp/maps/mp/_proximity_grenade.gsc
patch_mp/maps/mp/_riotshield.gsc patch_mp/maps/mp/_riotshield.gsc
patch_mp/maps/mp/_scoreevents.gsc patch_mp/maps/mp/_scoreevents.gsc
patch_mp/maps/mp/_scrambler.gsc
patch_mp/maps/mp/_script_gen.gsc
patch_mp/maps/mp/_sensor_grenade.gsc
patch_mp/maps/mp/_tabun.gsc patch_mp/maps/mp/_tabun.gsc
patch_mp/maps/mp/_tacticalinsertion.gsc patch_mp/maps/mp/_tacticalinsertion.gsc
patch_mp/maps/mp/_teargrenades.gsc
patch_mp/maps/mp/_treadfx.gsc
patch_mp/maps/mp/_trophy_system.gsc patch_mp/maps/mp/_trophy_system.gsc
patch_mp/maps/mp/_utility.gsc patch_mp/maps/mp/_utility.gsc
patch_mp/maps/mp/_vehicles.gsc patch_mp/maps/mp/_vehicles.gsc
@ -216,6 +211,11 @@ patch_mp/maps/mp/killstreaks/_turret_killstreak.gsc
``` ```
### The following scipts are dev scripts filled with dev calls making them useless to modify for now ### The following scipts are dev scripts filled with dev calls making them useless to modify for now
``` ```
patch_mp/maps/mp/_art.gsc
patch_mp/maps/mp/_createfx.gsc
patch_mp/maps/mp/_createfxmenu.gsc
patch_mp/maps/mp/_createfxundo.gsc
patch_mp/maps/mp/_script_gen.gsc
patch_mp/maps/mp/gametypes/_dev.gsc patch_mp/maps/mp/gametypes/_dev.gsc
patch_mp/maps/mp/gametypes/_dev_class.gsc patch_mp/maps/mp/gametypes/_dev_class.gsc
``` ```