1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-25 14:40:32 -05:00

Grief: always use initial spawn point

This commit is contained in:
Jbleezy
2021-12-27 05:42:22 -08:00
parent a5b2d1fa42
commit f082d868c3
2 changed files with 28 additions and 27 deletions

View File

@ -307,6 +307,7 @@
* Added text when rounds are won/lost * Added text when rounds are won/lost
* Added new audio when enemy players bleed out * Added new audio when enemy players bleed out
* Round reset properly restores dual wield weapon left clip ammo, alternative weapon ammo, and equipment * Round reset properly restores dual wield weapon left clip ammo, alternative weapon ammo, and equipment
* Players always respawn at initial spawn points
* Fixed an issue where players initially spawned in the incorrect positions * Fixed an issue where players initially spawned in the incorrect positions
* Random map rotation * Random map rotation
* 20000 health Brutus * 20000 health Brutus

View File

@ -28,21 +28,16 @@ onspawnplayer( predictedspawn )
{ {
self scripts/zm/main/_zm_reimagined_zgrief::set_team(); self scripts/zm/main/_zm_reimagined_zgrief::set_team();
if ( flag( "start_zombie_round_logic" ) )
{
spawnpoint = maps/mp/zombies/_zm::check_for_valid_spawn_near_team( self, 1 );
}
if ( !isDefined( spawnpoint ) )
{
match_string = "";
location = level.scr_zm_map_start_location; location = level.scr_zm_map_start_location;
if ( ( location == "default" || location == "" ) && isDefined( level.default_start_location ) ) if ( ( location == "default" || location == "" ) && isDefined( level.default_start_location ) )
{ {
location = level.default_start_location; location = level.default_start_location;
} }
match_string = level.scr_zm_ui_gametype + "_" + location; match_string = level.scr_zm_ui_gametype + "_" + location;
spawnpoints = []; spawnpoints = [];
structs = getstructarray( "initial_spawn", "script_noteworthy" ); structs = getstructarray( "initial_spawn", "script_noteworthy" );
if ( isdefined( structs ) ) if ( isdefined( structs ) )
{ {
for ( i = 0; i < structs.size; i++ ) for ( i = 0; i < structs.size; i++ )
@ -60,13 +55,14 @@ onspawnplayer( predictedspawn )
} }
} }
} }
if ( !isDefined( spawnpoints ) || spawnpoints.size == 0 ) if ( !isDefined( spawnpoints ) || spawnpoints.size == 0 )
{ {
spawnpoints = getstructarray( "initial_spawn_points", "targetname" ); spawnpoints = getstructarray( "initial_spawn_points", "targetname" );
} }
spawnpoint = maps/mp/zombies/_zm::getfreespawnpoint( spawnpoints, self ); spawnpoint = maps/mp/zombies/_zm::getfreespawnpoint( spawnpoints, self );
}
if ( predictedspawn ) if ( predictedspawn )
{ {
self predictspawnpoint( spawnpoint.origin, spawnpoint.angles ); self predictspawnpoint( spawnpoint.origin, spawnpoint.angles );
@ -77,6 +73,7 @@ onspawnplayer( predictedspawn )
self spawn( spawnpoint.origin, spawnpoint.angles, "zsurvival" ); self spawn( spawnpoint.origin, spawnpoint.angles, "zsurvival" );
} }
} }
self.entity_num = self getentitynumber(); self.entity_num = self getentitynumber();
self thread maps/mp/zombies/_zm::onplayerspawned(); self thread maps/mp/zombies/_zm::onplayerspawned();
self thread maps/mp/zombies/_zm::player_revive_monitor(); self thread maps/mp/zombies/_zm::player_revive_monitor();
@ -91,11 +88,13 @@ onspawnplayer( predictedspawn )
self.zombification_time = 0; self.zombification_time = 0;
self.enabletext = 1; self.enabletext = 1;
self thread maps/mp/zombies/_zm_blockers::rebuild_barrier_reward_reset(); self thread maps/mp/zombies/_zm_blockers::rebuild_barrier_reward_reset();
if ( !is_true( level.host_ended_game ) ) if ( !is_true( level.host_ended_game ) )
{ {
self freeze_player_controls( 0 ); self freeze_player_controls( 0 );
self enableweapons(); self enableweapons();
} }
if ( isDefined( level.game_mode_spawn_player_logic ) ) if ( isDefined( level.game_mode_spawn_player_logic ) )
{ {
spawn_in_spectate = [[ level.game_mode_spawn_player_logic ]](); spawn_in_spectate = [[ level.game_mode_spawn_player_logic ]]();
@ -104,5 +103,6 @@ onspawnplayer( predictedspawn )
self delay_thread( 0.05, maps/mp/zombies/_zm::spawnspectator ); self delay_thread( 0.05, maps/mp/zombies/_zm::spawnspectator );
} }
} }
pixendevent(); pixendevent();
} }