From e6a11d01f60c15fae0022d3079603dd316a3f845 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 25 Apr 2020 01:28:52 +0200 Subject: [PATCH] drop obsolete cmode stuff --- src/game/client.cc | 7 ------- src/game/game.cc | 16 +--------------- src/game/game.hh | 29 ----------------------------- src/game/render.cc | 8 -------- 4 files changed, 1 insertion(+), 59 deletions(-) diff --git a/src/game/client.cc b/src/game/client.cc index 57e644d..57b0136 100644 --- a/src/game/client.cc +++ b/src/game/client.cc @@ -35,13 +35,6 @@ namespace game settexture("media/interface/radar/radar.png", 3); } - clientmode *cmode = NULL; - - void setclientmode() - { - cmode = NULL; - } - bool connected = false, remote = false; int sessionid = 0; string servdesc = "", servauth = ""; diff --git a/src/game/game.cc b/src/game/game.cc index cd3918a..9ec8ea4 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -23,7 +23,6 @@ namespace game { if(ispaused()) return; spawnplayer(player1); - if(cmode) cmode->respawned(player1); } gameent *pointatplayer() @@ -68,15 +67,13 @@ namespace game crouchplayer(player1, 10, true); moveplayer(player1, 10, true); entities::checkitems(player1); - if(cmode) cmode->checkitems(player1); } if(player1->clientnum>=0) c2sinfo(); // do this last, to reduce the effective frame lag } void spawnplayer(gameent *d) // place at random spawn { - if(cmode) cmode->pickspawn(d); - else findplayerspawn(d, -1, 0); + findplayerspawn(d, -1, 0); spawnstate(d); if(d==player1) { @@ -135,7 +132,6 @@ namespace game { removetrackedparticles(d); removetrackeddynlights(d); - if(cmode) cmode->removeplayer(d); DELETEP(clients[cn]); cleardynentcache(); } @@ -159,16 +155,8 @@ namespace game // reset perma-state player1->startgame(); - setclientmode(); - maptime = maprealtime = 0; - if(cmode) - { - cmode->preload(); - cmode->setup(); - } - syncplayer(); disablezoom(); @@ -243,7 +231,6 @@ namespace game if(d->state!=CS_EDITING) { if(d->state!=CS_SPECTATOR) drawhudicons(d); - if(cmode) cmode->drawhud(d, w, h); } pophudmatrix(); @@ -251,7 +238,6 @@ namespace game float clipconsole(float w, float h) { - if(cmode) return cmode->clipconsole(w, h); return 0; } diff --git a/src/game/game.hh b/src/game/game.hh index d21f69b..dc99018 100644 --- a/src/game/game.hh +++ b/src/game/game.hh @@ -224,28 +224,6 @@ namespace entities namespace game { - struct clientmode - { - virtual ~clientmode() {} - - virtual void preload() {} - virtual float clipconsole(float w, float h) { return 0; } - virtual void drawhud(gameent *d, int w, int h) {} - virtual void rendergame() {} - virtual void respawned(gameent *d) {} - virtual void setup() {} - virtual void checkitems(gameent *d) {} - virtual int respawnwait(gameent *d, int delay = 0) { return 0; } - virtual void pickspawn(gameent *d) { findplayerspawn(d, -1, 0); } - virtual void senditems(packetbuf &p) {} - virtual void removeplayer(gameent *d) {} - virtual void gameover() {} - virtual bool hidefrags() { return false; } - }; - - extern clientmode *cmode; - extern void setclientmode(); - // game extern string clientmap; @@ -276,17 +254,10 @@ namespace game extern void sendposition(gameent *d, bool reliable = false); // render - struct playermodelinfo - { - const char *model[1], *hudguns[1], - *icon[1]; - bool ragdoll; - }; extern void saveragdoll(gameent *d); extern void clearragdolls(); extern void moveragdolls(); - extern const playermodelinfo &getplayermodelinfo(gameent *d); extern int getplayercolor(gameent *d, int team); extern int chooserandomplayermodel(int seed); extern void syncplayer(); diff --git a/src/game/render.cc b/src/game/render.cc index 22cf5e1..bdb67c0 100644 --- a/src/game/render.cc +++ b/src/game/render.cc @@ -26,14 +26,6 @@ namespace game { } - void renderplayer(gameent *d, const playermodelinfo &mdl, int color, float fade, int flags = 0, bool mainpass = true) - { - } - - static inline void renderplayer(gameent *d, float fade = 1, int flags = 0) - { - } - void rendergame() { }