mirror of
https://github.com/JezuzLizard/Public-BO2-Mods.git
synced 2025-06-09 03:28:17 -05:00
fixed invisible player glitch
This commit is contained in:
parent
7a14142e24
commit
59d4f88779
@ -1,22 +1,30 @@
|
|||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\zm_alcatraz_grief_cellblock;
|
||||||
|
#include maps\mp\zm_prison;
|
||||||
|
#include maps\mp\zm_highrise;
|
||||||
|
#include maps\mp\zm_transit;
|
||||||
|
#include maps\mp\zm_buried;
|
||||||
|
#include maps\mp\zm_tomb;
|
||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
initialMapRestart(); //this only happens once to fix invisible player bug
|
thread gscRestart();
|
||||||
thread gscRestart();
|
thread killAllPlayers();
|
||||||
thread killAllPlayers();
|
for(;;)
|
||||||
|
{
|
||||||
|
level waittill("connected", player);
|
||||||
|
if ( level.scr_zm_ui_gametype_group == "zencounter" || level.scr_zm_ui_gametype_group == "zsurvival" )
|
||||||
|
{
|
||||||
|
player thread give_team_characters(); //the real cause of the invisible player glitch these 2 functions aren't always called on map_restart so call them here
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player thread give_personality_characters();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initialMapRestart()
|
|
||||||
{
|
|
||||||
if ( getDvarIntDefault( "initial_restart", "1" ) )
|
|
||||||
{
|
|
||||||
wait 15;
|
|
||||||
setDvar( "initial_restart", "0" ); //dvars persist between map_restarts
|
|
||||||
map_restart( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gscRestart()
|
gscRestart()
|
||||||
{
|
{
|
||||||
|
@ -66,3 +66,5 @@ Not exactly ideal, but it does mean all players can remain in the lobby and all
|
|||||||
-Players keep all points
|
-Players keep all points
|
||||||
|
|
||||||
-End game check is disabled just incase player[0] leaves during the respawn function its reenabled when players are respawned
|
-End game check is disabled just incase player[0] leaves during the respawn function its reenabled when players are respawned
|
||||||
|
|
||||||
|
-Fixed invisible player glitch hopefully for good
|
||||||
|
Loading…
x
Reference in New Issue
Block a user