Skip to content

Commit

Permalink
Version 1.05 Update
Browse files Browse the repository at this point in the history
+ Zandronum 3.1 update
+ Added points to Deathmatch and linked the DoomWare score to them
+ Added points to Internal Zandronum scoreboard
+ Added 'doomware_fakerandom' CVar
* Changed music in SSG and Grenades Duel minigames
* Changed teleport system for Boxing minigame
* Finally fixed the camera in E1M1 Karts
* Fixed Arch-Viles not receiving Wacky Mods correctly
* Fixed boss battle spectator bug caused by Zandronum 3.1
* Fixed freeze and particles in brawler tiebreaker
* Fixed Buu342 Morph in 'Put Yourself Out' minigame
* Fixed teleport bug in Source Port minigame
* Fixed Wackymods Mecha Romeros
* Gave the CacoDemons some musical notes
* Improved networking and HUD performance by using internal Zandronum functions
* Prevented cheating the jumps in Void minigame
* Tweaked time in Town Infection minigame
* Tweaked windows and map for Batman Doom
* Turkey is now affected by wackymods
- Removed some built-in Zandronum gamemode text
- Removed loss from fake barrels
  • Loading branch information
buu342 committed Feb 4, 2022
1 parent ba7bf3c commit a604c0d
Show file tree
Hide file tree
Showing 10 changed files with 488 additions and 115 deletions.
404 changes: 351 additions & 53 deletions ACS/DOOMWARE.acs

Large diffs are not rendered by default.

71 changes: 46 additions & 25 deletions ACS/MAP01.acs
Original file line number Diff line number Diff line change
Expand Up @@ -2525,6 +2525,11 @@ Script "DoomWare_Client_Minigame99" (void) // Put Yourself Out
while (minigame_Wincondition1 == 0)
delay(1);

// Unmorph buu
if (data_role[PlayerNumber()] == ROLE_BUU342)
UnMorphActor(TID_PLAYER+PlayerNumber(), true);
delay(1);

// Set the player on fire
str class = "FirePlayer";
while (StrCmp(GetActorClass(TID_PLAYER+PlayerNumber()), class) != 0)
Expand Down Expand Up @@ -2555,6 +2560,8 @@ Script "DoomWare_Client_Minigame99" (void) // Put Yourself Out
if (insector != 0)
{
UnMorphActor(TID_PLAYER+PlayerNumber(), true);
if (data_role[PlayerNumber()] == ROLE_BUU342)
MorphActor(TID_PLAYER+PlayerNumber(), "Buu342Player", 1, 0x7fffffff, MRF_NEWTIDBEHAVIOUR, "Nothing", "Nothing");
PlaySound(TID_PLAYER+PlayerNumber(), "DoomWare/Extinguish", CHAN_VOICE);
SpawnSpotForced("ExtinguishEffect", TID_PLAYER+PlayerNumber(), 0, 0);
FadeTo(255, 155, 255, 0.0, 0.0);
Expand Down Expand Up @@ -2876,7 +2883,7 @@ Script "DoomWare_Client_TieBreakerM1" (void) // Grenade Launcher Duel

// Give the player a weapon if they're in the game, or force them to observe
delay(1);
if (game_score[PlayerNumber()] == game_highscores[0])
if (GetPlayerScore(PlayerNumber(), SCORE_POINTS) == game_highscores[0])
{
SetActorVelocity(0, 0.0, 0.0, 0.0, false, true);
GiveInventory("GrenadeLauncher", 1);
Expand Down Expand Up @@ -2912,7 +2919,7 @@ Script "DoomWare_Client_TieBreakerM2" (void) // Survive (Decreasing Ring)

// Give the player a weapon if they're in the game, or force them to observe
delay(1);
if (game_score[PlayerNumber()] == game_highscores[0])
if (GetPlayerScore(PlayerNumber(), SCORE_POINTS) == game_highscores[0])
{
SetActorVelocity(0, 0.0, 0.0, 0.0, false, true);
GiveInventory("PushStaff", 1);
Expand Down Expand Up @@ -2951,7 +2958,7 @@ Script "DoomWare_Client_TieBreakerM3" (void) // Hit the Target (One Shot)

// Give the player a weapon if they're in the game, or force them to observe
delay(1);
if (game_score[PlayerNumber()] == game_highscores[0])
if (GetPlayerScore(PlayerNumber(), SCORE_POINTS) == game_highscores[0])
{
SetActorVelocity(0, 0.0, 0.0, 0.0, false, true);
GiveInventory("Railgun", 1);
Expand Down Expand Up @@ -2985,7 +2992,7 @@ Script "DoomWare_Client_TieBreakerM4" (void) // Survive (Brawler)

// Initialize the player, then force them to observe
delay(1);
if (game_score[PlayerNumber()] == game_highscores[0])
if (GetPlayerScore(PlayerNumber(), SCORE_POINTS) == game_highscores[0])
{
SetActorVelocity(0, 0.0, 0.0, 0.0, false, true);
SetPlayerProperty(1, 1, PROP_FROZEN);
Expand All @@ -3008,7 +3015,12 @@ Script "DoomWare_Client_TieBreakerM4" (void) // Survive (Brawler)
// Wait for the game to start
lastangle = GetActorAngle(0);
while (minigame_canmove == false)
delay(1);
{
// Don't allow the player to attack while he waits for the round to begin
if ((GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_ATTACK) && !(GetPlayerInput(-1, INPUT_OLDBUTTONS) & BT_ATTACK))
Thing_Destroy(TID_PLAYER+PlayerNumber(), 0);
delay(1);
}

// It's showtime!
minigame_instruction1[PlayerNumber()] = "Go!";
Expand All @@ -3018,9 +3030,9 @@ Script "DoomWare_Client_TieBreakerM4" (void) // Survive (Brawler)
// Wait until the game's over
while (game_status == STATUS_TIEBREAKM)
{
if ((GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_MOVELEFT) && CheckInventory("BrawlerLeft") == 0)
if ((GetPlayerInput(PlayerNumber(), MODINPUT_BUTTONS) & BT_MOVELEFT) && CheckInventory("BrawlerLeft") == 0)
GiveInventory("BrawlerLeft", 1);
else if ((GetPlayerInput(-1, MODINPUT_BUTTONS) & BT_MOVERIGHT) && CheckInventory("BrawlerLeft") != 0)
else if ((GetPlayerInput(PlayerNumber(), MODINPUT_BUTTONS) & BT_MOVERIGHT) && CheckInventory("BrawlerLeft") != 0)
TakeInventory("BrawlerLeft", 99999);
SetActorAngle(TID_PLAYER+PlayerNumber(), 0.75);
delay(1);
Expand All @@ -3038,7 +3050,7 @@ Script "DoomWare_Client_TieBreakerM5" (void) // Reach the End (Traps)

// Give the player a staff if they're in the game, or force them to observe
delay(1);
if (game_score[PlayerNumber()] == game_highscores[0])
if (GetPlayerScore(PlayerNumber(), SCORE_POINTS) == game_highscores[0])
{
SetActorVelocity(0, 0.0, 0.0, 0.0, false, true);
GiveInventory("PushStaff", 1);
Expand Down Expand Up @@ -3265,7 +3277,7 @@ Script "DoomWare_Server_Minigame4" (void) // Survive (Archviles)
SpawnSpotForcedEx("Archvile", 3, TID_REMOVE, random(0, 359));
break;
}
SpawnSpotForcedEx("TeleportFog", 1, TID_REMOVE, 0);
SpawnSpotForced("TeleportFog", 1, TID_REMOVE, 0);
NoiseAlert(TID_PLAYER+random(0, PlayerCount()-1), TID_PLAYER+random(0, PlayerCount()-1));

// Raise the floor
Expand Down Expand Up @@ -3493,12 +3505,12 @@ Script "DoomWare_Server_Minigame10" (void) // Evade the Kamikazi
Script "DoomWare_Server_Minigame11" (void) // Survive (Super Shotgun)
{
HUDMessage(s:"Survive (Super Shotgun)"; HUDMSG_LOG, MSGID_CONSOLE, CR_BLACK, 2.0, 2.0, 0);
SetMusic("d_stelth");
SetMusic("D_FATAL");
round_winifmid = true;
minigame_fragpoints = true;

// Start a timer
ACS_NamedExecute("DoomWare_Server_GameWait", 0, SECOND*5-(10*game_speed));
ACS_NamedExecute("DoomWare_Server_GameWait", 0, SECOND*6-(10*game_speed));

// If there is only one player left, make him win to stop the timer
do
Expand Down Expand Up @@ -4001,7 +4013,7 @@ Script "DoomWare_Server_Minigame26" (void) // Survive (Boxing)
Thing_Deactivate(TID_REMOVE);

// Teleport players to the arena
ACS_NamedExecute("DoomWare_Server_TeleportPlayers", 0, 128, true, true);
ACS_NamedExecute("DoomWare_Server_TeleportPlayers", 0, 1200, false, true);

// Start a timer
ACS_NamedExecute("DoomWare_Server_GameWait", 0, SECOND*6+17 -(10*game_speed));
Expand Down Expand Up @@ -4431,12 +4443,16 @@ Script "DoomWare_Server_Minigame38" (void) // Repeat the Pattern
// Show the cacodemons to shoot
delay(35);
thing_damage(326+caco1, 1, 0);
PlaySound(326+caco1, StrParam(s:"Doomware/Note", d:caco1+1), CHAN_5, 1.0, false, ATTN_NONE);
delay(SECOND-(5*game_speed));
thing_damage(326+caco2, 1, 0);
PlaySound(326+caco2, StrParam(s:"Doomware/Note", d:caco2+1), CHAN_5, 1.0, false, ATTN_NONE);
delay(SECOND-(5*game_speed));
thing_damage(326+caco3, 1, 0);
PlaySound(326+caco3, StrParam(s:"Doomware/Note", d:caco3+1), CHAN_5, 1.0, false, ATTN_NONE);
delay(SECOND-(5*game_speed));
thing_damage(326+caco4, 1, 0);
PlaySound(326+caco4, StrParam(s:"Doomware/Note", d:caco4+1), CHAN_5, 1.0, false, ATTN_NONE);
delay(SECOND-(5*game_speed));

// Give time for the players to spit their answers
Expand Down Expand Up @@ -4550,13 +4566,13 @@ Script "DoomWare_Server_Minigame41" (void) // Go to the Light
ACS_NamedExecute("DoomWare_Server_TeleportPlayers", 0, 206, true, true);

// Pick a random sector to mark as safe
int ceil = random(0, 11);
Light_ChangeToValue(116+ceil, 256);
int cl = random(0, 11);
Light_ChangeToValue(116+cl, 256);
delay(SECOND-(5*game_speed));

// Lower the ceiling
for (i=0; i<13; i++)
if (i != ceil)
if (i != cl)
Ceiling_LowerAndCrush(116+i, 20+(2*game_speed), 100, 1);
delay(SECOND*3+17 -(7*game_speed));

Expand All @@ -4565,9 +4581,9 @@ Script "DoomWare_Server_Minigame41" (void) // Go to the Light

// Raise the ceiling back up
for (i=0; i<13; i++)
if (ceil != i)
if (cl != i)
Ceiling_RaiseByValue(116+i, 16, 256);
Light_ChangeToValue(116+ceil, 16);
Light_ChangeToValue(116+cl, 16);
}

Script "DoomWare_Server_Minigame42" (void) // Survive (Rockets)
Expand Down Expand Up @@ -4956,7 +4972,7 @@ Script "DoomWare_Server_Minigame52" (void) // Gib a Turkey
SetMusic("D_TURKEY");

// Spawn some turkeys to gib
SpawnSpot("Turkey", 919, TID_REMOVE);
SpawnSpotFacingForcedEx("Turkey", 919, TID_REMOVE);

// Teleport everyone to the arena and start a timer
ACS_NamedExecute("DoomWare_Server_TeleportPlayers", 0, 918, true, true);
Expand Down Expand Up @@ -6943,7 +6959,7 @@ Script "DoomWare_Server_Minigame100" (void) // Match the Demon

// Start the timer
minigame_wincondition1 = 1;
ACS_NamedExecuteWait("DoomWare_Server_GameWait", 0, SECOND*9-(10*game_speed));
ACS_NamedExecuteWait("DoomWare_Server_GameWait", 0, SECOND*11-(10*game_speed));

// Check for people with the correct answers
ans = StrParam(d:minigame_wincondition2); // Convert to string to make life easier
Expand Down Expand Up @@ -7199,7 +7215,7 @@ Script "DoomWare_Server_TieBreaker5" (void) // Hit the Keys in Order
Script "DoomWare_Server_TieBreakerM1" (void) // Grenade Launcher Duel
{
HUDMessage(s:"TieBreakerM - Grenade Launcher Duel"; HUDMSG_LOG, MSGID_CONSOLE, CR_BLACK, 2.0, 2.0, 0);
SetMusic("D_GARAGE");
SetMusic("D_SPARK");
round_winifmid = true;
minigame_fragpoints = true;
Add_Observer(752);
Expand Down Expand Up @@ -7504,6 +7520,10 @@ Script 242 (int HitCaco) // Cacodemon/Number shot
// Prevent the script from running multiple times in one tick
if (player_answer1[PlayerNumber()] != 0)
terminate;

// Play musical notes on Cacodemons
if (round_current[game_roundnum-1] == 38)
PlaySound(326+HitCaco, StrParam(s:"Doomware/Note", d:HitCaco+1), CHAN_5, 1.0, false, ATTN_NONE);

for (int j=0; j<4; j++)
if (player_answer2[PlayerNumber()][j] == -1)
Expand Down Expand Up @@ -7545,7 +7565,7 @@ Script 244 (void) // Basketball points

Script 245 (void) // Bean floor destruction
{
int floor = ((GetActorX(0)-GetActorX(814))/64) >> 16;
int fl = ((GetActorX(0)-GetActorX(814))/64) >> 16;

// Play a sound if the floor hasn't been destroyed
if (GetActorZ(0) > 40.0)
Expand All @@ -7554,8 +7574,8 @@ Script 245 (void) // Bean floor destruction
// Remove the floor
if (GetActorZ(0) == 72.0)
{
Floor_LowerInstant(222+floor, 0, 64);
Sector_SetDamage(222+floor, 666, MOD_FALLING);
Floor_LowerInstant(222+fl, 0, 64);
Sector_SetDamage(222+fl, 666, MOD_FALLING);
}
}

Expand Down Expand Up @@ -7771,7 +7791,7 @@ script "DoomWare_VoidMapSky" (void) // Void skybox
restart;
}

script 254 (int num) // Void floor platform popups
script 254 (int num) // Void floor platform popups
{
int plat = -1;

Expand All @@ -7780,10 +7800,11 @@ script 254 (int num) // Void floor platform popups
{
plat = random(0, 1);
minigame_wincondition1 |= 1<<plat;

}
else if (num == 2 && (minigame_wincondition1&0x04) == 0)
{
if (minigame_wincondition1 == 0) // Someone tried to cheat by skipping a jump!
terminate;
plat = 2;
minigame_wincondition1 |= 0x04;
}
Expand Down
35 changes: 26 additions & 9 deletions ACS/MAP30.acs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ bool game_solo; // Is someone playing alone?
int game_alive; // How many people are alive
int game_phase2health; // The last phase 2 fight health check
int game_skin; // Map skin
bool game_lastplayerdied; // Is the last player dead? (Workaround for Zandronum 3.1 bug)

bool round_winifmid; // Allow a player to win if he is in the midround array (like in games where you don't do anything to win)
bool round_winifsuicide; // Pass the player if he killed himself
Expand Down Expand Up @@ -303,6 +304,7 @@ script "DoomWare_Server_Boot" OPEN
game_status = STATUS_NOTSTARTED;
game_solo = false;
game_phase2health = 0;
game_lastplayerdied = false;

// Create a "thread" that continually updates the hats and handles the database
ACS_NamedExecute("DoomWare_Server_Hats", 0);
Expand Down Expand Up @@ -763,7 +765,7 @@ Script "DoomWare_Server_GameLogic" (void)
game_status = STATUS_PHASE3;

// Respawn people
if (GetCVar("doomware_bossfightrespawn"))
if (GetCVar("doomware_bossfightrespawn") && !game_lastplayerdied)
{
// Make sure at least one person is alive
game_alive = 0;
Expand Down Expand Up @@ -883,7 +885,7 @@ Script "DoomWare_Server_GameLogic" (void)
game_alive++;

// If everone is dead, then end the game
if (game_alive == 0 && game_status != STATUS_GAMEOVER)
if ((game_alive == 0 || game_lastplayerdied) && game_status != STATUS_GAMEOVER)
{
buuingame = false;
game_status = STATUS_GAMEOVER;
Expand Down Expand Up @@ -1427,13 +1429,28 @@ Script "DoomWare_Client_Death" DEATH
ACS_NamedExecuteAlways("DoomWare_Client_DeathExtra", 0, PlayerNumber());
delay(1);

// Force the player to spectate
SetDeadSpectator(PlayerNumber(), 1);
// Force the player to spectate. If failed (return 0), then they're the last player
if (SetDeadSpectator(PlayerNumber(), 1) == 0)
{
game_lastplayerdied = true;
game_alive = 0;
}
}

Script "DoomWare_Client_Respawn" RESPAWN
{
ACS_NamedExecuteAlways("DoomWare_Client_Join", 0);

// If the player is the last one, then set a bunch of properties to behave as a fake spectator (workaround for Zandronum 3.1 bug)
delay(1);
if (game_lastplayerdied)
{
SetPlayerProperty(PlayerNumber(), 1, PROP_FLY);
SetPlayerProperty(PlayerNumber(), 1, PROP_NOTARGET);
SetPlayerProperty(PlayerNumber(), 2, PROP_INVULNERABILITY);
SetActorProperty(0, APROP_Alpha, 0.0);
SetActorProperty(0, APROP_RenderStyle, STYLE_None);
}
}

Script "DoomWare_Client_DeathExtra" (int plynum)
Expand Down Expand Up @@ -1849,13 +1866,13 @@ Script "DoomWare_Server_Minigame8" (void) // Go To The Light
ACS_NamedExecute("DoomWare_Server_TeleportPlayers", 0, 206, true, true);

// Pick a random sector to mark as safe
int ceil = random(0, 11);
Light_ChangeToValue(116+ceil, 256);
int cl = random(0, 11);
Light_ChangeToValue(116+cl, 256);
delay(SECOND);

// Lower the ceiling
for (i=0; i<13; i++)
if (i != ceil)
if (i != cl)
Ceiling_LowerAndCrush(116+i, 20, 100, 1);
delay(SECOND*3+17);

Expand All @@ -1864,9 +1881,9 @@ Script "DoomWare_Server_Minigame8" (void) // Go To The Light

// Raise the ceiling back up
for (i=0; i<13; i++)
if (ceil != i)
if (cl != i)
Ceiling_RaiseByValue(116+i, 16, 256);
Light_ChangeToValue(116+ceil, 16);
Light_ChangeToValue(116+cl, 16);
}

Script "DoomWare_Server_Minigame9" (void) // Survive (Banana)
Expand Down
Loading

0 comments on commit a604c0d

Please sign in to comment.