From d5689d392625dee487fbcb373fc82f3a6b55d1bd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 14 Jul 2020 21:31:15 +0200 Subject: [PATCH] - removed net.h as well. --- source/games/duke/src/duke3d.h | 1 - source/games/duke/src/game.h | 1 - source/games/duke/src/net.h | 148 -------------------------- source/games/duke/src/player.h | 2 - source/games/duke/src/zz_game.cpp | 7 +- source/games/duke/src/zz_savegame.cpp | 8 +- 6 files changed, 7 insertions(+), 160 deletions(-) delete mode 100644 source/games/duke/src/net.h diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index 2a01e4914..746c16fde 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -20,7 +20,6 @@ #include "global.h" #include "macros.h" #include "names.h" -#include "net.h" #include "player.h" #include "quotemgr.h" #include "rts.h" diff --git a/source/games/duke/src/game.h b/source/games/duke/src/game.h index 15533cb5d..8c15e9330 100644 --- a/source/games/duke/src/game.h +++ b/source/games/duke/src/game.h @@ -28,7 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "fix16.h" #include "gamedef.h" -#include "net.h" #include "mmulti.h" #include "palette.h" #include "cmdlib.h" diff --git a/source/games/duke/src/net.h b/source/games/duke/src/net.h deleted file mode 100644 index 0a3228054..000000000 --- a/source/games/duke/src/net.h +++ /dev/null @@ -1,148 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 2010 EDuke32 developers and contributors - -This file is part of EDuke32. - -EDuke32 is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License version 2 -as published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ -//------------------------------------------------------------------------- - -#ifndef netplay_h_ -#define netplay_h_ - -struct ENetHost; -struct ENetPeer; -struct ENetEvent; -struct ENetPacket; - -BEGIN_DUKE_NS - - -#define MAXSYNCBYTES 16 -#define SYNCFIFOSIZ 1024 - -// TENSW: on really bad network connections, the sync FIFO queue can overflow if it is the -// same size as the move fifo. -#if MOVEFIFOSIZ >= SYNCFIFOSIZ -#error "MOVEFIFOSIZ is greater than or equal to SYNCFIFOSIZ!" -#endif - -extern char syncstat[MAXSYNCBYTES]; -extern char g_szfirstSyncMsg[MAXSYNCBYTES][60]; - -extern int g_numSyncBytes; -extern int g_foundSyncError; -extern int syncvaltail, syncvaltottail; - -void Net_ClearFIFO(void); -void Net_GetInput(void); -/* NETCODE_ENABLE is not defined */ - -// Connect/Disconnect -#define Net_Connect(...) ((void)0) -#define Net_Disconnect(...) ((void)0) -#define Net_ReceiveDisconnect(...) ((void)0) - -// Packet Handlers -#define Net_HandleServerPackets(...) ((void)0) -#define Net_HandleClientPackets(...) ((void)0) -#define Net_ParseClientPacket(...) ((void)0) -#define Net_ParseServerPacket(...) ((void)0) -#define Net_ParsePacketCommon(...) ((void)0) - -#define Net_SendAcknowledge(...) ((void)0) -#define Net_ReceiveAcknowledge(...) ((void)0) - -#define Net_SendChallenge(...) ((void)0) -#define Net_ReceiveChallenge(...) ((void)0) - -#define Net_SendNewPlayer(...) ((void)0) -#define Net_ReceiveNewPlayer(...) ((void)0) - -#define Net_SendPlayerIndex(...) ((void)0) -#define Net_ReceivePlayerIndex(...) ((void)0) - -#define Net_SendClientInfo(...) ((void)0) -#define Net_ReceiveClientInfo(...) ((void)0) - -#define Net_SendUserMapName(...) ((void)0) -#define Net_ReceiveUserMapName(...) ((void)0) - -#define Net_SendClientSync(...) ((void)0) -#define Net_ReceiveClientSync(...) ((void)0) - -#define Net_SendMapUpdate(...) ((void)0) -#define Net_ReceiveMapUpdate(...) ((void)0) - -#define Net_FillPlayerUpdate(...) ((void)0) -#define Net_ExtractPlayerUpdate(...) ((void)0) - -#define Net_SendServerUpdates(...) ((void)0) -#define Net_ReceiveServerUpdate(...) ((void)0) - -#define Net_SendClientUpdate(...) ((void)0) -#define Net_ReceiveClientUpdate(...) ((void)0) - -#define Net_SendMessage(...) ((void)0) -#define Net_ReceiveMessage(...) ((void)0) - -#define Net_StartNewGame(...) ((void)0) -#define Net_SendNewGame(...) ((void)0) -#define Net_ReceiveNewGame(...) ((void)0) - -#define Net_FillNewGame(...) ((void)0) -#define Net_ExtractNewGame(...) ((void)0) - -#define Net_SendMapVoteInitiate(...) ((void)0) -#define Net_ReceiveMapVoteInitiate(...) ((void)0) - -#define Net_SendMapVote(...) ((void)0) -#define Net_ReceiveMapVote(...) ((void)0) -#define Net_CheckForEnoughVotes(...) ((void)0) - -#define Net_SendMapVoteCancel(...) ((void)0) -#define Net_ReceiveMapVoteCancel(...) ((void)0) - -////////// - -#define Net_ResetPrediction(...) ((void)0) -#define Net_DoPrediction(...) ((void)0) -#define Net_CorrectPrediction(...) ((void)0) -#define Net_RestoreMapState(...) ((void)0) -#define Net_SyncPlayer(...) ((void)0) -#define Net_WaitForServer(...) ((void)0) - -#define Net_ActorsAreDifferent(...) 0 -#define Net_IsRelevantSprite(...) 0 -#define Net_IsRelevantStat(...) 0 -#define Net_InsertSprite(...) 0 -#define Net_DeleteSprite(...) ((void)0) - -#define Net_NotifyNewGame(...) ((void)0) - -#define Net_SendTaunt(...) ((void)0) -#define Net_SendRTS(...) ((void)0) - -#define Net_WaitForEverybody(...) ((void)0) -#define initsynccrc(...) ((void)0) -#define Net_GetSyncStat(...) ((void)0) -#define Net_DisplaySyncMsg(...) ((void)0) -#define Net_ClearFIFO(...) ((void)0) -#define Net_GetInput(...) ((void)0) - -END_DUKE_NS - -#endif // netplay_h_ diff --git a/source/games/duke/src/player.h b/source/games/duke/src/player.h index aadb6c37e..0c6d0d22c 100644 --- a/source/games/duke/src/player.h +++ b/source/games/duke/src/player.h @@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "names.h" #include "fix16.h" -#include "net.h" #include "tarray.h" #include "constants.h" #include "types.h" @@ -61,7 +60,6 @@ typedef struct uint8_t frags[MAXPLAYERS]; char user_name[32]; - char syncval[SYNCFIFOSIZ][MAXSYNCBYTES]; double lastInputTicks; } playerdata_t; diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index 01c2f02d8..a07f61c2a 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "duke3d.h" #include "compat.h" #include "baselayer.h" -#include "net.h" #include "savegame.h" #include "sbar.h" @@ -363,7 +362,7 @@ static void G_Startup(void) // These depend on having the dynamic tile and/or sound mappings set up: G_InitMultiPsky(TILE_CLOUDYOCEAN, TILE_MOONSKY1, TILE_BIGORBIT1, TILE_LA); - Net_SendClientInfo(); + //Net_SendClientInfo(); if (userConfig.CommandMap.IsNotEmpty()) { @@ -428,7 +427,7 @@ void G_UpdatePlayerFromMenu(void) if (numplayers > 1) { - Net_SendClientInfo(); + //Net_SendClientInfo(); if (sprite[g_player[myconnectindex].ps->i].picnum == TILE_APLAYER && sprite[g_player[myconnectindex].ps->i].pal != 1) sprite[g_player[myconnectindex].ps->i].pal = g_player[myconnectindex].pcolor; } @@ -547,7 +546,7 @@ int GameInterface::app_main() g_movesPerPacket = 1; //bufferjitter = 1; - initsynccrc(); + //initsynccrc(); // This needs to happen before G_CheckCommandLine() because G_GameExit() // accesses g_player[0]. diff --git a/source/games/duke/src/zz_savegame.cpp b/source/games/duke/src/zz_savegame.cpp index 467c2597b..a17e873c9 100644 --- a/source/games/duke/src/zz_savegame.cpp +++ b/source/games/duke/src/zz_savegame.cpp @@ -158,7 +158,7 @@ int32_t G_LoadPlayer(const char *path) ud.multimode = h.numplayers; S_PauseSounds(true); - Net_WaitForEverybody(); + //Net_WaitForEverybody(); FX_StopAllSounds(); @@ -218,7 +218,7 @@ bool G_SavePlayer(FSaveGameNode *sv) { G_SaveTimers(); - Net_WaitForEverybody(); + //Net_WaitForEverybody(); ready2send = 0; FString fn; @@ -246,7 +246,7 @@ bool G_SavePlayer(FSaveGameNode *sv) } ready2send = 1; - Net_WaitForEverybody(); + //Net_WaitForEverybody(); G_RestoreTimers(); ototalclock = totalclock; @@ -1120,7 +1120,7 @@ static void postloadplayer(int32_t savegamep) { ready2send = 1; clearfifo(); - Net_WaitForEverybody(); + //Net_WaitForEverybody(); } //8