5018: fix dummy hammer interval, this became incorrect after a few days r=def- a=C0D3D3V

Reported by Konsti here: https://discord.com/channels/252358080522747904/293493549758939136/967073772836376586
I have tested the change on Justfly with my dummy :D since it is exactly the same interval as before it should not change any Physics. 

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [x] Considered possible null pointers and out of bounds array indexing
- [x] Changed no physics that affect existing maps
- [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: c0d3d3v <c0d3d3v@mag-keinen-spam.de>
This commit is contained in:
bors[bot] 2022-04-25 13:17:01 +00:00 committed by GitHub
commit 1dea02d456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -415,7 +415,7 @@ int CGameClient::OnSnapInput(int *pData, bool Dummy, bool Force)
} }
else else
{ {
if((m_DummyFire / 12.5f) - (int)(m_DummyFire / 12.5f) > 0.01f) if(m_DummyFire % 25 != 0)
{ {
m_DummyFire++; m_DummyFire++;
return 0; return 0;

View file

@ -499,7 +499,7 @@ public:
int m_LocalIDs[NUM_DUMMIES]; int m_LocalIDs[NUM_DUMMIES];
CNetObj_PlayerInput m_DummyInput; CNetObj_PlayerInput m_DummyInput;
CNetObj_PlayerInput m_HammerInput; CNetObj_PlayerInput m_HammerInput;
int m_DummyFire; unsigned int m_DummyFire;
bool m_ReceivedDDNetPlayer; bool m_ReceivedDDNetPlayer;
class CTeamsCore m_Teams; class CTeamsCore m_Teams;