]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/constants.qh
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / constants.qh
index 675b75c0a4a0fc4ae21e39bc4fbbe67415e8bb3c..344eec48cee50401790682864c2e79e97abfcd13 100644 (file)
@@ -1,5 +1,30 @@
 #pragma once
 
+const int FRAGS_PLAYER = 0;
+const int FRAGS_SPECTATOR = -666;
+const int FRAGS_PLAYER_OUT_OF_GAME = -616;
+
+///////////////////////////
+// cvar constants
+
+const int CVAR_SAVE = 1;
+const int CVAR_NOTIFY = 2;
+const int CVAR_READONLY = 4;
+
+// server flags
+const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
+const int SERVERFLAG_TEAMPLAY = 2;
+const int SERVERFLAG_PLAYERSTATS = 4;
+
+const int SPECIES_HUMAN = 0;
+const int SPECIES_ROBOT_SOLID = 1;
+const int SPECIES_ALIEN = 2;
+const int SPECIES_ANIMAL = 3;
+const int SPECIES_ROBOT_RUSTY = 4;
+const int SPECIES_ROBOT_SHINY = 5;
+const int SPECIES_RESERVED = 15;
+
+#ifdef GAMEQC
 const int RANKINGS_CNT = 99;
 
 ///////////////////////////
@@ -13,13 +38,6 @@ const int KEY_CROUCH = BIT(5);
 const int KEY_ATCK = BIT(6);
 const int KEY_ATCK2 = BIT(7);
 
-///////////////////////////
-// cvar constants
-
-const int CVAR_SAVE = 1;
-const int CVAR_NOTIFY = 2;
-const int CVAR_READONLY = 4;
-
 ///////////////////////////
 // csqc communication stuff
 
@@ -30,30 +48,45 @@ const int HUD_BUMBLEBEE_GUN = 25;
 // # of maps, I'll use arrays for them :P
 const int MAPVOTE_COUNT = 30;
 
-const int SPECIES_HUMAN = 0;
-const int SPECIES_ROBOT_SOLID = 1;
-const int SPECIES_ALIEN = 2;
-const int SPECIES_ANIMAL = 3;
-const int SPECIES_ROBOT_RUSTY = 4;
-const int SPECIES_ROBOT_SHINY = 5;
-const int SPECIES_RESERVED = 15;
-
-const int FRAGS_PLAYER = 0;
-const int FRAGS_SPECTATOR = -666;
-const int FRAGS_LMS_LOSER = -616;
-const int FRAGS_PLAYER_NONSOLID = FRAGS_LMS_LOSER;
-// we can use this frags value for both
-
-// server flags
-const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
-const int SERVERFLAG_TEAMPLAY = 2;
-const int SERVERFLAG_PLAYERSTATS = 4;
-
 // a bit more constant
 const vector PL_MAX_CONST = '16 16 45';
 const vector PL_MIN_CONST = '-16 -16 -24';
+const vector PL_CROUCH_MAX_CONST = '16 16 25';
+const vector PL_CROUCH_MIN_CONST = '-16 -16 -24';
 
 // gametype vote flags
 const int GTV_FORBIDDEN = 0; // Cannot be voted
 const int GTV_AVAILABLE = 1; // Can be voted
 const int GTV_CUSTOM    = 2; // Custom entry
+
+// generic entity flags
+// engine flags can't be redefined as they are used by the engine (unfortunately), they are listed here for posterity
+#ifdef CSQC
+const int FL_FLY                                       = 1; /* BIT(0) */
+const int FL_SWIM                                      = 2; /* BIT(1) */
+const int FL_CLIENT                                    = 8; /* BIT(2) */       // set for all client edicts
+const int FL_INWATER                           = 16; /* BIT(3) */      // for enter / leave water splash
+const int FL_MONSTER                           = 32; /* BIT(4) */
+const int FL_GODMODE                           = 64; /* BIT(5) */      // player cheat
+const int FL_NOTARGET                          = 128; /* BIT(6) */     // player cheat
+const int FL_ITEM                                      = 256; /* BIT(7) */     // extra wide size for bonus items
+const int FL_ONGROUND                          = 512; /* BIT(8) */     // standing on something
+const int FL_PARTIALGROUND                     = 1024; /* BIT(9) */    // not all corners are valid
+const int FL_WATERJUMP                         = 2048; /* BIT(10) */   // player jumping out of water
+const int FL_JUMPRELEASED                      = 4096; /* BIT(11) */   // for jump debouncing
+#endif
+const int FL_WEAPON                            = BIT(12);
+const int FL_POWERUP                           = BIT(13);
+const int FL_PROJECTILE                        = BIT(14);
+const int FL_TOSSED                            = BIT(15);
+const int FL_SPAWNING                          = BIT(16);
+const int FL_PICKUPITEMS                       = BIT(17);
+const int FL_DUCKED                            = BIT(18);
+const int FL_ONSLICK                           = BIT(19);
+#endif
+
+#if defined(SVQC)
+       #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT)
+#elif defined(CSQC)
+       #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOSHADOW | EF_SELECTABLE | EF_TELEPORT_BIT)
+#endif