mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- removed faketimerhandler and the last static remains of EDuke's netcode.
This commit is contained in:
parent
af225abf80
commit
1e9679aceb
13 changed files with 11 additions and 83 deletions
|
@ -1208,7 +1208,7 @@ RESTART:
|
|||
break;
|
||||
if (i >= 0)
|
||||
break;
|
||||
faketimerhandler();
|
||||
//faketimerhandler();
|
||||
ProcessFrame();
|
||||
gameUpdate = true;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,6 @@ void sndPlaySpecialMusicOrNothing(int nMusic);
|
|||
struct GameInterface : ::GameInterface
|
||||
{
|
||||
const char* Name() override { return "Blood"; }
|
||||
void faketimerhandler() override;
|
||||
int app_main() override;
|
||||
void UpdateScreenSize() override;
|
||||
bool GenerateSavePic() override;
|
||||
|
|
|
@ -619,7 +619,7 @@ void netWaitForEveryone(char a1)
|
|||
if (inputState.EscapePressed() && a1)
|
||||
Bexit(0);
|
||||
gameHandleEvents();
|
||||
faketimerhandler();
|
||||
//faketimerhandler();
|
||||
for (p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (gPlayerReady[p] < gPlayerReady[myconnectindex])
|
||||
break;
|
||||
|
@ -1323,11 +1323,6 @@ void faketimerhandler(void)
|
|||
// enet_host_service(gNetMode == NETWORK_SERVER ? gNetENetServer : gNetENetClient, NULL, 0);
|
||||
}
|
||||
|
||||
void GameInterface::faketimerhandler()
|
||||
{
|
||||
::Blood::faketimerhandler();
|
||||
}
|
||||
|
||||
void netPlayerQuit(int nPlayer)
|
||||
{
|
||||
char buffer[128];
|
||||
|
|
|
@ -487,8 +487,6 @@ EXTERN char gotsector[(MAXSECTORS+7)>>3];
|
|||
|
||||
extern uint32_t drawlinepat;
|
||||
|
||||
extern void faketimerhandler(void);
|
||||
|
||||
extern int32_t novoxmips;
|
||||
|
||||
extern int16_t tiletovox[MAXTILES];
|
||||
|
|
|
@ -140,12 +140,6 @@ static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall,
|
|||
}
|
||||
|
||||
|
||||
void faketimerhandler()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// setslope
|
||||
//
|
||||
|
|
|
@ -52,7 +52,6 @@ struct GameInterface
|
|||
virtual const char* Name() { return "$"; }
|
||||
virtual ~GameInterface() {}
|
||||
virtual bool GenerateSavePic() { return false; }
|
||||
virtual void faketimerhandler() {} // This is a remnant of older versions, but Blood backend has not updated yet.
|
||||
virtual int app_main() = 0;
|
||||
virtual void UpdateScreenSize() {}
|
||||
virtual void FreeGameData() {}
|
||||
|
|
|
@ -47,7 +47,6 @@ set( PCH_SOURCES
|
|||
src/zz_common.cpp
|
||||
src/zz_game.cpp
|
||||
src/zz_global.cpp
|
||||
src/zz_net.cpp
|
||||
src/zz_player.cpp
|
||||
src/zz_premap.cpp
|
||||
src/zz_savegame.cpp
|
||||
|
|
|
@ -30,7 +30,6 @@ struct ENetPacket;
|
|||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
extern void *g_netServer;
|
||||
|
||||
#define MAXSYNCBYTES 16
|
||||
#define SYNCFIFOSIZ 1024
|
||||
|
@ -50,7 +49,6 @@ extern int syncvaltail, syncvaltottail;
|
|||
|
||||
void Net_ClearFIFO(void);
|
||||
void Net_GetInput(void);
|
||||
void Net_GetPackets(void);
|
||||
/* NETCODE_ENABLE is not defined */
|
||||
|
||||
// Connect/Disconnect
|
||||
|
|
|
@ -160,7 +160,7 @@ void G_HandleLocalKeys(void)
|
|||
if (screenpeek == -1) screenpeek = 0;
|
||||
}
|
||||
|
||||
if ((g_netServer || ud.multimode > 1) && buttonMap.ButtonDown(gamefunc_Show_Opponents_Weapon))
|
||||
if ((ud.multimode > 1) && buttonMap.ButtonDown(gamefunc_Show_Opponents_Weapon))
|
||||
{
|
||||
buttonMap.ClearButton(gamefunc_Show_Opponents_Weapon);
|
||||
ud.ShowOpponentWeapons = ud.showweapons = 1-ud.showweapons;
|
||||
|
@ -588,7 +588,7 @@ int GameInterface::app_main()
|
|||
|
||||
connectpoint2[0] = -1;
|
||||
|
||||
Net_GetPackets();
|
||||
//Net_GetPackets();
|
||||
|
||||
for (bssize_t i=0; i<MAXPLAYERS; i++)
|
||||
G_MaybeAllocPlayer(i);
|
||||
|
@ -628,7 +628,7 @@ int GameInterface::app_main()
|
|||
|
||||
// getnames();
|
||||
|
||||
if (g_netServer || ud.multimode > 1)
|
||||
if (ud.multimode > 1)
|
||||
{
|
||||
ud.m_monsters_off = 1;
|
||||
ud.m_player_skill = 0;
|
||||
|
@ -662,7 +662,7 @@ MAIN_LOOP_RESTART:
|
|||
//if (ud.warp_on == 0)
|
||||
{
|
||||
#if 0 // fixme once the game loop has been done.
|
||||
if ((g_netServer || ud.multimode > 1) && boardfilename[0] != 0)
|
||||
if ((ud.multimode > 1) && boardfilename[0] != 0)
|
||||
{
|
||||
auto maprecord = FindMap(boardfilename);
|
||||
ud.m_respawn_monsters = ud.m_player_skill == 4;
|
||||
|
@ -708,7 +708,7 @@ MAIN_LOOP_RESTART:
|
|||
goto MAIN_LOOP_RESTART;
|
||||
}
|
||||
|
||||
Net_GetPackets();
|
||||
//Net_GetPackets();
|
||||
|
||||
G_HandleLocalKeys();
|
||||
|
||||
|
@ -745,7 +745,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
advancequeue(myconnectindex);
|
||||
|
||||
if (((!System_WantGuiCapture() && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (g_netServer || ud.multimode > 1)) &&
|
||||
if (((!System_WantGuiCapture() && (g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) || ud.recstat == 2 || (ud.multimode > 1)) &&
|
||||
(g_player[myconnectindex].ps->gm&MODE_GAME))
|
||||
{
|
||||
moveloop();
|
||||
|
|
|
@ -1,46 +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.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#ifndef NETWORK_DISABLE
|
||||
#include "enet.h"
|
||||
#endif
|
||||
|
||||
#include "duke3d.h"
|
||||
#include "game.h"
|
||||
#include "gamedef.h"
|
||||
#include "net.h"
|
||||
#include "premap.h"
|
||||
#include "savegame.h"
|
||||
|
||||
#include "m_crc32.h"
|
||||
#include "mapinfo.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
void *g_netServer = NULL;
|
||||
void faketimerhandler(void) {}
|
||||
void Net_GetPackets(void)
|
||||
{
|
||||
}
|
||||
|
||||
END_DUKE_NS
|
|
@ -238,7 +238,7 @@ bool G_SavePlayer(FSaveGameNode *sv)
|
|||
fw.Close();
|
||||
bool res = FinishSavegameWrite();
|
||||
|
||||
if (!g_netServer && ud.multimode < 2)
|
||||
if (ud.multimode < 2)
|
||||
{
|
||||
Printf("Saved: %s\n", fn.GetChars());
|
||||
quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Game Saved");
|
||||
|
@ -257,7 +257,7 @@ bool G_SavePlayer(FSaveGameNode *sv)
|
|||
|
||||
bool GameInterface::LoadGame(FSaveGameNode* sv)
|
||||
{
|
||||
if (g_netServer || ud.multimode > 1)
|
||||
if (ud.multimode > 1)
|
||||
{
|
||||
quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Multiplayer Loading Not Yet Supported");
|
||||
FTA(QUOTE_RESERVED4, g_player[myconnectindex].ps);
|
||||
|
@ -276,7 +276,7 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
|
|||
|
||||
bool GameInterface::SaveGame(FSaveGameNode* sv)
|
||||
{
|
||||
if (g_netServer || ud.multimode > 1)
|
||||
if (ud.multimode > 1)
|
||||
{
|
||||
quoteMgr.InitializeQuote(QUOTE_RESERVED4, "Multiplayer Saving Not Yet Supported");
|
||||
FTA(QUOTE_RESERVED4, g_player[myconnectindex].ps);
|
||||
|
|
|
@ -1404,7 +1404,6 @@ void LogoLevel(void)
|
|||
|
||||
handleevents();
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
// limits checks to max of 40 times a second
|
||||
if (totalclock >= ototalclock + synctics)
|
||||
{
|
||||
|
@ -1478,7 +1477,6 @@ void CreditsLevel(void)
|
|||
{
|
||||
handleevents();
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
// limits checks to max of 40 times a second
|
||||
if (totalclock >= ototalclock + synctics)
|
||||
{
|
||||
|
@ -1630,7 +1628,6 @@ void MenuLevel(void)
|
|||
handleevents();
|
||||
C_RunDelayedCommands();
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
// limits checks to max of 40 times a second
|
||||
if (totalclock >= ototalclock + synctics)
|
||||
{
|
||||
|
@ -1902,7 +1899,6 @@ void BonusScreen()
|
|||
{
|
||||
handleevents();
|
||||
|
||||
// taken from top of faketimerhandler
|
||||
if (totalclock < ototalclock + limit)
|
||||
{
|
||||
continue;
|
||||
|
@ -2430,8 +2426,6 @@ void InitRunLevel(void)
|
|||
StartAmbientSound();
|
||||
}
|
||||
|
||||
void faketimerhandler();
|
||||
|
||||
void RunLevel(void)
|
||||
{
|
||||
InitRunLevel();
|
||||
|
|
|
@ -908,8 +908,6 @@ AddSyncInfoToPacket(int *j)
|
|||
}
|
||||
}
|
||||
|
||||
void faketimerhandler(void) { ; }
|
||||
|
||||
void
|
||||
UpdateInputs(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue