equal
deleted
inserted
replaced
293 // set ourselves as the local player |
293 // set ourselves as the local player |
294 state.setLocalPlayer(this); |
294 state.setLocalPlayer(this); |
295 } |
295 } |
296 |
296 |
297 void NetworkClientLocalPlayer::handleInput (PlayerInput input, TimeMS dt) { |
297 void NetworkClientLocalPlayer::handleInput (PlayerInput input, TimeMS dt) { |
298 (void) dt; |
|
299 |
|
300 // always send move, in all cases |
|
301 NetworkPacket pkt; |
298 NetworkPacket pkt; |
|
299 |
|
300 // write packet |
302 pkt.write_uint16(input); |
301 pkt.write_uint16(input); |
303 |
302 pkt.write_uint32(dt); |
|
303 |
|
304 // send |
304 send(NETMSG_CLIENT_INPUT, pkt, false); |
305 send(NETMSG_CLIENT_INPUT, pkt, false); |
305 |
306 |
306 // do not handle locally |
307 // do not handle locally |
307 } |
308 } |
308 |
309 |