Reduced player particle spam
This commit is contained in:
parent
3e64af2e53
commit
e2b8d6a138
|
@ -416,6 +416,7 @@ void network_update_player(void) {
|
|||
// figure out if we should send it or not
|
||||
static u8 sTicksSinceSend = 0;
|
||||
static u32 sLastPlayerAction = 0;
|
||||
static u32 sLastPlayerParticles = 0;
|
||||
static f32 sLastStickX = 0;
|
||||
static f32 sLastStickY = 0;
|
||||
static u32 sLastButtonDown = 0;
|
||||
|
@ -426,6 +427,7 @@ void network_update_player(void) {
|
|||
|| (sLastPlayerAction != m->action)
|
||||
|| (sLastButtonDown != m->controller->buttonDown)
|
||||
|| (sLastButtonPressed != m->controller->buttonPressed)
|
||||
|| (sLastPlayerParticles != m->particleFlags)
|
||||
|| (stickDist > 5.0f);
|
||||
|
||||
if (!shouldSend) { sTicksSinceSend++; return; }
|
||||
|
@ -437,4 +439,5 @@ void network_update_player(void) {
|
|||
sLastStickY = m->controller->stickY;
|
||||
sLastButtonDown = m->controller->buttonDown;
|
||||
sLastButtonPressed = m->controller->buttonPressed;
|
||||
sLastPlayerParticles = m->particleFlags;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue