diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index bd5c1b1f..27ec5c1c 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -687,6 +687,7 @@ --- @field public vanishCapDurationVcutm integer --- @field public vanishCapSequence integer --- @field public visibleSecrets integer +--- @field public wdwWaterLevelSpeed number --- @field public wingCapDuration integer --- @field public wingCapDurationTotwc integer --- @field public wingCapLookUpReq integer diff --git a/docs/lua/structs.md b/docs/lua/structs.md index 5fe94990..41bea6d2 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -1005,6 +1005,7 @@ | vanishCapDurationVcutm | `integer` | | | vanishCapSequence | `integer` | | | visibleSecrets | `integer` | | +| wdwWaterLevelSpeed | `number` | | | wingCapDuration | `integer` | | | wingCapDurationTotwc | `integer` | | | wingCapLookUpReq | `integer` | | diff --git a/src/game/behaviors/wdw_water_level.inc.c b/src/game/behaviors/wdw_water_level.inc.c index b4a2e66b..d3dd7c2f 100644 --- a/src/game/behaviors/wdw_water_level.inc.c +++ b/src/game/behaviors/wdw_water_level.inc.c @@ -72,7 +72,7 @@ void bhv_water_level_diamond_loop(void) { case WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL: o->oAngleVelYaw = 0; *gEnvironmentLevels = (s32) approach_f32_symmetric( - (f32) *gEnvironmentLevels, (f32) o->oWaterLevelTriggerTargetWaterLevel, 10.0f); + (f32) *gEnvironmentLevels, (f32) o->oWaterLevelTriggerTargetWaterLevel, gLevelValues.wdwWaterLevelSpeed); if (*gEnvironmentLevels == o->oWaterLevelTriggerTargetWaterLevel) { if ((s16) o->oFaceAngleYaw == 0) o->oAction++; // Sets to WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING diff --git a/src/game/hardcoded.c b/src/game/hardcoded.c index 5094d0d7..42f16a87 100644 --- a/src/game/hardcoded.c +++ b/src/game/hardcoded.c @@ -118,7 +118,8 @@ struct LevelValues gDefaultLevelValues = { .maxLives = 100, .maxCoins = 999, .numCoinsToLife = 50, - .bubbleOnDeathBarrierInCapStages = false + .bubbleOnDeathBarrierInCapStages = false, + .wdwWaterLevelSpeed = 10.0f, }; struct LevelValues gLevelValues = { 0 }; diff --git a/src/game/hardcoded.h b/src/game/hardcoded.h index 29ff6b69..8b328ad2 100644 --- a/src/game/hardcoded.h +++ b/src/game/hardcoded.h @@ -86,6 +86,7 @@ struct LevelValues { u16 maxCoins; u16 numCoinsToLife; bool bubbleOnDeathBarrierInCapStages; + f32 wdwWaterLevelSpeed; }; extern struct LevelValues gLevelValues; diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 340497e3..5ced8ad7 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -743,7 +743,7 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] = { "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE }, }; -#define LUA_LEVEL_VALUES_FIELD_COUNT 46 +#define LUA_LEVEL_VALUES_FIELD_COUNT 47 static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = { { "bubbleOnDeathBarrierInCapStages", LVT_BOOL, offsetof(struct LevelValues, bubbleOnDeathBarrierInCapStages), false, LOT_NONE }, { "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE }, @@ -787,6 +787,7 @@ static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = { "vanishCapDurationVcutm", LVT_U16, offsetof(struct LevelValues, vanishCapDurationVcutm), false, LOT_NONE }, { "vanishCapSequence", LVT_U8, offsetof(struct LevelValues, vanishCapSequence), false, LOT_NONE }, { "visibleSecrets", LVT_U8, offsetof(struct LevelValues, visibleSecrets), false, LOT_NONE }, + { "wdwWaterLevelSpeed", LVT_F32, offsetof(struct LevelValues, wdwWaterLevelSpeed), false, LOT_NONE }, { "wingCapDuration", LVT_U16, offsetof(struct LevelValues, wingCapDuration), false, LOT_NONE }, { "wingCapDurationTotwc", LVT_U16, offsetof(struct LevelValues, wingCapDurationTotwc), false, LOT_NONE }, { "wingCapLookUpReq", LVT_U8, offsetof(struct LevelValues, wingCapLookUpReq), false, LOT_NONE },