diff --git a/README.md b/README.md index 6ac6e842..3b68a441 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ #### Borough * Tunnels disabled +* Players initially spawn in the Stables zone * Added B23R, M16A1, Claymore, and Bowie Knife wallbuys * Moved Quick Revive to Speed Cola's location on Borough * Moved Speed Cola to its location on Buried diff --git a/maps/mp/zm_buried_grief_street.gsc b/maps/mp/zm_buried_grief_street.gsc index 59dbcdee..aa78fb14 100644 --- a/maps/mp/zm_buried_grief_street.gsc +++ b/maps/mp/zm_buried_grief_street.gsc @@ -67,6 +67,7 @@ main() deletebuildabletarp( "generalstore" ); deleteslothbarricades(); disable_tunnels(); + override_spawn_init(); powerswitchstate( 1 ); level.enemy_location_override_func = ::enemy_location_override; spawnmapcollision( "zm_collision_buried_street_grief" ); @@ -252,4 +253,51 @@ disable_tunnels() spawn_point.locked = 1; } } +} + +override_spawn_init() +{ + // remove existing initial spawns + structs = getstructarray("initial_spawn", "script_noteworthy"); + foreach(struct in structs) + { + if(isDefined(struct.script_string)) + { + tokens = strtok(struct.script_string, " "); + foreach(token in tokens) + { + if(token == "zgrief_street") + { + struct.script_string = undefined; + } + } + } + } + + // set new initial spawns to be same as respawns at zone_stables + ind = 0; + spawn_points = maps/mp/gametypes_zm/_zm_gametype::get_player_spawns_for_gametype(); + for(i = 0; i < spawn_points.size; i++) + { + if(spawn_points[i].script_noteworthy == "zone_stables") + { + ind = i; + break; + } + } + + init_spawn_array = getstructarray(spawn_points[ind].target, "targetname"); + foreach(init_spawn in init_spawn_array) + { + struct = spawnStruct(); + struct.origin = init_spawn.origin; + struct.angles = init_spawn.angles; + struct.radius = init_spawn.radius; + struct.script_int = init_spawn.script_int; + struct.script_noteworthy = "initial_spawn"; + struct.script_string = "zgrief_street"; + + size = level.struct_class_names["script_noteworthy"][struct.script_noteworthy].size; + level.struct_class_names["script_noteworthy"][struct.script_noteworthy][size] = struct; + } } \ No newline at end of file