]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/constants.qh
Purge server/constants.qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / constants.qh
1 #pragma once
2
3 const int FRAGS_PLAYER = 0;
4 const int FRAGS_SPECTATOR = -666;
5 const int FRAGS_PLAYER_OUT_OF_GAME = -616;
6
7 ///////////////////////////
8 // cvar constants
9
10 const int CVAR_SAVE = 1;
11 const int CVAR_NOTIFY = 2;
12 const int CVAR_READONLY = 4;
13
14 // server flags
15 const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
16 const int SERVERFLAG_TEAMPLAY = 2;
17 const int SERVERFLAG_PLAYERSTATS = 4;
18
19 const int SPECIES_HUMAN = 0;
20 const int SPECIES_ROBOT_SOLID = 1;
21 const int SPECIES_ALIEN = 2;
22 const int SPECIES_ANIMAL = 3;
23 const int SPECIES_ROBOT_RUSTY = 4;
24 const int SPECIES_ROBOT_SHINY = 5;
25 const int SPECIES_RESERVED = 15;
26
27 #ifdef GAMEQC
28 const int RANKINGS_CNT = 99;
29
30 ///////////////////////////
31 // keys pressed
32 const int KEY_FORWARD = BIT(0);
33 const int KEY_BACKWARD = BIT(1);
34 const int KEY_LEFT = BIT(2);
35 const int KEY_RIGHT = BIT(3);
36 const int KEY_JUMP = BIT(4);
37 const int KEY_CROUCH = BIT(5);
38 const int KEY_ATCK = BIT(6);
39 const int KEY_ATCK2 = BIT(7);
40
41 ///////////////////////////
42 // csqc communication stuff
43
44 const int HUD_NORMAL = 0;
45 const int HUD_BUMBLEBEE_GUN = 25;
46
47 // moved that here so the client knows the max.
48 // # of maps, I'll use arrays for them :P
49 const int MAPVOTE_COUNT = 30;
50
51 // a bit more constant
52 const vector PL_MAX_CONST = '16 16 45';
53 const vector PL_MIN_CONST = '-16 -16 -24';
54 const vector PL_CROUCH_MAX_CONST = '16 16 25';
55 const vector PL_CROUCH_MIN_CONST = '-16 -16 -24';
56
57 // gametype vote flags
58 const int GTV_FORBIDDEN = 0; // Cannot be voted
59 const int GTV_AVAILABLE = 1; // Can be voted
60 const int GTV_CUSTOM    = 2; // Custom entry
61
62 // generic entity flags
63 // engine flags can't be redefined as they are used by the engine (unfortunately), they are listed here for posterity
64 #ifdef CSQC
65 const int FL_FLY                                        = 1; /* BIT(0) */
66 const int FL_SWIM                                       = 2; /* BIT(1) */
67 const int FL_CLIENT                                     = 8; /* BIT(2) */       // set for all client edicts
68 const int FL_INWATER                            = 16; /* BIT(3) */      // for enter / leave water splash
69 const int FL_MONSTER                            = 32; /* BIT(4) */
70 const int FL_GODMODE                            = 64; /* BIT(5) */      // player cheat
71 const int FL_NOTARGET                           = 128; /* BIT(6) */     // player cheat
72 const int FL_ITEM                                       = 256; /* BIT(7) */     // extra wide size for bonus items
73 const int FL_ONGROUND                           = 512; /* BIT(8) */     // standing on something
74 const int FL_PARTIALGROUND                      = 1024; /* BIT(9) */    // not all corners are valid
75 const int FL_WATERJUMP                          = 2048; /* BIT(10) */   // player jumping out of water
76 const int FL_JUMPRELEASED                       = 4096; /* BIT(11) */   // for jump debouncing
77 #endif
78 const int FL_WEAPON                             = BIT(12);
79 const int FL_POWERUP                            = BIT(13);
80 const int FL_PROJECTILE                         = BIT(14);
81 const int FL_TOSSED                             = BIT(15);
82 const int FL_SPAWNING                           = BIT(16);
83 const int FL_PICKUPITEMS                        = BIT(17);
84 const int FL_DUCKED                             = BIT(18);
85 const int FL_ONSLICK                            = BIT(19);
86 #endif
87
88 #if defined(SVQC)
89         #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT)
90 #elif defined(CSQC)
91         #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
92 #endif