fix heading dir

efd/v1
Dominik Madarász 2023-02-02 17:26:33 +01:00
parent 8c288dc193
commit 7ed35706fc
1 changed files with 4 additions and 2 deletions

View File

@ -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;