Dynamic Surroundings

Dynamic Surroundings

51M Downloads

Foosteps Not Respecting Movement Speed

ChloeDawn opened this issue ยท 1 comments

commented

From what I can gather, your custom footstep sounds seem to always play at a constant rate regardless of how fast the player is actually moving. In vanilla, footstep frequency changes relative to the player's current movement speed. This is most noticeable with my WIP mod Roam, where I change the player's movement speed based on the material they are walking on. I merely multiply their x and z motion by a modifier, so I assume vanilla determines the footstep frequency from motion too. I'm not sure where it is handled so unfortunately, I cannot refer you to the code.

Mod version: 1.12.2-3.4.9.3

EDIT: Okay I may have misheard whilst testing, and I am completely wrong about this. You do seem to change footstep frequency based on movement speed, my bad. >.< Feel free to close this

commented

That would be strange. I notice it when debugging. The start of detecting velocity is found here. The main method for determining if it is a WALK or RUN is here.

EDIT: Just saw your edit. :) With the latest BETAs the rate at playing footstep sounds is increased as compared to the previous non-BETA (v3.4.7.2). Reasons are:

  • I changed the movement detection method to support other mobs client side. The classic method relied on server updates and those can be tardy and stuff. This change is more accurate and as a result it produces "missing" foosteps.
  • I adjusted the STRIDE value of the player/mobs. The footsteps now line up with the animated stride of the player animation when in 3rd perspective. This caught some players off guard because they were used to a certain footstep tempo. (This may be part of what you are experiencing.)