--- a/src/proto2/NetworkClient.cc Tue Nov 18 20:00:04 2008 +0000
+++ b/src/proto2/NetworkClient.cc Tue Nov 18 21:17:14 2008 +0000
@@ -95,13 +95,13 @@
}
NetworkClientLocalPlayer::NetworkClientLocalPlayer (NetworkClient &client, CL_NetObject_Client &obj, Vector initial_position) :
- LocalPlayer(initial_position, true), client(client), obj(obj) {
+ LocalPlayer(client.state, initial_position, true), client(client), obj(obj) {
// receive messages
slots.connect(obj.sig_received_message(NETMSG_PLAYER_POSITION), this, &NetworkClientLocalPlayer::on_position);
}
-bool NetworkClientLocalPlayer::handleMove (PlayerInput_Move move) {
+void NetworkClientLocalPlayer::handleMove (PlayerInput_Move move) {
// always send move, in all cases
CL_NetPacket pkt;
pkt.output.write_uint16(move);
@@ -109,7 +109,7 @@
obj.send(NETMSG_CLIENT_MOVE, pkt, false);
// handle locally
- return LocalPlayer::handleMove(move);
+ LocalPlayer::handleMove(move);
}
void NetworkClientLocalPlayer::on_position (CL_NetPacket &pkt) {
@@ -121,11 +121,11 @@
Engine::log(INFO, "client_player.on_position") << "obj=" << obj << ", pos=" << pos;
// XXX: transmit velocity/force
- updatePhysics(pos, Vector(0, 0), Vector(0, 0));
+ updatePhysics(pos, Vector(0, 0));
}
NetworkClientRemotePlayer::NetworkClientRemotePlayer (NetworkClient &client, CL_NetObject_Client &obj, Vector initial_position) :
- RemotePlayer(initial_position, true), client(client), obj(obj) {
+ RemotePlayer(client.state, initial_position, true), client(client), obj(obj) {
// receive messages
slots.connect(obj.sig_received_message(NETMSG_PLAYER_POSITION), this, &NetworkClientRemotePlayer::on_position);
@@ -141,7 +141,7 @@
Engine::log(INFO, "client_player.on_position") << "obj=" << obj << ", pos=" << pos;
// XXX: transmit velocity/force
- updatePhysics(pos, Vector(0, 0), Vector(0, 0));
+ updatePhysics(pos, Vector(0, 0));
}
void NetworkClientRemotePlayer::on_quit (CL_NetPacket &pkt) {