checked zm_transit_standard_station

This commit is contained in:
JezuzLizard 2020-05-13 12:18:04 -07:00
parent e38d100bed
commit cf41cab73b

View File

@ -6,12 +6,12 @@
#include common_scripts/utility; #include common_scripts/utility;
#include maps/mp/_utility; #include maps/mp/_utility;
precache() precache() //checked matches cerberus output
{ {
precachemodel( "zm_collision_transit_busdepot_survival" ); precachemodel( "zm_collision_transit_busdepot_survival" );
} }
station_treasure_chest_init() station_treasure_chest_init() //checked matches cerberus output
{ {
chest1 = getstruct( "depot_chest", "script_noteworthy" ); chest1 = getstruct( "depot_chest", "script_noteworthy" );
level.chests = []; level.chests = [];
@ -19,7 +19,7 @@ station_treasure_chest_init()
maps/mp/zombies/_zm_magicbox::treasure_chest_init( "depot_chest" ); maps/mp/zombies/_zm_magicbox::treasure_chest_init( "depot_chest" );
} }
main() main() //checked changed to match cerberus output
{ {
maps/mp/gametypes_zm/_zm_gametype::setup_standard_objects( "station" ); maps/mp/gametypes_zm/_zm_gametype::setup_standard_objects( "station" );
station_treasure_chest_init(); station_treasure_chest_init();
@ -32,20 +32,16 @@ main()
flag_set( "power_on" ); flag_set( "power_on" );
level setclientfield( "zombie_power_on", 1 ); level setclientfield( "zombie_power_on", 1 );
zombie_doors = getentarray( "zombie_door", "targetname" ); zombie_doors = getentarray( "zombie_door", "targetname" );
_a48 = zombie_doors; foreach ( door in zombie_doors )
_k48 = getFirstArrayKey( _a48 );
while ( isDefined( _k48 ) )
{ {
door = _a48[ _k48 ];
if ( isDefined( door.script_noteworthy ) && door.script_noteworthy == "local_electric_door" ) if ( isDefined( door.script_noteworthy ) && door.script_noteworthy == "local_electric_door" )
{ {
door trigger_off(); door trigger_off();
} }
_k48 = getNextArrayKey( _a48, _k48 );
} }
} }
enemy_location_override( zombie, enemy ) enemy_location_override( zombie, enemy ) //checked matches cerberus output
{ {
location = enemy.origin; location = enemy.origin;
if ( is_true( self.reroute ) ) if ( is_true( self.reroute ) )
@ -57,3 +53,5 @@ enemy_location_override( zombie, enemy )
} }
return location; return location;
} }