diff options
Diffstat (limited to 'muswd.c')
-rw-r--r-- | muswd.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -233,7 +233,7 @@ threadnetppu(void *) if(debug) fprint(2, "\t%.*lub\n", sizeof(kdown)*8, kdown); - nc->player->kdown = kdown; + nbsendul(nc->player->inputq, kdown); break; case NCbuhbye: @@ -333,6 +333,7 @@ void threadsim(void *) { int i; + ulong kdown; uvlong then, now; double frametime, Δt; Ioproc *io; @@ -359,6 +360,9 @@ threadsim(void *) player = p->players[i]; ship = &p->u->ships[i]; + if(nbrecv(player->inputq, &kdown) != 0) + player->kdown = kdown; + if((player->kdown & 1<<Kquit) != 0){ np = p->next; popconn(player->conn); |