Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bomb_server.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "inexor/gamemode/bomb_common.hpp" // for bombmode, spaw...
3 #include "inexor/network/legacy/buffer_types.hpp" // for packetbuf (ptr...
4 #include "inexor/server/gamemode/gamemode_server.hpp" // for servmode
5 #include "inexor/shared/cube_vector.hpp" // for vector
6 
7 struct vec;
8 
9 namespace server {
10 struct clientinfo;
11 
12 extern void sendspawn(clientinfo *ci);
13 
15 {
19 
20  static constexpr int COUNTDOWNSECONDS = 3;
21 
22  void setup() override;
23 
24  bool parsespawnloc(ucharbuf &p, bool commit);
25 
26  void updatelimbo() override;
27 
28  void leavegame(clientinfo *ci, bool disconnecting) override;
29 
30  void sendspawnlocs(bool resuscitate = false);
31 
32  bool gamerunning();
33 
34  bool canspawn(clientinfo *ci, bool connecting) override;
35 
36  void pushentity(int type, vec o);
37 
38  void died(clientinfo *target, clientinfo *actor) override;
39 
40  bool canchangeteam(clientinfo *ci, const char *oldteam, const char *newteam) override;
41 
42  void cleanup() override
43  {
45  }
46 
47  bool parse_network_message(int type, clientinfo *ci, clientinfo *cq, packetbuf &p) override;
48 };
49 
50 
51 
52 
53 } // ns server
void deletecontents()
Definition: cube_vector.hpp:165
bool parse_network_message(int type, clientinfo *ci, clientinfo *cq, packetbuf &p) override
process gamemode specific network messages.
Definition: bomb_server.cpp:188
Definition: client_management.hpp:217
int timecounter
Definition: bomb_server.hpp:18
template implementation of buffers (networking e.g.).
Definition: buffer_types.hpp:14
void sendspawnlocs(bool resuscitate=false)
Definition: bomb_server.cpp:119
void died(clientinfo *target, clientinfo *actor) override
Definition: bomb_server.cpp:168
static constexpr int COUNTDOWNSECONDS
Definition: bomb_server.hpp:20
Definition: bomb_common.hpp:13
Definition: bomb_server.hpp:14
void setup() override
Definition: bomb_server.cpp:28
bool gamerunning()
Definition: bomb_server.cpp:210
bool parsespawnloc(ucharbuf &p, bool commit)
Definition: bomb_server.cpp:48
vector with 3 floats and some useful methods.
Definition: geom.hpp:110
bool canchangeteam(clientinfo *ci, const char *oldteam, const char *newteam) override
Definition: bomb_server.cpp:184
void cleanup() override
Definition: bomb_server.hpp:42
bool notgotspawnlocations
Definition: bomb_server.hpp:16
void updatelimbo() override
Definition: bomb_server.cpp:67
network packet buffer
Definition: buffer_types.hpp:132
Definition: gamemode_server.hpp:24
int countdown
Definition: bomb_server.hpp:18
vector< spawnloc * > spawnlocs
Definition: bomb_server.hpp:17
int sequence
Definition: bomb_server.hpp:18
bool canspawn(clientinfo *ci, bool connecting) override
Definition: bomb_server.cpp:143
void sendspawn(clientinfo *ci)
Definition: server.cpp:754
void pushentity(int type, vec o)
Definition: bomb_server.cpp:155
bool target(fpsent *d, aistate &b, int pursue=0, bool force=false, float mindist=0.f)
Definition: ai.cpp:393
void leavegame(clientinfo *ci, bool disconnecting) override
Definition: bomb_server.cpp:110