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