From 37aa44d2d06690510095195fe23ac34ee913e63e Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Sun, 18 Sep 2022 22:00:39 -0400 Subject: [PATCH] Lower water level on Football/Shell Rush (#194) On 0 star saves, the water is not lowered so the gameplay experience is impaired. --- mods/football.lua | 9 +++++++++ mods/shell-rush/level.lua | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/mods/football.lua b/mods/football.lua index 29aca1544..d7f647cbe 100644 --- a/mods/football.lua +++ b/mods/football.lua @@ -1298,6 +1298,14 @@ function update() end end +function on_level_init() + -- lower water level on castle grounds + if gNetworkPlayers[0].currLevelNum == LEVEL_CASTLE_GROUNDS then + set_environment_region(1, -800) + set_environment_region(2, -800) + end +end + ----------- -- hooks -- ----------- @@ -1307,6 +1315,7 @@ hook_event(HOOK_UPDATE, update) hook_event(HOOK_ON_HUD_RENDER, on_hud_render) hook_event(HOOK_ON_PLAYER_CONNECTED, on_player_connected) hook_event(HOOK_ALLOW_PVP_ATTACK, allow_pvp_attack) +hook_event(HOOK_ON_LEVEL_INIT, on_level_init) if network_is_server() then hook_chat_command('football-reset', "[game|ball] resets the game or ball", on_football_reset_command) end diff --git a/mods/shell-rush/level.lua b/mods/shell-rush/level.lua index ea2817170..6491c36fa 100644 --- a/mods/shell-rush/level.lua +++ b/mods/shell-rush/level.lua @@ -87,6 +87,12 @@ function on_level_init() -- reset rankings race_clear_rankings() + + -- lower water level on castle grounds + if gNetworkPlayers[0].currLevelNum == LEVEL_CASTLE_GROUNDS then + set_environment_region(1, -800) + set_environment_region(2, -800) + end end function spawn_custom_level_objects()