mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-28 04:51:40 +00:00
Reduced player particle spam
This commit is contained in:
parent
2b80d6480b
commit
1409ba829b
1 changed files with 11 additions and 8 deletions
|
|
@ -416,6 +416,7 @@ void network_update_player(void) {
|
||||||
// figure out if we should send it or not
|
// figure out if we should send it or not
|
||||||
static u8 sTicksSinceSend = 0;
|
static u8 sTicksSinceSend = 0;
|
||||||
static u32 sLastPlayerAction = 0;
|
static u32 sLastPlayerAction = 0;
|
||||||
|
static u32 sLastPlayerParticles = 0;
|
||||||
static f32 sLastStickX = 0;
|
static f32 sLastStickX = 0;
|
||||||
static f32 sLastStickY = 0;
|
static f32 sLastStickY = 0;
|
||||||
static u32 sLastButtonDown = 0;
|
static u32 sLastButtonDown = 0;
|
||||||
|
|
@ -426,6 +427,7 @@ void network_update_player(void) {
|
||||||
|| (sLastPlayerAction != m->action)
|
|| (sLastPlayerAction != m->action)
|
||||||
|| (sLastButtonDown != m->controller->buttonDown)
|
|| (sLastButtonDown != m->controller->buttonDown)
|
||||||
|| (sLastButtonPressed != m->controller->buttonPressed)
|
|| (sLastButtonPressed != m->controller->buttonPressed)
|
||||||
|
|| (sLastPlayerParticles != m->particleFlags)
|
||||||
|| (stickDist > 5.0f);
|
|| (stickDist > 5.0f);
|
||||||
|
|
||||||
if (!shouldSend) { sTicksSinceSend++; return; }
|
if (!shouldSend) { sTicksSinceSend++; return; }
|
||||||
|
|
@ -437,4 +439,5 @@ void network_update_player(void) {
|
||||||
sLastStickY = m->controller->stickY;
|
sLastStickY = m->controller->stickY;
|
||||||
sLastButtonDown = m->controller->buttonDown;
|
sLastButtonDown = m->controller->buttonDown;
|
||||||
sLastButtonPressed = m->controller->buttonPressed;
|
sLastButtonPressed = m->controller->buttonPressed;
|
||||||
|
sLastPlayerParticles = m->particleFlags;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue