void loopsound(entity e, int ch, Sound samp, float vol, float attn);
void Ent_RemoveProjectile(entity this);
-
-const int FL_PROJECTILE = BIT(15);
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);
void entcs_force_origin(entity player);
+ bool radar_showenemies;
+
#endif
#ifdef CSQC
#include "sv_nexball.qh"
#include <server/gamelog.qh>
+#include <common/ent_cs.qh>
.entity ballcarried;
#include <server/g_world.qh>
#include <server/gamelog.qh>
#include <server/race.qh>
+#include <common/ent_cs.qh>
#define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
float autocvar_g_race_qualifying_timelimit;
return this.dphitcontentsmask;
else if(this.solid == SOLID_SLIDEBOX)
{
- if(this.flags & 32) // TODO: FL_MONSTER
+ if(this.flags & FL_MONSTER)
return DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_MONSTERCLIP;
else
return DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
const int MOVETYPE_PHYSICS = 32;
const int MOVETYPE_FLY_WORLDONLY = 33;
-const int FL_ITEM = 256;
-const int FL_ONGROUND = 512;
#elif defined(SVQC)
const int MOVETYPE_ANGLENOCLIP = 1;
const int MOVETYPE_ANGLECLIP = 2;
const int MOVETYPE_QCPLAYER = 150; // QC-driven player physics, no think functions!
const int MOVETYPE_QCENTITY = 151; // QC-driven entity physics, some think functions!
-const int FL_ONSLICK = BIT(20);
-
const int MOVETYPE_FAKEPUSH = 13;
const int MOVEFLAG_VALID = BIT(23);
#include <common/state.qh>
#endif
-const int FL_DUCKED = BIT(19);
-
.entity conveyor;
.float race_penalty;
string autocvar_cl_jumpspeedcap_min;
string autocvar_cl_jumpspeedcap_max;
- const int FL_WATERJUMP = 2048; // player jumping out of water
- const int FL_JUMPRELEASED = 4096; // for jump debouncing
-
.float watertype;
.float waterlevel;
.int items;
#pragma once
-const int FL_WEAPON = BIT(13);
-const int FL_POWERUP = BIT(14);
-const int FL_PROJECTILE = BIT(15);
-const int FL_TOSSED = BIT(16);
-const int FL_NO_WEAPON_STAY = BIT(17);
-const int FL_SPAWNING = BIT(18);
-const int FL_PICKUPITEMS = BIT(19);
-
const int SVC_SETVIEW = 5;
const int RESPAWN_FORCE = BIT(0);
string matchid;
-bool radar_showenemies;
-
.int minelayer_mines;
.float vortex_charge;
.float vortex_charge_rottime;
.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
-#define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
-// when doing this, hagar can go through clones
-// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
-
.int spectatee_status;
.bool zoomstate;
#include <server/items/spawning.qh>
#include "player.qh"
#include "weapons/accuracy.qh"
+#include "weapons/common.qh"
#include "weapons/csqcprojectile.qh"
#include "weapons/selection.qh"
#include "../common/command/_mod.qh"
.float misc_bulletcounter;
+#define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
+// when doing this, hagar can go through clones
+// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
+
.int missile_flags;
const int MIF_SPLASH = BIT(1);
const int MIF_ARC = BIT(2);