Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
client.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "inexor/shared/cube_types.hpp" // for string, uchar
4 #include "inexor/shared/cube_vector.hpp" // for vector
5 
6 class VSlot;
7 struct fpsent;
8 struct ident;
9 struct packetbuf;
10 struct selinfo;
11 struct stream;
12 
13 namespace game {
14 
15 extern bool connected, demoplayback;
16 extern string servinfo;
17 extern vector<uchar> messages;
18 
19 extern int parseplayer(const char *arg);
20 extern void ignore(int cn);
21 extern void unignore(int cn);
22 extern bool isignored(int cn);
23 extern bool addmsg(int type, const char *fmt = nullptr, ...);
24 extern void switchname(const char *name, const char *tag);
25 extern void switchteam(const char *name);
26 extern void switchplayermodel(int playermodel);
27 extern void sendmapinfo();
28 extern void stopdemo();
29 extern void changemap(const char *name, int mode);
30 extern void forceintermission();
31 extern void c2sinfo(bool force = false);
32 extern void sendposition(fpsent *d, bool reliable = false);
33 
34 
35 extern int gamespeed, paused;
36 
37 extern void gamedisconnect(bool cleanup);
38 extern void parsepacketclient(int chan, packetbuf &p);
39 extern void connectattempt(const char *mapwish, int modewish, const char *password);
40 extern void connectfail();
41 extern void gameconnect();
42 extern bool allowedittoggle();
43 extern void edittoggled(bool on);
44 extern void writeclientinfo(stream *f);
45 extern void toserver(char *text);
46 extern void changemap(const char *name);
47 extern void forceedit(const char *name);
48 extern bool ispaused();
49 extern bool allowmouselook();
50 extern void broadcastfov(int fov);
51 extern void edittrigger(const selinfo &sel, int op, int arg1 = 0, int arg2 = 0, int arg3 = 0, const VSlot *vs = nullptr);
52 extern void vartrigger(ident *id);
53 extern void newmap(int size);
54 }
bool isignored(int cn)
cubescript: check if this person is ignored by you
Definition: client.cpp:527
void broadcastfov(int fov)
Definition: client.cpp:857
void gameconnect()
?
Definition: client.cpp:998
void parsepacketclient(int chan, packetbuf &p)
Definition: client.cpp:2187
Selection info: the marked area when editing.
Definition: octree.hpp:231
void connectattempt(const char *mapwish, int modewish, const char *password)
copy connection password (?)
Definition: client.cpp:981
vector< uchar > messages
collect client to server messages conveniently
Definition: client.cpp:912
StringFormatter::FmtMark fmt
Marker that starts formatting a string.
Definition: StringFormatter.cpp:5
A virtual Slot.
Definition: slot.hpp:37
SharedVar< int > playermodel
bool demoplayback
Definition: client.cpp:228
void forceedit(const char *name)
force edit mode
Definition: client.cpp:666
void stopdemo()
Definition: client.cpp:2217
bool allowmouselook()
check if looking around with the mouse is allowed.
Definition: client.cpp:893
ICOMMAND * f(float *a, float *b), floatret(*a **b)
void changemap(const char *name, int mode)
request map change, server may ignore
Definition: client.cpp:647
void vartrigger(ident *id)
change map vars in edit mode in multiplayer
Definition: client.cpp:835
void connectfail()
reset connection password after connection failed
Definition: client.cpp:989
void writeclientinfo(stream *f)
write my player name to a stream
Definition: client.cpp:319
void switchplayermodel(int playermodel)
switch my player model (inky, ogro..)
Definition: client.cpp:303
bool allowedittoggle()
check if editing is available
Definition: client.cpp:325
void c2sinfo(bool force)
send update to the server
Definition: client.cpp:1178
string servinfo
Definition: client.cpp:230
void ignore(int cn)
ignore all chat messags from a certain client number
Definition: client.cpp:509
void switchteam(const char *team)
switch own team
Definition: client.cpp:278
Definition: command.hpp:133
int d
Definition: octaedit.cpp:1749
Legacy file system streams.
Definition: stream.hpp:22
int parseplayer(const char *arg)
all functions can be called using client number or full name name should be case sensitive but the en...
Definition: client.cpp:426
bool ispaused()
check if game is paused
Definition: client.cpp:880
void edittoggled(bool on)
send edit toggle to server
Definition: client.cpp:341
GLuint GLuint GLintptr GLsizeiptr size
Definition: glexts.hpp:412
int gamespeed
Definition: client.cpp:229
int paused
network packet buffer
Definition: buffer_types.hpp:132
void toserver(char *text)
send chat messages to server
Definition: client.cpp:1032
Definition: fpsent.hpp:12
void sendmapinfo()
set booleans sendcrc and senditemstoserver if connected.
Definition: client.cpp:310
void unignore(int cn)
stop ignoring all chat messages from a certain client number
Definition: client.cpp:518
void switchname(const char *name, const char *tag)
team, name and playermodel settings
Definition: client.cpp:244
void cleanup()
cleans up game memory and SDL at exit
Definition: main.cpp:70
void forceintermission()
Definition: client.cpp:660
selinfo sel
Bot Movement, according to waypoints (saved within the map in an excluded file).
Definition: octaedit.cpp:162
bool connected
Definition: client.cpp:228
void newmap(int size)
request server to start new map (requires editmode)
Definition: client.cpp:672
bool addmsg(int type, const char *fmt,...)
add network message
Definition: client.cpp:916
static void sendposition(fpsent *d, packetbuf &q)
network message parser
Definition: client.cpp:1054
void edittrigger(const selinfo &sel, int op, int arg1, int arg2, int arg3, const VSlot *vs)
send edit messages to servers
Definition: client.cpp:700
void gamedisconnect(bool cleanup)
clean up local storage/vars after disconnect from server
Definition: client.cpp:1004