Open SaintWish opened 1 year ago
Seems to work now 🤔
Just properly tested it now so even when you're holding the forward key it will still get marked as released and pressed repeatedly.
I was able to test with modifying the sprint code to just this: (void CBasePlayer::DoSprint())
if (FBitSet(pbs.ButtonsDown, IN_FORWARD))
{
SendEventMsg("forward pressed");
}
if (FBitSet(m_afButtonReleased, IN_FORWARD))
{
SendEventMsg("forward release");
}
Every frame it seems to reset the button bit data and apply again next frame for buttons that are being held down. Probably has something to do with these https://github.com/MSRevive/MasterSwordRebirth/blob/09c6863ca1a8a323f50eb27876a58e8c7db6077f/game/server/player/playershared.cpp#L1255 and https://github.com/MSRevive/MasterSwordRebirth/blob/09c6863ca1a8a323f50eb27876a58e8c7db6077f/game/server/player/player.cpp#L1615
Though I don't really know for sure because I'm not to familiar with bit operations.