netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer src/NetPanzer/Classes/Network/SystemN...


From: Matthias Braun
Subject: [netPanzer-CVS] netpanzer src/NetPanzer/Classes/Network/SystemN...
Date: Mon, 01 Dec 2003 10:36:54 -0500

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Matthias Braun <address@hidden> 03/12/01 10:36:50

Modified files:
        src/NetPanzer/Classes/Network: SystemNetMessage.hpp 
                                       UnitNetMessage.hpp 
        src/NetPanzer/Core: NetworkGlobals.hpp 
        src/NetPanzer/Interfaces: GameManager.cpp UnitInterface.cpp 

Log message:
        -fixed a few more valgrind warnings

Modified files:
        .              : BUGS 

Log message:
        BUGS update

Patches:
Index: netpanzer/src/NetPanzer/Classes/Network/SystemNetMessage.hpp
diff -u netpanzer/src/NetPanzer/Classes/Network/SystemNetMessage.hpp:1.6 
netpanzer/src/NetPanzer/Classes/Network/SystemNetMessage.hpp:1.7
--- netpanzer/src/NetPanzer/Classes/Network/SystemNetMessage.hpp:1.6    Sat Nov 
22 10:43:29 2003
+++ netpanzer/src/NetPanzer/Classes/Network/SystemNetMessage.hpp        Sun Nov 
30 18:23:13 2003
@@ -42,7 +42,8 @@
 class SystemSetPlayerView : public NetMessage
 {
 public:
-    iXY camera_loc;
+    int32_t camera_loc_x;
+    int32_t camera_loc_y;
 
     SystemSetPlayerView()
     {
@@ -217,7 +218,7 @@
 class SystemConnectAlert : public NetMessage
 {
 public:
-    PlayerID player_id;
+    uint16_t player_id;
     unsigned char alert_enum;
 
     SystemConnectAlert()
@@ -228,7 +229,7 @@
 
     void set(const PlayerID &player, unsigned char alert_type )
     {
-        player_id = player;
+        player_id = player.getIndex();
         alert_enum = alert_type;
     }
 }
Index: netpanzer/src/NetPanzer/Classes/Network/UnitNetMessage.hpp
diff -u netpanzer/src/NetPanzer/Classes/Network/UnitNetMessage.hpp:1.4 
netpanzer/src/NetPanzer/Classes/Network/UnitNetMessage.hpp:1.5
--- netpanzer/src/NetPanzer/Classes/Network/UnitNetMessage.hpp:1.4      Tue Sep 
16 16:16:11 2003
+++ netpanzer/src/NetPanzer/Classes/Network/UnitNetMessage.hpp  Sun Nov 30 
18:23:13 2003
@@ -38,29 +38,30 @@
 class UnitOpcodeMessage : public NetMessage
 {
 public:
-    unsigned short code_size;
-    unsigned char  opcode_count;
+    uint16_t code_size;
+    uint8_t opcode_count;
 
-    unsigned char data[ _OPCODE_MESSAGE_LIMIT ];
+    uint8_t data[ _OPCODE_MESSAGE_LIMIT ];
 
     UnitOpcodeMessage()
     {
         message_class = _net_message_class_unit;
         message_id = _net_message_id_opcode_mesg;
+        memset(data, 0, _OPCODE_MESSAGE_LIMIT);
     }
 
     unsigned short realSize( void );
 
-}
-__attribute__((packed));
+} __attribute__((packed));
 
 
 class UnitIniSyncMessage : public NetMessage
 {
 public:
-    unsigned char unit_type;
+    uint8_t unit_type;
     UnitID unit_id;
-    iXY location;
+    uint32_t location_x;
+    uint32_t location_y;
     UnitState unit_state;
 
     UnitIniSyncMessage()
@@ -74,8 +75,7 @@
         return( sizeof( UnitIniSyncMessage ) );
     }
 
-}
-__attribute__((packed));
+} __attribute__((packed));
 
 // ** NOTE: A big, mother fucking HACK
 
@@ -90,38 +90,34 @@
         message_id = _net_message_id_destroy_unit;
     }
 
-}
-__attribute__((packed));
+} __attribute__((packed));
 
 
 class UnitRemoteCreate : public NetMessage
 {
 public:
     UnitID new_unit_id;
-    iXY location;
-    unsigned char unit_type;
+    uint32_t location_x;
+    uint32_t location_y;
+    uint8_t unit_type;
 
     UnitRemoteCreate()
     {
         message_class = _net_message_class_unit;
         message_id = _net_message_id_create_unit;
     }
-
-}
-__attribute__((packed));
+} __attribute__((packed));
 
 class UnitSyncIntegrityCheck : public NetMessage
 {
 public:
-
     UnitSyncIntegrityCheck()
     {
         message_class = _net_message_class_unit;
         message_id = _net_message_id_unit_sync_integrity_check;
     }
 
-}
-__attribute__((packed));
+} __attribute__((packed));
 
 #ifdef MSVC
 #pragma pack()
Index: netpanzer/src/NetPanzer/Core/NetworkGlobals.hpp
diff -u netpanzer/src/NetPanzer/Core/NetworkGlobals.hpp:1.6 
netpanzer/src/NetPanzer/Core/NetworkGlobals.hpp:1.7
--- netpanzer/src/NetPanzer/Core/NetworkGlobals.hpp:1.6 Sun Nov 30 18:00:29 2003
+++ netpanzer/src/NetPanzer/Core/NetworkGlobals.hpp     Sun Nov 30 18:23:13 2003
@@ -21,6 +21,6 @@
 #define _NETPANZER_DEFAULT_PORT_TCP            3030
 
 #define _NETPANZER_CODEWORD          "netPanzerTest02"
-#define _NETPANZER_PROTOCOL_VERSION  1013
+#define _NETPANZER_PROTOCOL_VERSION  1014
 
 #endif // ** _NETWORK_GLOBALS_HPP
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.69 
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.70
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.69     Sat Nov 22 
10:43:35 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp  Sun Nov 30 18:23:13 2003
@@ -349,7 +349,8 @@
     } else {
         SystemSetPlayerView set_view;
 
-        set_view.camera_loc = world_loc;
+        set_view.camera_loc_x = world_loc.x;
+        set_view.camera_loc_y = world_loc.y;
         SERVER->sendMessage( player, &set_view, sizeof( SystemSetPlayerView ), 
0);
     }
 
@@ -386,7 +387,8 @@
 
     set_view = (SystemSetPlayerView *) message;
 
-    WorldViewInterface::setCameraPosition( set_view->camera_loc );
+    WorldViewInterface::setCameraPosition(
+            iXY(set_view->camera_loc_x, set_view->camera_loc_y) );
 }
 
 // ******************************************************************
Index: netpanzer/src/NetPanzer/Interfaces/UnitInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/UnitInterface.cpp:1.13 
netpanzer/src/NetPanzer/Interfaces/UnitInterface.cpp:1.14
--- netpanzer/src/NetPanzer/Interfaces/UnitInterface.cpp:1.13   Mon Nov 24 
05:18:44 2003
+++ netpanzer/src/NetPanzer/Interfaces/UnitInterface.cpp        Sun Nov 30 
18:23:13 2003
@@ -503,7 +503,8 @@
 
             assert(unit != 0);
             create_mesg.new_unit_id = unit->unit_id;
-            create_mesg.location = next_loc;
+            create_mesg.location_x = next_loc.x;
+            create_mesg.location_y = next_loc.y;
             create_mesg.unit_type = unit->unit_state.unit_type;
             PUBLIC_MESSAGE_ENCODER.encodeMessage( &create_mesg,
                                                   sizeof( create_mesg )
@@ -514,7 +515,6 @@
     } // ** for unit_type_index
 
     PUBLIC_MESSAGE_ENCODER.sendEncodedMessage();
-
 }
 
 // ******************************************************************
@@ -942,7 +942,7 @@
     player_index = sync_message->unit_id.getPlayer();
 
     unit = newUnit( sync_message->unit_type,
-                    sync_message->location,
+                    iXY(sync_message->location_x, sync_message->location_y),
                     player_index );
 
     unit->unit_id = sync_message->unit_id;
@@ -1015,7 +1015,7 @@
     player_index = create_mesg->new_unit_id.getPlayer();
 
     unit = newUnit( create_mesg->unit_type,
-                    create_mesg->location,
+                    iXY(create_mesg->location_x, create_mesg->location_y),
                     player_index );
 
     unit->unit_id = create_mesg->new_unit_id;
@@ -1109,7 +1109,8 @@
 
         sync_message.unit_type  = unit->unit_state.unit_type;
         sync_message.unit_id    = unit->unit_id;
-        sync_message.location   = unit_map_loc;
+        sync_message.location_x = unit_map_loc.x;
+        sync_message.location_y = unit_map_loc.y;
         sync_message.unit_state = unit->unit_state;
 
         send_ret_val = SERVER->sendMessage( sync_units_remote_player,
Index: netpanzer/BUGS
diff -u netpanzer/BUGS:1.14 netpanzer/BUGS:1.15
--- netpanzer/BUGS:1.14 Sun Nov 23 11:44:14 2003
+++ netpanzer/BUGS      Mon Dec  1 10:36:49 2003
@@ -1,4 +1,4 @@
-- Astar priority_queue "open" are not clear anytime
+- Astar priority_queue "open" are not clear anytime - can't reproduce
 - in LinkListDoubleTemplate.addFront sometime is (front==0 && rear != 0)
     - Matze: I checked LinkListDoubleTemplate alot, the class seems to be
       correct. Most probably the memory corruption happens elsewhere
@@ -7,8 +7,9 @@
 - when the bot occupied an outpost and you occupy it back, then the build menu
   shows the panzer you built last, but the one choosen by the bot comes out the
   outpost
-- bernhard reports that the bots crash when the server closes
+- bernhard reports that the bots crash when the server closes - can't reproduce
 - sometimes 2 players spawn at the same place
 - game doesn't end when enough objectives are taken
 - irc ping/pong code with reconnect seems to be broken
-- powerups don't work anymore
+- powerups don't work anymore - fixed
+- the build window doesn't come up anymore




reply via email to

[Prev in Thread] Current Thread [Next in Thread]