src/Network/Server.cc
changeset 221 fbc5db6fce45
parent 209 68cc4248a508
child 223 2fcaf54ed37b
equal deleted inserted replaced
220:1c92222af6d3 221:fbc5db6fce45
   109     if (src != node) {
   109     if (src != node) {
   110         Engine::log(WARN, "server_player.on_move") << "packet from wrong src=" << src << ", node=" << node;
   110         Engine::log(WARN, "server_player.on_move") << "packet from wrong src=" << src << ", node=" << node;
   111         return;
   111         return;
   112     }
   112     }
   113     
   113     
   114     PlayerInput_Move input = pkt.read_uint16();
   114     PlayerInput input = pkt.read_uint16();
   115 
   115 
   116     Engine::log(INFO, "server_player.on_move") << "player=" << obj << ", old_pos=" << position << ", input=" << input;
   116     Engine::log(INFO, "server_player.on_move") << "player=" << obj << ", old_pos=" << position << ", input=" << input;
   117     
   117     
   118     // apply input
   118     // apply input
   119     handleMove(input);  
   119     handleInput(input);  
   120 
   120 
   121     // send position update
   121     // send position update
   122     send_position_update();
   122     send_position_update();
   123 }
   123 }
   124         
   124