misc. touching up of doc and NetworkServer comments...
authorterom
Tue, 09 Dec 2008 02:58:31 +0000
changeset 355 0fafdf0029c0
parent 354 d9b0e213ce15
child 356 723ffc669c49
misc. touching up of doc and NetworkServer comments...
doc/kishna.tex
src/Network/Server.cc
--- a/doc/kishna.tex	Tue Dec 09 02:55:45 2008 +0000
+++ b/doc/kishna.tex	Tue Dec 09 02:58:31 2008 +0000
@@ -304,7 +304,7 @@
 Two of these classes are NetworkClientLocalPlayer and NetworkClientRemotePlayer. Both inherit from
 NetworkClientPlayerBase, which inherits Player (virtually) and NetworkObject\_Client. NetworkClientLocalPlayer and
 NetworkClientRemotePlayer then also inherit LocalPlayer and Remote player virtually, respectively.
-NetworkClientPlayerBase, contains the common methods that update the Player's state in response to messages received
+NetworkClientPlayerBase contains the common methods that update the Player's state in response to messages received
 from the server. NetworkClientLocalPlayer overrides handleInput to send the input mask to the server, and
 NetworkClientRemotePlayer can handle remote clients disconnecting from the server.
 
@@ -323,7 +323,7 @@
 \item If player dies while rope is attached the rope will still be
     attached when the player spawns.
 \item If rope is thrown without releasing it first, rope will pull worm
-  when midair
+    while in mid-air
 \item Collisions with the terrain are only tested for the edgepoints
     of the polygon.
 \item Existing Player ropes and Projectiles are not sent to the client when it connects, which can cause apparent
--- a/src/Network/Server.cc	Tue Dec 09 02:55:45 2008 +0000
+++ b/src/Network/Server.cc	Tue Dec 09 02:58:31 2008 +0000
@@ -62,17 +62,22 @@
 
     // send other player objects
     for (std::list<NetworkServerPlayer*>::iterator it = server.players.begin(); it != server.players.end(); it++) {
+        NetworkPacket player_pkt;
         NetworkServerPlayer *player = *it;
-        NetworkPacket player_pkt;
         
         // player is not in players list yet
         assert(player != this);
         
+        // write packet
         player_pkt.write_vector(player->position);
 
         player->send_to(node, NETMSG_PLAYER_INFO, player_pkt, true);
+
+        // XXX: send rope info...
     }
 
+    // XXX: send projectiles? Or let the client handle the events that the unknown projectiles generate?
+
     // broadcast NETMSG_PLAYER_JOIN to all clients except current
     this->send_all_except(NETMSG_PLAYER_JOIN, hello_pkt, node, true);