1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(svn r26057) -Fix: a number of possibly uninitialised variables

This commit is contained in:
rubidium
2013-11-23 13:12:19 +00:00
parent 2e54c8fdfa
commit b3e93d6520
13 changed files with 28 additions and 13 deletions

View File

@@ -26,7 +26,7 @@
* Create a new socket for the game connection.
* @param s The socket to connect with.
*/
NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) : info(NULL),
NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) : info(NULL), client_id(INVALID_CLIENT_ID),
last_frame(_frame_counter), last_frame_server(_frame_counter), last_packet(_realtime_tick)
{
this->sock = s;

View File

@@ -155,9 +155,9 @@ bool IsNetworkCompatibleVersion(const char *version);
*/
struct CommandPacket : CommandContainer {
/** Make sure the pointer is NULL. */
CommandPacket() : next(NULL) {}
CommandPacket() : next(NULL), company(INVALID_COMPANY), frame(0), my_cmd(false) {}
CommandPacket *next; ///< the next command packet (if in queue)
CompanyByte company; ///< company that is executing the command
CompanyID company; ///< company that is executing the command
uint32 frame; ///< the frame in which this packet is executed
bool my_cmd; ///< did the command originate from "me"
};