mirror of
https://github.com/JezuzLizard/Public-BO2-Mods.git
synced 2025-06-09 11:37:57 -05:00
sets players status to spectator instead of killing
This commit is contained in:
parent
6ff991e6ee
commit
0b2fcc2234
@ -1,5 +1,6 @@
|
|||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
|
//these map specific includes are all required for give_team_characters(), and give_personality_characters to work
|
||||||
#include maps\mp\zm_alcatraz_grief_cellblock;
|
#include maps\mp\zm_alcatraz_grief_cellblock;
|
||||||
#include maps\mp\zm_prison;
|
#include maps\mp\zm_prison;
|
||||||
#include maps\mp\zm_highrise;
|
#include maps\mp\zm_highrise;
|
||||||
@ -10,7 +11,7 @@
|
|||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
thread gscRestart();
|
thread gscRestart();
|
||||||
thread killAllPlayers();
|
thread setPlayersToSpectator();
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
level waittill("connected", player);
|
level waittill("connected", player);
|
||||||
@ -33,10 +34,9 @@ gscRestart()
|
|||||||
map_restart( false );
|
map_restart( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
killAllPlayers()
|
setPlayersToSpectator()
|
||||||
{
|
{
|
||||||
level.no_end_game_check = 1; //disable end game check just in case player[0] leaves before all players are respawned
|
level.no_end_game_check = 1;
|
||||||
level.zombie_vars["penalty_no_revive"] = 0;
|
|
||||||
wait 3;
|
wait 3;
|
||||||
players = get_players();
|
players = get_players();
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -46,25 +46,24 @@ killAllPlayers()
|
|||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
players[ i ] kill();
|
players[ i ] setToSpectator();
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
wait 5;
|
wait 5;
|
||||||
spawnAllPlayers();
|
spawnAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
kill()
|
setToSpectator()
|
||||||
{
|
{
|
||||||
self.maxhealth = 100;
|
self.sessionstate = "spectator";
|
||||||
self.health = self.maxhealth;
|
if (isDefined(self.is_playing))
|
||||||
self disableInvulnerability();
|
{
|
||||||
self dodamage( self.health * 2, self.origin );
|
self.is_playing = false;
|
||||||
self.bleedout_time = 0;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnAllPlayers()
|
spawnAllPlayers()
|
||||||
{
|
{
|
||||||
level.zombie_vars["penalty_no_revive"] = 0.1;
|
|
||||||
players = get_players();
|
players = get_players();
|
||||||
i = 0;
|
i = 0;
|
||||||
while ( i < players.size )
|
while ( i < players.size )
|
||||||
@ -73,8 +72,6 @@ spawnAllPlayers()
|
|||||||
{
|
{
|
||||||
players[ i ] [[ level.spawnplayer ]]();
|
players[ i ] [[ level.spawnplayer ]]();
|
||||||
thread maps\mp\zombies\_zm::refresh_player_navcard_hud();
|
thread maps\mp\zombies\_zm::refresh_player_navcard_hud();
|
||||||
players[ i ].score = 500;
|
|
||||||
players[ i ].downs = 0; //set player downs to 0 since they didn't actually die during gameplay
|
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,6 @@ Not exactly ideal, but it does mean all players can remain in the lobby and all
|
|||||||
|
|
||||||
-Fixed invisible player glitch hopefully for good
|
-Fixed invisible player glitch hopefully for good
|
||||||
|
|
||||||
-Players who were killed during the blackscreen have their downs set to 0
|
-Players are now directly set into spectator status instead being killed
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user