src/Network/Client.cc
changeset 334 0cf3f2be51eb
parent 332 78657bf06302
child 381 9b35bc329d23
equal deleted inserted replaced
333:50ec1ab32d2d 334:0cf3f2be51eb
   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