mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 01:47:50 -05:00
checked and fixed scripts in patch_zm
Checked _globallogic_spawn.gsc. Fixed _load.gsc and _zm.gsc in patch_zm/maps/mp/zombies. Fixed zm_transit_patch/maps/mp/gametypes_zm/zgrief.gsc.
This commit is contained in:
parent
7817efc738
commit
eea54f70b2
@ -15,7 +15,7 @@
|
||||
#include maps/mp/_utility;
|
||||
#include common_scripts/utility;
|
||||
|
||||
timeuntilspawn( includeteamkilldelay )
|
||||
timeuntilspawn( includeteamkilldelay ) //checked matches cerberus output
|
||||
{
|
||||
if ( level.ingraceperiod && !self.hasspawned )
|
||||
{
|
||||
@ -46,23 +46,19 @@ timeuntilspawn( includeteamkilldelay )
|
||||
return respawndelay;
|
||||
}
|
||||
|
||||
allteamshaveexisted()
|
||||
allteamshaveexisted() //checked changed to match cerberus output
|
||||
{
|
||||
_a34 = level.teams;
|
||||
_k34 = getFirstArrayKey( _a34 );
|
||||
while ( isDefined( _k34 ) )
|
||||
foreach ( team in level.teams )
|
||||
{
|
||||
team = _a34[ _k34 ];
|
||||
if ( !level.everexisted[ team ] )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
_k34 = getNextArrayKey( _a34, _k34 );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
mayspawn()
|
||||
mayspawn() //checked partially changed to match cerberus output changed at own discretion
|
||||
{
|
||||
if ( isDefined( level.mayspawn ) && !( self [[ level.mayspawn ]]() ) )
|
||||
{
|
||||
@ -84,11 +80,16 @@ mayspawn()
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( level.maxplayercount > 1 )
|
||||
gamehasstarted = level.maxplayercount > 1;
|
||||
if ( gamehasstarted == 0 )
|
||||
{
|
||||
if ( !isoneround() )
|
||||
if ( !isoneround() && !isfirstround() )
|
||||
{
|
||||
gamehasstarted = !isfirstround();
|
||||
gamehasstarted = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gamehasstarted = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,9 +97,7 @@ mayspawn()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( gamehasstarted )
|
||||
else if ( gamehasstarted )
|
||||
{
|
||||
if ( !level.ingraceperiod && !self.hasspawned && !level.wagermatch )
|
||||
{
|
||||
@ -106,11 +105,10 @@ mayspawn()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
timeuntilwavespawn( minimumwait )
|
||||
timeuntilwavespawn( minimumwait ) //checked matches cerberus output
|
||||
{
|
||||
earliestspawntime = getTime() + ( minimumwait * 1000 );
|
||||
lastwavetime = level.lastwave[ self.pers[ "team" ] ];
|
||||
@ -129,7 +127,7 @@ timeuntilwavespawn( minimumwait )
|
||||
return ( timeofspawn - getTime() ) / 1000;
|
||||
}
|
||||
|
||||
stoppoisoningandflareonspawn()
|
||||
stoppoisoningandflareonspawn() //checked matches cerberus output
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self.inpoisonarea = 0;
|
||||
@ -138,7 +136,7 @@ stoppoisoningandflareonspawn()
|
||||
self.ingroundnapalm = 0;
|
||||
}
|
||||
|
||||
spawnplayerprediction()
|
||||
spawnplayerprediction() //checked changed to match cerberus output dvar taken from beta dump
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "end_respawn" );
|
||||
@ -147,11 +145,10 @@ spawnplayerprediction()
|
||||
self endon( "spawned" );
|
||||
while ( 1 )
|
||||
{
|
||||
wait 0,5;
|
||||
if ( isDefined( level.onspawnplayerunified ) && getDvarInt( #"CF6EEB8B" ) == 0 )
|
||||
wait 0.5;
|
||||
if ( isDefined( level.onspawnplayerunified ) && getDvarInt( "scr_disableunifiedspawning" ) == 0 )
|
||||
{
|
||||
maps/mp/gametypes_zm/_spawning::onspawnplayer_unified( 1 );
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -160,7 +157,7 @@ spawnplayerprediction()
|
||||
}
|
||||
}
|
||||
|
||||
giveloadoutlevelspecific( team, class )
|
||||
giveloadoutlevelspecific( team, class ) //checked matches cerberus output
|
||||
{
|
||||
pixbeginevent( "giveLoadoutLevelSpecific" );
|
||||
if ( isDefined( level.givecustomcharacters ) )
|
||||
@ -174,7 +171,7 @@ giveloadoutlevelspecific( team, class )
|
||||
pixendevent();
|
||||
}
|
||||
|
||||
spawnplayer()
|
||||
spawnplayer() //checked matches cerberus output dvars taken from beta dump
|
||||
{
|
||||
pixbeginevent( "spawnPlayer_preUTS" );
|
||||
self endon( "disconnect" );
|
||||
@ -205,9 +202,9 @@ spawnplayer()
|
||||
self.psoffsettime = 0;
|
||||
self.statusicon = "";
|
||||
self.damagedplayers = [];
|
||||
if ( getDvarInt( #"C8077F47" ) > 0 )
|
||||
if ( getDvarInt( "scr_csmode" ) > 0 )
|
||||
{
|
||||
self.maxhealth = getDvarInt( #"C8077F47" );
|
||||
self.maxhealth = getDvarInt( "scr_csmode" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -218,10 +215,9 @@ spawnplayer()
|
||||
self.hasspawned = 1;
|
||||
self.spawntime = getTime();
|
||||
self.afk = 0;
|
||||
if ( self.pers[ "lives" ] || !isDefined( level.takelivesondeath ) && level.takelivesondeath == 0 )
|
||||
if ( self.pers[ "lives" ] && !isDefined( level.takelivesondeath ) || level.takelivesondeath == 0 )
|
||||
{
|
||||
self.pers[ "lives" ]--;
|
||||
|
||||
if ( self.pers[ "lives" ] == 0 )
|
||||
{
|
||||
level notify( "player_eliminated" );
|
||||
@ -250,7 +246,7 @@ spawnplayer()
|
||||
self setdepthoffield( 0, 0, 512, 512, 4, 0 );
|
||||
self resetfov();
|
||||
pixbeginevent( "onSpawnPlayer" );
|
||||
if ( isDefined( level.onspawnplayerunified ) && getDvarInt( #"CF6EEB8B" ) == 0 )
|
||||
if ( isDefined( level.onspawnplayerunified ) && getDvarInt( "scr_disableunifiedspawning" ) == 0 )
|
||||
{
|
||||
self [[ level.onspawnplayerunified ]]();
|
||||
}
|
||||
@ -268,9 +264,11 @@ spawnplayer()
|
||||
pixbeginevent( "spawnPlayer_postUTS" );
|
||||
self thread stoppoisoningandflareonspawn();
|
||||
self stopburning();
|
||||
/*
|
||||
/#
|
||||
assert( maps/mp/gametypes_zm/_globallogic_utils::isvalidclass( self.class ) );
|
||||
#/
|
||||
*/
|
||||
self giveloadoutlevelspecific( self.team, self.class );
|
||||
if ( level.inprematchperiod )
|
||||
{
|
||||
@ -308,7 +306,7 @@ spawnplayer()
|
||||
{
|
||||
self thread maps/mp/gametypes_zm/_hud_message::hintmessage( hintmessage );
|
||||
}
|
||||
if ( isDefined( game[ "dialog" ][ "gametype" ] ) || !level.splitscreen && self == level.players[ 0 ] )
|
||||
if ( isDefined( game[ "dialog" ][ "gametype" ] ) && !level.splitscreen || self == level.players[ 0 ] )
|
||||
{
|
||||
if ( !isDefined( level.infinalfight ) || !level.infinalfight )
|
||||
{
|
||||
@ -418,35 +416,39 @@ spawnplayer()
|
||||
self notify( "spawned_player" );
|
||||
self logstring( "S " + self.origin[ 0 ] + " " + self.origin[ 1 ] + " " + self.origin[ 2 ] );
|
||||
setdvar( "scr_selecting_location", "" );
|
||||
/*
|
||||
/#
|
||||
if ( getDvarInt( #"F8D00F60" ) > 0 )
|
||||
if ( getDvarInt( "scr_xprate" ) > 0 )
|
||||
{
|
||||
self thread maps/mp/gametypes_zm/_globallogic_score::xpratethread();
|
||||
#/
|
||||
}
|
||||
*/
|
||||
self maps/mp/zombies/_zm_perks::perk_set_max_health_if_jugg( "health_reboot", 1, 0 );
|
||||
if ( game[ "state" ] == "postgame" )
|
||||
{
|
||||
/*
|
||||
/#
|
||||
assert( !level.intermission );
|
||||
#/
|
||||
*/
|
||||
self maps/mp/gametypes_zm/_globallogic_player::freezeplayerforroundend();
|
||||
}
|
||||
}
|
||||
|
||||
spawnspectator( origin, angles )
|
||||
spawnspectator( origin, angles ) //checked matches cerberus output
|
||||
{
|
||||
self notify( "spawned" );
|
||||
self notify( "end_respawn" );
|
||||
in_spawnspectator( origin, angles );
|
||||
}
|
||||
|
||||
respawn_asspectator( origin, angles )
|
||||
respawn_asspectator( origin, angles ) //checked matches cerberus output
|
||||
{
|
||||
in_spawnspectator( origin, angles );
|
||||
}
|
||||
|
||||
in_spawnspectator( origin, angles )
|
||||
in_spawnspectator( origin, angles ) //checked matches cerberus output
|
||||
{
|
||||
pixmarker( "BEGIN: in_spawnSpectator" );
|
||||
self setspawnvariables();
|
||||
@ -478,7 +480,7 @@ in_spawnspectator( origin, angles )
|
||||
pixmarker( "END: in_spawnSpectator" );
|
||||
}
|
||||
|
||||
spectatorthirdpersonness()
|
||||
spectatorthirdpersonness() //checked matches cerberus output
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "spawned" );
|
||||
@ -487,7 +489,7 @@ spectatorthirdpersonness()
|
||||
self.spectatingthirdperson = 0;
|
||||
}
|
||||
|
||||
forcespawn( time )
|
||||
forcespawn( time ) //checked matches cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
@ -514,14 +516,16 @@ forcespawn( time )
|
||||
self thread [[ level.spawnclient ]]();
|
||||
}
|
||||
|
||||
kickifdontspawn()
|
||||
kickifdontspawn() //checked matches cerberus output
|
||||
{
|
||||
/*
|
||||
/#
|
||||
if ( getDvarInt( "scr_hostmigrationtest" ) == 1 )
|
||||
{
|
||||
return;
|
||||
#/
|
||||
}
|
||||
*/
|
||||
if ( self ishost() )
|
||||
{
|
||||
return;
|
||||
@ -529,25 +533,25 @@ kickifdontspawn()
|
||||
self kickifidontspawninternal();
|
||||
}
|
||||
|
||||
kickifidontspawninternal()
|
||||
kickifidontspawninternal() //checked matches cerberus output dvars taken from beta dump
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
self endon( "spawned" );
|
||||
waittime = 90;
|
||||
if ( getDvar( #"4257CF5C" ) != "" )
|
||||
if ( getDvar( "scr_kick_time" ) != "" )
|
||||
{
|
||||
waittime = getDvarFloat( #"4257CF5C" );
|
||||
waittime = getDvarFloat( "scr_kick_time" );
|
||||
}
|
||||
mintime = 45;
|
||||
if ( getDvar( #"0DF057E0" ) != "" )
|
||||
if ( getDvar( scr_kick_mintime) != "" )
|
||||
{
|
||||
mintime = getDvarFloat( #"0DF057E0" );
|
||||
mintime = getDvarFloat( scr_kick_mintime);
|
||||
}
|
||||
starttime = getTime();
|
||||
kickwait( waittime );
|
||||
timepassed = ( getTime() - starttime ) / 1000;
|
||||
if ( timepassed < ( waittime - 0,1 ) && timepassed < mintime )
|
||||
if ( timepassed < ( waittime - 0.1 ) && timepassed < mintime )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -566,13 +570,13 @@ kickifidontspawninternal()
|
||||
kick( self getentitynumber() );
|
||||
}
|
||||
|
||||
kickwait( waittime )
|
||||
kickwait( waittime ) //checked matches cerberus output
|
||||
{
|
||||
level endon( "game_ended" );
|
||||
maps/mp/gametypes_zm/_hostmigration::waitlongdurationwithhostmigrationpause( waittime );
|
||||
}
|
||||
|
||||
spawninterroundintermission()
|
||||
spawninterroundintermission() //checked matches cerberus output
|
||||
{
|
||||
self notify( "spawned" );
|
||||
self notify( "end_respawn" );
|
||||
@ -588,10 +592,10 @@ spawninterroundintermission()
|
||||
self maps/mp/gametypes_zm/_globallogic_defaults::default_onspawnintermission();
|
||||
self setorigin( self.origin );
|
||||
self setplayerangles( self.angles );
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1,8 );
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1.8 );
|
||||
}
|
||||
|
||||
spawnintermission( usedefaultcallback )
|
||||
spawnintermission( usedefaultcallback ) //checked changed to match cerberus output
|
||||
{
|
||||
self notify( "spawned" );
|
||||
self notify( "end_respawn" );
|
||||
@ -601,7 +605,7 @@ spawnintermission( usedefaultcallback )
|
||||
self freeze_player_controls( 0 );
|
||||
if ( level.rankedmatch && waslastround() )
|
||||
{
|
||||
if ( !self.postgamemilestones || self.postgamecontracts && self.postgamepromotion )
|
||||
if ( self.postgamemilestones || self.postgamecontracts || self.postgamepromotion )
|
||||
{
|
||||
if ( self.postgamepromotion )
|
||||
{
|
||||
@ -623,8 +627,8 @@ spawnintermission( usedefaultcallback )
|
||||
waittime = 4;
|
||||
while ( waittime )
|
||||
{
|
||||
wait 0,25;
|
||||
waittime -= 0,25;
|
||||
wait 0.25;
|
||||
waittime -= 0.25;
|
||||
self openmenu( game[ "menu_endgameupdate" ] );
|
||||
}
|
||||
self closemenu();
|
||||
@ -644,27 +648,23 @@ spawnintermission( usedefaultcallback )
|
||||
{
|
||||
[[ level.onspawnintermission ]]();
|
||||
}
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1,8 );
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1.8 );
|
||||
}
|
||||
|
||||
spawnqueuedclientonteam( team )
|
||||
spawnqueuedclientonteam( team ) //checked partially changed to match cerberus output see info.md
|
||||
{
|
||||
player_to_spawn = undefined;
|
||||
i = 0;
|
||||
while ( i < level.deadplayers[ team ].size )
|
||||
for ( i = 0; i < level.deadplayers[team].size; i++ )
|
||||
{
|
||||
player = level.deadplayers[ team ][ i ];
|
||||
if ( player.waitingtospawn )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
player_to_spawn = player;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ( isDefined( player_to_spawn ) )
|
||||
{
|
||||
@ -674,7 +674,7 @@ spawnqueuedclientonteam( team )
|
||||
}
|
||||
}
|
||||
|
||||
spawnqueuedclient( dead_player_team, killer )
|
||||
spawnqueuedclient( dead_player_team, killer ) //checked partially changed to match cerberus output see info.md
|
||||
{
|
||||
if ( !level.playerqueuedrespawn )
|
||||
{
|
||||
@ -691,11 +691,8 @@ spawnqueuedclient( dead_player_team, killer )
|
||||
spawnqueuedclientonteam( spawn_team );
|
||||
return;
|
||||
}
|
||||
_a746 = level.teams;
|
||||
_k746 = getFirstArrayKey( _a746 );
|
||||
while ( isDefined( _k746 ) )
|
||||
foreach ( team in level.teams )
|
||||
{
|
||||
team = _a746[ _k746 ];
|
||||
if ( team == dead_player_team )
|
||||
{
|
||||
}
|
||||
@ -703,11 +700,10 @@ spawnqueuedclient( dead_player_team, killer )
|
||||
{
|
||||
spawnqueuedclientonteam( team );
|
||||
}
|
||||
_k746 = getNextArrayKey( _a746, _k746 );
|
||||
}
|
||||
}
|
||||
|
||||
allteamsnearscorelimit()
|
||||
allteamsnearscorelimit() //checked changed to match cerberus output
|
||||
{
|
||||
if ( !level.teambased )
|
||||
{
|
||||
@ -717,21 +713,17 @@ allteamsnearscorelimit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
_a763 = level.teams;
|
||||
_k763 = getFirstArrayKey( _a763 );
|
||||
while ( isDefined( _k763 ) )
|
||||
foreach ( team in level.teams )
|
||||
{
|
||||
team = _a763[ _k763 ];
|
||||
if ( ( level.scorelimit - 1 ) < game[ "teamScores" ][ team ] )
|
||||
if ( !( game[ "teamScores" ][ team ] >= ( level.scoreLimit - 1 ) ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
_k763 = getNextArrayKey( _a763, _k763 );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
shouldshowrespawnmessage()
|
||||
shouldshowrespawnmessage() //checked matches cerberus output
|
||||
{
|
||||
if ( waslastround() )
|
||||
{
|
||||
@ -752,13 +744,13 @@ shouldshowrespawnmessage()
|
||||
return 1;
|
||||
}
|
||||
|
||||
default_spawnmessage()
|
||||
default_spawnmessage() //checked matches cerberus output
|
||||
{
|
||||
setlowermessage( game[ "strings" ][ "spawn_next_round" ] );
|
||||
self thread maps/mp/gametypes_zm/_globallogic_ui::removespawnmessageshortly( 3 );
|
||||
}
|
||||
|
||||
showspawnmessage()
|
||||
showspawnmessage() //checked matches cerberus output
|
||||
{
|
||||
if ( shouldshowrespawnmessage() )
|
||||
{
|
||||
@ -766,15 +758,17 @@ showspawnmessage()
|
||||
}
|
||||
}
|
||||
|
||||
spawnclient( timealreadypassed )
|
||||
spawnclient( timealreadypassed ) //checked matches cerberus output
|
||||
{
|
||||
pixbeginevent( "spawnClient" );
|
||||
/*
|
||||
/#
|
||||
assert( isDefined( self.team ) );
|
||||
#/
|
||||
/#
|
||||
assert( maps/mp/gametypes_zm/_globallogic_utils::isvalidclass( self.class ) );
|
||||
#/
|
||||
*/
|
||||
if ( !self mayspawn() )
|
||||
{
|
||||
currentorigin = self.origin;
|
||||
@ -799,7 +793,7 @@ spawnclient( timealreadypassed )
|
||||
pixendevent();
|
||||
}
|
||||
|
||||
waitandspawnclient( timealreadypassed )
|
||||
waitandspawnclient( timealreadypassed ) //checked matches cerberus output
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "end_respawn" );
|
||||
@ -898,7 +892,7 @@ waitandspawnclient( timealreadypassed )
|
||||
self thread [[ level.spawnplayer ]]();
|
||||
}
|
||||
|
||||
waitrespawnorsafespawnbutton()
|
||||
waitrespawnorsafespawnbutton() //checked changed to match cerberus output
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "end_respawn" );
|
||||
@ -908,14 +902,11 @@ waitrespawnorsafespawnbutton()
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
wait 0,05;
|
||||
}
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
waitinspawnqueue()
|
||||
waitinspawnqueue() //checked matches cerberus output
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self endon( "end_respawn" );
|
||||
@ -928,7 +919,7 @@ waitinspawnqueue()
|
||||
}
|
||||
}
|
||||
|
||||
setthirdperson( value )
|
||||
setthirdperson( value ) //checked matches cerberus output
|
||||
{
|
||||
if ( !level.console )
|
||||
{
|
||||
@ -940,7 +931,7 @@ setthirdperson( value )
|
||||
if ( value )
|
||||
{
|
||||
self setclientthirdperson( 1 );
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1,8 );
|
||||
self setdepthoffield( 0, 128, 512, 4000, 6, 1.8 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -951,9 +942,10 @@ setthirdperson( value )
|
||||
}
|
||||
}
|
||||
|
||||
setspawnvariables()
|
||||
setspawnvariables() //checked matches cerberus output
|
||||
{
|
||||
resettimeout();
|
||||
self stopshellshock();
|
||||
self stoprumble( "damage_heavy" );
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,18 @@
|
||||
//checked includes changed to match cerberus output
|
||||
#include maps/mp/gametypes_zm/_spawnlogic;
|
||||
#include maps/mp/animscripts/traverse/shared;
|
||||
#include maps/mp/animscripts/utility;
|
||||
#include maps/mp/zombies/_load;
|
||||
#include maps/mp/_demo;
|
||||
#include maps/mp/_global_fx;
|
||||
#include maps/mp/_createfx;
|
||||
#include maps/mp/_art;
|
||||
#include maps/mp/_serverfaceanim_mp;
|
||||
#include maps/mp/_fxanim;
|
||||
#include maps/mp/_music;
|
||||
#include maps/mp/_busing;
|
||||
#include maps/mp/_audio;
|
||||
#include maps/mp/_interactive_objects;
|
||||
#include maps/mp/_script_gen;
|
||||
#include maps/mp/_utility;
|
||||
#include common_scripts/utility;
|
||||
@ -39,6 +47,7 @@ main( bscriptgened, bcsvgened, bsgenabled ) //checked partially changed to match
|
||||
{
|
||||
level.clientscripts = getDvar( "cg_usingClientScripts" );
|
||||
}
|
||||
|
||||
level._client_exploders = [];
|
||||
level._client_exploder_ids = [];
|
||||
if ( !isDefined( level.flag ) )
|
||||
@ -94,7 +103,7 @@ main( bscriptgened, bcsvgened, bsgenabled ) //checked partially changed to match
|
||||
level.physicstracemaskwater = 4;
|
||||
level.physicstracemaskclip = 8;
|
||||
level.physicstracecontentsvehicleclip = 16;
|
||||
if ( getDvar( "createfx" ) != "" ) //changed at own discretion
|
||||
if ( getDvar( "createfx" ) != "" )
|
||||
{
|
||||
level.createfx_enabled = getDvar( "createfx" );
|
||||
}
|
||||
@ -497,3 +506,5 @@ start_intro_screen_zm() //checked changed to match cerberus output
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -85,10 +85,6 @@ init() //checked matches cerberus output
|
||||
{
|
||||
level.disable_deadshot_clientfield = 0; //needs to be 0 even if the map doesn't have the perk
|
||||
}
|
||||
if ( !isDefined( level.use_clientside_rock_tearin_fx ) )
|
||||
{
|
||||
level.use_clientside_rock_tearin_fx = 0;
|
||||
}
|
||||
if ( !isDefined( level.no_end_game_check ) )
|
||||
{
|
||||
level.no_end_game_check = 0;
|
||||
@ -269,6 +265,7 @@ init() //checked matches cerberus output
|
||||
level thread onallplayersready();
|
||||
level thread startunitriggers();
|
||||
level thread maps/mp/gametypes_zm/_zm_gametype::post_init_gametype();
|
||||
level notify( "_zmFullyParsed" );
|
||||
}
|
||||
|
||||
post_main() //checked matches cerberus output
|
||||
@ -2711,7 +2708,7 @@ spectator_respawn() //checked changed to match cerberus output
|
||||
return 1;
|
||||
}
|
||||
|
||||
check_for_valid_spawn_near_team( revivee, return_struct ) //checked changed to match cerberus output
|
||||
check_for_valid_spawn_near_team( revivee, return_struct ) //checked partially changed to match beta dump
|
||||
{
|
||||
if ( isDefined( level.check_for_valid_spawn_near_team_callback ) )
|
||||
{
|
||||
@ -2730,10 +2727,9 @@ check_for_valid_spawn_near_team( revivee, return_struct ) //checked changed to m
|
||||
{
|
||||
return undefined;
|
||||
}
|
||||
i = 0;
|
||||
while ( i < players.size )
|
||||
for ( i = 0; i < players.size; i++ )
|
||||
{
|
||||
if ( is_player_valid( players[ i ], undefined, 1 ) && players[ i ] != self )
|
||||
if ( maps/mp/zombies/_zm_utility::is_player_valid( players[ i ], undefined, 1 ) && players[ i ] != self )
|
||||
{
|
||||
for ( j = 0; j < spawn_points.size; j++ )
|
||||
{
|
||||
@ -2755,9 +2751,9 @@ check_for_valid_spawn_near_team( revivee, return_struct ) //checked changed to m
|
||||
closest_distance = plyr_dist;
|
||||
closest_group = j;
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( plyr_dist < backup_distance )
|
||||
{
|
||||
backup_group = j;
|
||||
@ -2766,6 +2762,7 @@ check_for_valid_spawn_near_team( revivee, return_struct ) //checked changed to m
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !isdefined( closest_group ) )
|
||||
{
|
||||
closest_group = backup_group;
|
||||
@ -2778,31 +2775,33 @@ check_for_valid_spawn_near_team( revivee, return_struct ) //checked changed to m
|
||||
return spawn_location;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get_valid_spawn_location( revivee, spawn_points, closest_group, return_struct ) //checked changed to match cerberus output
|
||||
get_valid_spawn_location( revivee, spawn_points, closest_group, return_struct ) //checked partially changed to match cerberus output see info.md
|
||||
{
|
||||
spawn_array = getstructarray( spawn_points[ closest_group ].target, "targetname" );
|
||||
spawn_array = array_randomize( spawn_array );
|
||||
for ( k = 0; k < spawn_array.size; k++ )
|
||||
k = 0;
|
||||
while ( k < spawn_array.size )
|
||||
{
|
||||
if ( isdefined( spawn_array[ k ].plyr ) && spawn_array[ k ].plyr == revivee getentitynumber() )
|
||||
{
|
||||
if ( positionwouldtelefrag( spawn_array[ k ].origin ) )
|
||||
{
|
||||
spawn_array[k].plyr = undefined;
|
||||
break;
|
||||
spawn_array[ k ].plyr = undefined;
|
||||
k++;
|
||||
continue;
|
||||
}
|
||||
if ( isdefined( return_struct ) && return_struct )
|
||||
{
|
||||
return spawn_array[k];
|
||||
return spawn_array[ k ];
|
||||
}
|
||||
return spawn_array[k].origin;
|
||||
return spawn_array[ k ].origin;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
k = 0;
|
||||
while ( k < spawn_array.size )
|
||||
@ -2851,7 +2850,7 @@ check_for_valid_spawn_near_position( revivee, v_position, return_struct ) //chec
|
||||
{
|
||||
ideal_distance = 1000;
|
||||
}
|
||||
if(spawn_points[ i ].locked == 0)
|
||||
if ( spawn_points[ i ].locked == 0 )
|
||||
{
|
||||
dist = distancesquared( v_position, spawn_points[ i ].origin );
|
||||
if ( dist < ideal_distance * ideal_distance )
|
||||
@ -3054,6 +3053,7 @@ round_spawning() //checked changed to match cerberus output
|
||||
level thread zombie_speed_up();
|
||||
}
|
||||
level.zombie_total = [[ level.max_zombie_func ]]( max );
|
||||
|
||||
level notify( "zombie_total_set" );
|
||||
mixed_spawns = 0;
|
||||
old_spawn = undefined;
|
||||
@ -3518,7 +3518,7 @@ round_think( restart ) //checked changed to match cerberus output
|
||||
{
|
||||
if ( isdefined( player.hostmigrationcontrolsfrozen ) && player.hostmigrationcontrolsfrozen )
|
||||
{
|
||||
player freezecontrols(0);
|
||||
player freezecontrols( 0 );
|
||||
}
|
||||
player maps/mp/zombies/_zm_stats::set_global_stat( "rounds", level.round_number );
|
||||
}
|
||||
@ -3559,15 +3559,13 @@ round_think( restart ) //checked changed to match cerberus output
|
||||
level notify( "start_of_round" );
|
||||
recordzombieroundstart();
|
||||
players = getplayers();
|
||||
index = 0;
|
||||
while ( index < players.size )
|
||||
for ( index = 0; index < players.size; index++ )
|
||||
{
|
||||
zonename = players[ index ] get_current_zone();
|
||||
if ( isDefined( zonename ) )
|
||||
{
|
||||
players[ index ] recordzombiezone( "startingZone", zonename );
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if ( isDefined( level.round_start_custom_func ) )
|
||||
{
|
||||
@ -3590,6 +3588,7 @@ round_think( restart ) //checked changed to match cerberus output
|
||||
}
|
||||
else if ( players.size != 1 )
|
||||
{
|
||||
//testing definitely broken
|
||||
level thread spectators_respawn();
|
||||
}
|
||||
players = get_players();
|
||||
@ -3688,11 +3687,6 @@ ai_calculate_health( round_number ) //checked changed to match cerberus output
|
||||
level.zombie_health = int( level.zombie_health + level.zombie_vars[ "zombie_health_increase" ] );
|
||||
i++;
|
||||
}
|
||||
if ( level.debugLogging_zm )
|
||||
{
|
||||
logline8 = "_zm.gsc ai_calculate_health() The value of level.zombie_health is: " + level.zombie_health + "\n";
|
||||
logprint( logline8 );
|
||||
}
|
||||
}
|
||||
|
||||
ai_zombie_health( round_number ) //checked changed to match cerberus output
|
||||
@ -4355,7 +4349,7 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
|
||||
//checked against bo3 _zm.gsc changed to match
|
||||
if ( count < players.size || isDefined( level._game_module_game_end_check ) && ![[ level._game_module_game_end_check ]]() )
|
||||
{
|
||||
if ( isDefined( self.lives ) && self.lives > 0 || isDefined( level.force_solo_quick_revive ) && level.force_solo_quick_revive || self hasperk( "specialty_quickrevive" ) )
|
||||
if ( isDefined( self.lives ) && self.lives > 0 || isDefined( level.force_solo_quick_revive ) && level.force_solo_quick_revive && self hasperk( "specialty_quickrevive" ) )
|
||||
{
|
||||
self thread wait_and_revive();
|
||||
}
|
||||
@ -4367,7 +4361,6 @@ player_damage_override( einflictor, eattacker, idamage, idflags, smeansofdeath,
|
||||
{
|
||||
self.intermission = 1;
|
||||
solo_death = 1;
|
||||
|
||||
}
|
||||
}
|
||||
//checked against bo3 _zm.gsc changed to match
|
||||
|
@ -7,6 +7,7 @@ patch_zm/maps/mp/gametypes_zm/_scoreboard.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_shellshock.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_zm_gametype.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/zclassic.gsc
|
||||
patch_zm/maps/mp/zombies/_load.gsc
|
||||
patch_zm/maps/mp/zombies/_zm_ai_basic.gsc
|
||||
patch_zm/maps/mp/zombies/_zm_ai_dogs.gsc
|
||||
patch_zm/maps/mp/zombies/_zm_ai_faller.gsc
|
||||
@ -44,7 +45,6 @@ patch_zm/maps/mp/zombies/_zm_utility.gsc
|
||||
```
|
||||
### The following scripts compile but cause a minidump or other severe error:
|
||||
```
|
||||
patch_zm/maps/mp/zombies/_load.gsc
|
||||
patch_zm/maps/mp/zombies/_zm_pers_upgrades_functions.gsc
|
||||
```
|
||||
### The following scripts have been checked, but they have not been tested yet
|
||||
@ -52,6 +52,7 @@ patch_zm/maps/mp/zombies/_zm_pers_upgrades_functions.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_callbacksetup.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_damagefeedback.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_actor.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_spawn.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_healthoverlay.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_hostmigration.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_hud.gsc
|
||||
@ -111,7 +112,6 @@ patch_zm/maps/mp/gametypes_zm/_globallogic_audio.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_defaults.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_player.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_score.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_spawn.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_ui.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_utils.gsc
|
||||
patch_zm/maps/mp/gametypes_zm/_globallogic_vehicle.gsc
|
||||
|
@ -117,7 +117,6 @@ custom_end_screen() //checked changed to match cerberus output
|
||||
if ( isDefined( level.gamemodulewinningteam ) && players[ i ]._encounters_team == level.gamemodulewinningteam )
|
||||
{
|
||||
players[ i ].survived_hud settext( winner_text, level.round_number );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -328,15 +327,18 @@ meat_bounce_override(pos, normal, ent) //checked matches cerberus output
|
||||
players = getplayers();
|
||||
closest_player = undefined;
|
||||
closest_player_dist = 10000;
|
||||
for(player_index = 0; player_index < players.size; player_index++)
|
||||
player_index = 0;
|
||||
while ( player_index < players.size )
|
||||
{
|
||||
player_to_check = players[player_index];
|
||||
if(self.owner == player_to_check)
|
||||
{
|
||||
player_index++;
|
||||
continue;
|
||||
}
|
||||
if(player_to_check maps/mp/zombies/_zm_laststand::player_is_in_laststand())
|
||||
{
|
||||
player_index++;
|
||||
continue;
|
||||
}
|
||||
distsq = distancesquared(pos, player_to_check.origin);
|
||||
@ -345,6 +347,7 @@ meat_bounce_override(pos, normal, ent) //checked matches cerberus output
|
||||
closest_player = player_to_check;
|
||||
closest_player_dist = distsq;
|
||||
}
|
||||
player_index++;
|
||||
}
|
||||
if(isdefined(closest_player))
|
||||
{
|
||||
@ -605,22 +608,26 @@ grief_laststand_weapons_return() //checked changed to match cerberus output
|
||||
return 0;
|
||||
}
|
||||
primary_weapons_returned = 0;
|
||||
foreach ( weapon in self.grief_savedweapon_weapons )
|
||||
i = 0;
|
||||
while ( i < self.grief_savedweapon_weapons.size )
|
||||
{
|
||||
if ( isdefined( self.grief_savedweapon_grenades ) && weapon == self.grief_savedweapon_grenades || ( isdefined( self.grief_savedweapon_tactical ) && weapon == self.grief_savedweapon_tactical ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( isweaponprimary( weapon ) )
|
||||
{
|
||||
if ( primary_weapons_returned >= 2 )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
primary_weapons_returned++;
|
||||
}
|
||||
if ( "item_meat_zm" == weapon )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
self giveweapon( weapon, 0, self maps/mp/zombies/_zm_weapons::get_pack_a_punch_weapon_options( weapon ) );
|
||||
@ -632,6 +639,7 @@ grief_laststand_weapons_return() //checked changed to match cerberus output
|
||||
{
|
||||
self setweaponammostock( weapon, self.grief_savedweapon_weaponsammo_stock[ index ] );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ( isDefined( self.grief_savedweapon_grenades ) )
|
||||
{
|
||||
@ -727,10 +735,11 @@ update_players_on_bleedout_or_disconnect( excluded_player ) //checked changed to
|
||||
other_team = undefined;
|
||||
players = get_players();
|
||||
players_remaining = 0;
|
||||
foreach ( player in players )
|
||||
while ( i < players.size )
|
||||
{
|
||||
if ( player == excluded_player )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( player.team == excluded_player.team )
|
||||
@ -739,13 +748,16 @@ update_players_on_bleedout_or_disconnect( excluded_player ) //checked changed to
|
||||
{
|
||||
players_remaining++;
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
foreach ( player in players )
|
||||
while ( i < players.size )
|
||||
{
|
||||
if ( player == excluded_player )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( player.team != excluded_player.team )
|
||||
@ -755,10 +767,12 @@ update_players_on_bleedout_or_disconnect( excluded_player ) //checked changed to
|
||||
{
|
||||
player thread show_grief_hud_msg( &"ZOMBIE_ZGRIEF_ALL_PLAYERS_DOWN", undefined, undefined, 1 );
|
||||
player delay_thread_watch_host_migrate( 2, ::show_grief_hud_msg, &"ZOMBIE_ZGRIEF_SURVIVE", undefined, 30, 1 );
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
player thread show_grief_hud_msg( &"ZOMBIE_ZGRIEF_PLAYER_BLED_OUT", players_remaining );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if ( players_remaining == 1 )
|
||||
{
|
||||
@ -808,3 +822,5 @@ grief_round_end_custom_logic() //checked matches cerberus output
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user