diff --git a/code/foundation/src/packets/pkt_send_keystate.c b/code/foundation/src/packets/pkt_send_keystate.c index 28d8b17..04013f6 100644 --- a/code/foundation/src/packets/pkt_send_keystate.c +++ b/code/foundation/src/packets/pkt_send_keystate.c @@ -63,8 +63,10 @@ int32_t pkt_send_keystate_handler(pkt_header *header) { i->y = zpl_clamp(table.y, -1.0f, 1.0f); i->mx = table.mx; i->my = table.my; - i->hx = (i->x != 0.0f) ? i->x : i->hx; - i->hy = (i->y != 0.0f) ? i->y : i->hy; + if (i->x != 0.0f && i->y != 0.0f) { + i->hx = i->x; + i->hy = i->y; + } i->use |= table.use; i->sprint = table.sprint; i->ctrl = table.ctrl;