mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 09:57:52 -05:00
moved to No Known Errors
Also fixed the no announcer audio in plutonium.
This commit is contained in:
parent
a0bda97e4c
commit
bd0831df5f
@ -4,7 +4,7 @@
|
|||||||
#include maps/mp/_utility;
|
#include maps/mp/_utility;
|
||||||
#include common_scripts/utility;
|
#include common_scripts/utility;
|
||||||
|
|
||||||
init()
|
init() //checked matches cerberus output
|
||||||
{
|
{
|
||||||
game[ "zmbdialog" ] = [];
|
game[ "zmbdialog" ] = [];
|
||||||
game[ "zmbdialog" ][ "prefix" ] = "vox_zmba";
|
game[ "zmbdialog" ][ "prefix" ] = "vox_zmba";
|
||||||
@ -22,7 +22,7 @@ init()
|
|||||||
level.allowzmbannouncer = 1;
|
level.allowzmbannouncer = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_gamemodespecificvox( mode, location )
|
init_gamemodespecificvox( mode, location ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
switch( mode )
|
switch( mode )
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ init_gamemodespecificvox( mode, location )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init_gamemodecommonvox( prefix )
|
init_gamemodecommonvox( prefix ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
createvox( "rules", "rules", prefix );
|
createvox( "rules", "rules", prefix );
|
||||||
createvox( "countdown", "intro", prefix );
|
createvox( "countdown", "intro", prefix );
|
||||||
@ -57,7 +57,7 @@ init_gamemodecommonvox( prefix )
|
|||||||
createvox( "match_tied", "tied", prefix );
|
createvox( "match_tied", "tied", prefix );
|
||||||
}
|
}
|
||||||
|
|
||||||
init_griefvox( prefix )
|
init_griefvox( prefix ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
init_gamemodecommonvox( prefix );
|
init_gamemodecommonvox( prefix );
|
||||||
createvox( "1_player_down", "1rivdown", prefix );
|
createvox( "1_player_down", "1rivdown", prefix );
|
||||||
@ -73,7 +73,7 @@ init_griefvox( prefix )
|
|||||||
createvox( "last_player", "solo", prefix );
|
createvox( "last_player", "solo", prefix );
|
||||||
}
|
}
|
||||||
|
|
||||||
init_cleansed( prefix )
|
init_cleansed( prefix ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
init_gamemodecommonvox( prefix );
|
init_gamemodecommonvox( prefix );
|
||||||
createvox( "dr_start_single_0", "dr_start_0" );
|
createvox( "dr_start_single_0", "dr_start_0" );
|
||||||
@ -92,7 +92,7 @@ init_cleansed( prefix )
|
|||||||
createvox( "dr_ending", "dr_time_0" );
|
createvox( "dr_ending", "dr_time_0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
init_meatvox( prefix )
|
init_meatvox( prefix ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
init_gamemodecommonvox( prefix );
|
init_gamemodecommonvox( prefix );
|
||||||
createvox( "meat_drop", "drop", prefix );
|
createvox( "meat_drop", "drop", prefix );
|
||||||
@ -109,7 +109,7 @@ init_meatvox( prefix )
|
|||||||
createvox( "meat_ring_ammo", "ring_ammo", prefix );
|
createvox( "meat_ring_ammo", "ring_ammo", prefix );
|
||||||
}
|
}
|
||||||
|
|
||||||
init_racevox( prefix, location )
|
init_racevox( prefix, location ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
init_gamemodecommonvox( prefix );
|
init_gamemodecommonvox( prefix );
|
||||||
switch( location )
|
switch( location )
|
||||||
@ -132,6 +132,7 @@ init_racevox( prefix, location )
|
|||||||
createvox( "hoop_miss", "hoop_miss", prefix );
|
createvox( "hoop_miss", "hoop_miss", prefix );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
break;
|
||||||
createvox( "race_room_2_ally", "room2_ally", prefix );
|
createvox( "race_room_2_ally", "room2_ally", prefix );
|
||||||
createvox( "race_room_3_ally", "room3_ally", prefix );
|
createvox( "race_room_3_ally", "room3_ally", prefix );
|
||||||
createvox( "race_room_4_ally", "room4_ally", prefix );
|
createvox( "race_room_4_ally", "room4_ally", prefix );
|
||||||
@ -161,7 +162,7 @@ init_racevox( prefix, location )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createvox( type, alias, gametype )
|
createvox( type, alias, gametype ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
if ( !isDefined( gametype ) )
|
if ( !isDefined( gametype ) )
|
||||||
{
|
{
|
||||||
@ -174,7 +175,7 @@ createvox( type, alias, gametype )
|
|||||||
game[ "zmbdialog" ][ type ] = gametype + alias;
|
game[ "zmbdialog" ][ type ] = gametype + alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
announceroundwinner( winner, delay )
|
announceroundwinner( winner, delay ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
if ( isDefined( delay ) && delay > 0 )
|
if ( isDefined( delay ) && delay > 0 )
|
||||||
{
|
{
|
||||||
@ -187,20 +188,13 @@ announceroundwinner( winner, delay )
|
|||||||
if ( winner != "tied" )
|
if ( winner != "tied" )
|
||||||
{
|
{
|
||||||
players = get_players();
|
players = get_players();
|
||||||
_a236 = players;
|
foreach ( player in players )
|
||||||
_k236 = getFirstArrayKey( _a236 );
|
|
||||||
while ( isDefined( _k236 ) )
|
|
||||||
{
|
{
|
||||||
player = _a236[ _k236 ];
|
if ( isdefined( player._encounters_team ) && player._encounters_team == winner )
|
||||||
if ( isDefined( player._encounters_team ) && player._encounters_team == winner )
|
|
||||||
{
|
{
|
||||||
winning_team = player.pers[ "team" ];
|
winning_team = player.pers[ "team" ];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_k236 = getNextArrayKey( _a236, _k236 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
losing_team = getotherteam( winning_team );
|
losing_team = getotherteam( winning_team );
|
||||||
leaderdialog( "round_win", winning_team, undefined, 1 );
|
leaderdialog( "round_win", winning_team, undefined, 1 );
|
||||||
@ -212,7 +206,7 @@ announceroundwinner( winner, delay )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
announcematchwinner( winner, delay )
|
announcematchwinner( winner, delay ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
if ( isDefined( delay ) && delay > 0 )
|
if ( isDefined( delay ) && delay > 0 )
|
||||||
{
|
{
|
||||||
@ -225,20 +219,13 @@ announcematchwinner( winner, delay )
|
|||||||
if ( winner != "tied" )
|
if ( winner != "tied" )
|
||||||
{
|
{
|
||||||
players = get_players();
|
players = get_players();
|
||||||
_a267 = players;
|
foreach ( player in players )
|
||||||
_k267 = getFirstArrayKey( _a267 );
|
|
||||||
while ( isDefined( _k267 ) )
|
|
||||||
{
|
{
|
||||||
player = _a267[ _k267 ];
|
if ( isdefined( player._encounters_team ) && player._encounters_team == winner )
|
||||||
if ( isDefined( player._encounters_team ) && player._encounters_team == winner )
|
|
||||||
{
|
{
|
||||||
winning_team = player.pers["team"];
|
winning_team = player.pers["team"];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_k267 = getNextArrayKey( _a267, _k267 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
losing_team = getotherteam( winning_team );
|
losing_team = getotherteam( winning_team );
|
||||||
leaderdialog( "match_win", winning_team, undefined, 1 );
|
leaderdialog( "match_win", winning_team, undefined, 1 );
|
||||||
@ -250,7 +237,7 @@ announcematchwinner( winner, delay )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
announcegamemoderules()
|
announcegamemoderules() //checked matches cerberus output
|
||||||
{
|
{
|
||||||
if ( getDvar( "ui_zm_mapstartlocation" ) == "town" )
|
if ( getDvar( "ui_zm_mapstartlocation" ) == "town" )
|
||||||
{
|
{
|
||||||
@ -258,77 +245,46 @@ announcegamemoderules()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leaderdialog( dialog, team, group, queue, waittime )
|
leaderdialog( dialog, team, group, queue, waittime ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
/#
|
|
||||||
assert( isDefined( level.players ) );
|
|
||||||
#/
|
|
||||||
if ( !isDefined( team ) )
|
if ( !isDefined( team ) )
|
||||||
{
|
{
|
||||||
leaderdialogbothteams( dialog, "allies", dialog, "axis", group, queue, waittime );
|
leaderdialogbothteams( dialog, "allies", dialog, "axis", group, queue, waittime );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( level.splitscreen )
|
|
||||||
{
|
|
||||||
if ( level.players.size )
|
|
||||||
{
|
|
||||||
level.players[ 0 ] leaderdialogonplayer( dialog, group, queue, waittime );
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while ( i < level.players.size )
|
for ( i = 0; i < level.players.size; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[ i ];
|
player = level.players[ i ];
|
||||||
if ( isDefined( player.pers[ "team" ] ) && player.pers[ "team" ] == team )
|
if ( isdefined ( player.pers[ "team" ] ) && player.pers[ "team" ] == team )
|
||||||
{
|
{
|
||||||
player leaderdialogonplayer( dialog, group, queue, waittime );
|
player leaderdialogonplayer( dialog, group, queue, waittime );
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
leaderdialogbothteams( dialog1, team1, dialog2, team2, group, queue, waittime )
|
leaderdialogbothteams( dialog1, team1, dialog2, team2, group, queue, waittime ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
/#
|
players = get_players();
|
||||||
assert( isDefined( level.players ) );
|
for ( i = 0; i < players.size; i++ )
|
||||||
#/
|
|
||||||
if ( level.splitscreen )
|
|
||||||
{
|
{
|
||||||
if ( level.players.size )
|
team = players[ i ].pers[ "team" ];
|
||||||
|
if ( !isdefined( team ) )
|
||||||
{
|
{
|
||||||
level.players[ 0 ] leaderdialogonplayer( dialog1, group, queue, waittime );
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
i = 0;
|
if ( team == team1 )
|
||||||
while ( i < level.players.size )
|
|
||||||
{
|
{
|
||||||
player = level.players[ i ];
|
players[ i ] leaderdialogonplayer( dialog1, group, queue, waittime );
|
||||||
team = player.pers[ "team" ];
|
|
||||||
if ( !isDefined( team ) )
|
|
||||||
{
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
else if ( team == team1 )
|
|
||||||
{
|
|
||||||
player leaderdialogonplayer( dialog1, group, queue, waittime );
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( team == team2 )
|
if ( team == team2 )
|
||||||
{
|
{
|
||||||
player leaderdialogonplayer( dialog2, group, queue, waittime );
|
players[ i ] leaderdialogonplayer( dialog2, group, queue, waittime );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
leaderdialogonplayer( dialog, group, queue, waittime )
|
leaderdialogonplayer( dialog, group, queue, waittime ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
team = self.pers[ "team" ];
|
team = self.pers[ "team" ];
|
||||||
if ( !isDefined( team ) )
|
if ( !isDefined( team ) )
|
||||||
@ -348,27 +304,25 @@ leaderdialogonplayer( dialog, group, queue, waittime )
|
|||||||
hadgroupdialog = isDefined( self.zmbdialoggroups[ group ] );
|
hadgroupdialog = isDefined( self.zmbdialoggroups[ group ] );
|
||||||
self.zmbdialoggroups[ group ] = dialog;
|
self.zmbdialoggroups[ group ] = dialog;
|
||||||
dialog = group;
|
dialog = group;
|
||||||
if ( hadgroupdialog )
|
if ( isDefined( hadgroupdialog ) && hadgroupdialog )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !self.zmbdialogactive )
|
if ( isDefined( self.zmbdialogactive ) && !self.zmbdialogactive )
|
||||||
{
|
{
|
||||||
self thread playleaderdialogonplayer( dialog, team, waittime );
|
self thread playleaderdialogonplayer( dialog, team, waittime );
|
||||||
}
|
}
|
||||||
else
|
else if ( isdefined( queue ) && queue )
|
||||||
{
|
|
||||||
if ( isDefined( queue ) && queue )
|
|
||||||
{
|
{
|
||||||
self.zmbdialogqueue[ self.zmbdialogqueue.size ] = dialog;
|
self.zmbdialogqueue[ self.zmbdialogqueue.size ] = dialog;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
playleaderdialogonplayer( dialog, team, waittime )
|
playleaderdialogonplayer( dialog, team, waittime ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
if ( level.allowzmbannouncer )
|
if ( level.allowzmbannouncer )
|
||||||
{
|
{
|
||||||
if ( !isDefined( game[ "zmbdialog" ][ dialog ] ) )
|
if ( !isDefined( game[ "zmbdialog" ][ dialog ] ) )
|
||||||
@ -381,20 +335,25 @@ playleaderdialogonplayer( dialog, team, waittime )
|
|||||||
{
|
{
|
||||||
group = dialog;
|
group = dialog;
|
||||||
dialog = self.zmbdialoggroups[ group ];
|
dialog = self.zmbdialoggroups[ group ];
|
||||||
|
self.zmbdialoggroups[ group ] = undefined;
|
||||||
self.zmbdialoggroup = group;
|
self.zmbdialoggroup = group;
|
||||||
}
|
}
|
||||||
if ( level.allowzmbannouncer )
|
if ( level.allowzmbannouncer )
|
||||||
{
|
{
|
||||||
alias = game[ "zmbdialog" ][ "prefix" ] + "_" + game[ "zmbdialog" ][ dialog ];
|
alias = game[ "zmbdialog" ][ "prefix" ] + "_" + game[ "zmbdialog" ][ dialog ];
|
||||||
|
//aliasVariant = game[ "zmbdialog" ][ dialog ];
|
||||||
variant = self getleaderdialogvariant( alias );
|
variant = self getleaderdialogvariant( alias );
|
||||||
if ( !isDefined( variant ) )
|
if ( !isDefined( variant ) )
|
||||||
{
|
{
|
||||||
full_alias = alias;
|
full_alias = alias + "_" + "0"; //adding the + "_" + "0" fixes pluto no announcer bug
|
||||||
|
//this happens because all voxes require the variant to be specified but for some reason they are not in pluto
|
||||||
|
//this may be due to the soundexists() not working potentially
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
full_alias = ( alias + "_" ) + variant;
|
full_alias = alias + "_" + variant;
|
||||||
}
|
}
|
||||||
|
|
||||||
self playlocalsound( full_alias );
|
self playlocalsound( full_alias );
|
||||||
}
|
}
|
||||||
if ( isDefined( waittime ) )
|
if ( isDefined( waittime ) )
|
||||||
@ -410,17 +369,16 @@ playleaderdialogonplayer( dialog, team, waittime )
|
|||||||
if ( self.zmbdialogqueue.size > 0 && level.allowzmbannouncer )
|
if ( self.zmbdialogqueue.size > 0 && level.allowzmbannouncer )
|
||||||
{
|
{
|
||||||
nextdialog = self.zmbdialogqueue[0];
|
nextdialog = self.zmbdialogqueue[0];
|
||||||
i = 1;
|
for( i = 1; i < self.zmbdialogqueue.size; i++ )
|
||||||
while ( i < self.zmbdialogqueue.size )
|
|
||||||
{
|
{
|
||||||
self.zmbdialogqueue[ i - 1 ] = self.zmbdialogqueue[ i ];
|
self.zmbdialogqueue[ i - 1 ] = self.zmbdialogqueue[ i ];
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
self.zmbdialogqueue[ i - 1 ] = undefined;
|
||||||
self thread playleaderdialogonplayer( nextdialog, team );
|
self thread playleaderdialogonplayer( nextdialog, team );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getleaderdialogvariant( alias )
|
getleaderdialogvariant( alias ) //checked changed to match cerberus output
|
||||||
{
|
{
|
||||||
if ( !isDefined( alias ) )
|
if ( !isDefined( alias ) )
|
||||||
{
|
{
|
||||||
@ -434,13 +392,13 @@ getleaderdialogvariant( alias )
|
|||||||
num_variants = maps/mp/zombies/_zm_spawner::get_number_variants( alias );
|
num_variants = maps/mp/zombies/_zm_spawner::get_number_variants( alias );
|
||||||
if ( num_variants <= 0 )
|
if ( num_variants <= 0 )
|
||||||
{
|
{
|
||||||
|
players = get_players();
|
||||||
|
players[ 0 ] iprintln( "ree" );
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
i = 0;
|
for ( i = 0; i < num_variants; i++ )
|
||||||
while ( i < num_variants )
|
|
||||||
{
|
{
|
||||||
level.announcer_dialog[ alias ][ i ] = i;
|
level.announcer_dialog[ alias ][ i ] = i;
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
level.announcer_dialog_available[ alias ] = [];
|
level.announcer_dialog_available[ alias ] = [];
|
||||||
if ( level.announcer_dialog_available[ alias ].size <= 0 )
|
if ( level.announcer_dialog_available[ alias ].size <= 0 )
|
||||||
@ -452,7 +410,7 @@ getleaderdialogvariant( alias )
|
|||||||
return variation;
|
return variation;
|
||||||
}
|
}
|
||||||
|
|
||||||
getroundswitchdialog( switchtype )
|
getroundswitchdialog( switchtype ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
switch( switchtype )
|
switch( switchtype )
|
||||||
{
|
{
|
||||||
@ -465,7 +423,7 @@ getroundswitchdialog( switchtype )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getotherteam( team )
|
getotherteam( team ) //checked matches cerberus output
|
||||||
{
|
{
|
||||||
if ( team == "allies" )
|
if ( team == "allies" )
|
||||||
{
|
{
|
||||||
@ -477,3 +435,4 @@ getotherteam( team )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ patch_zm/maps/mp/gametypes_zm/zclassic.gsc
|
|||||||
patch_zm/maps/mp/zombies/_zm_ai_basic.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_dogs.gsc
|
||||||
patch_zm/maps/mp/zombies/_zm_ai_faller.gsc
|
patch_zm/maps/mp/zombies/_zm_ai_faller.gsc
|
||||||
|
patch_zm/maps/mp/zombies/_zm_audio_announcer.gsc
|
||||||
patch_zm/maps/mp/zombies/_zm_bot.gsc
|
patch_zm/maps/mp/zombies/_zm_bot.gsc
|
||||||
patch_zm/maps/mp/zombies/_zm_clone.gsc
|
patch_zm/maps/mp/zombies/_zm_clone.gsc
|
||||||
patch_zm/maps/mp/zombies/_zm_equip_hacker.gsc
|
patch_zm/maps/mp/zombies/_zm_equip_hacker.gsc
|
||||||
@ -58,7 +59,6 @@ patch_zm/maps/mp/zombies/_load.gsc
|
|||||||
### The following scripts are not tested yet, uploaded to setup a baseline:
|
### The following scripts are not tested yet, uploaded to setup a baseline:
|
||||||
```
|
```
|
||||||
patch_zm/maps/mp/zombies/_zm_audio.gsc
|
patch_zm/maps/mp/zombies/_zm_audio.gsc
|
||||||
patch_zm/maps/mp/zombies/_zm_audio_announcer.gsc
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### notes:
|
### notes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user