diff --git a/mods/character-movesets.lua b/mods/character-movesets.lua index c582e2e51..f890a2869 100644 --- a/mods/character-movesets.lua +++ b/mods/character-movesets.lua @@ -142,9 +142,29 @@ function luigi_before_phys_step(m) end end - -- slower ground movement - if (m.action & ACT_FLAG_MOVING) ~= 0 then - hScale = hScale * 0.99 + -- acceleration + if (m.action == ACT_WALKING) then + if (floorClass == 19 or floorClass == 20) then + hScale = -(m.forwardVel / 64) + 1.5 + else + hScale = (m.forwardVel / 64) + 0.5 + end + end + + -- friction + if (m.action == ACT_BRAKING or m.action == ACT_TURNING_AROUND) then + if (floorClass == 19 or floorClass == 20) then + m.forwardVel = m.forwardVel - 3 + elseif (floorClass == 21) then + hScale = hScale * 1.5 + m.forwardVel = m.forwardVel + (hScale * 2) + else + hScale = hScale * 1.4 + m.forwardVel = m.forwardVel + hScale + end + if (m.forwardVel < 0) then + m.forwardVel = 0 + end end m.vel.x = m.vel.x * hScale @@ -161,7 +181,7 @@ function luigi_on_set_action(m) -- nerf wall kicks elseif m.action == ACT_WALL_KICK_AIR and m.prevAction ~= ACT_HOLDING_POLE and m.prevAction ~= ACT_CLIMBING_POLE then - if m.vel.y > 30 then m.vel.y = 30 end + if m.vel.y > 40 then m.vel.y = 40 end return -- turn dive into kick when holding jump diff --git a/src/pc/lua/smlua_utils.c b/src/pc/lua/smlua_utils.c index c3c16be07..8919401f1 100644 --- a/src/pc/lua/smlua_utils.c +++ b/src/pc/lua/smlua_utils.c @@ -306,7 +306,7 @@ char* smlua_lnt_to_str(struct LSTNetworkType* lnt) { case LST_NETWORK_TYPE_NIL: snprintf(sLntStr, 32, ""); break; - default: SOFT_ASSERT(false); + default: SOFT_ASSERT_RETURN(false, "UNKNOWN"); } return sLntStr; } diff --git a/src/pc/network/packets/packet_chat.c b/src/pc/network/packets/packet_chat.c index f990edf8d..7c8307f51 100644 --- a/src/pc/network/packets/packet_chat.c +++ b/src/pc/network/packets/packet_chat.c @@ -13,6 +13,7 @@ static void print_sync_object_table(void) { if (gSyncObjects[i].o == NULL) { continue; } u16 behaviorId = get_id_from_behavior(gSyncObjects[i].behavior); LOG_INFO("%03d: %04X", i, behaviorId); + behaviorId = behaviorId; // suppress warning } LOG_INFO(" "); } diff --git a/src/pc/network/packets/packet_debug_sync.c b/src/pc/network/packets/packet_debug_sync.c index 9418e0967..7d822f4b6 100644 --- a/src/pc/network/packets/packet_debug_sync.c +++ b/src/pc/network/packets/packet_debug_sync.c @@ -8,6 +8,7 @@ static void print_sync_object_table(void) { if (gSyncObjects[i].o == NULL) { continue; } u16 behaviorId = get_id_from_behavior(gSyncObjects[i].behavior); LOG_INFO("%03d: %04X", i, behaviorId); + behaviorId = behaviorId; // suppress warning } LOG_INFO(" "); }