Go to the documentation of this file.
33 #define GAMEVERSION "baseq2"
36 #define svc_muzzleflash 1
37 #define svc_muzzleflash2 2
38 #define svc_temp_entity 3
40 #define svc_inventory 5
41 #define svc_stufftext 11
46 #define DAMAGE_TIME 0.5
52 #define SPAWNFLAG_NOT_EASY 0x00000100
53 #define SPAWNFLAG_NOT_MEDIUM 0x00000200
54 #define SPAWNFLAG_NOT_HARD 0x00000400
55 #define SPAWNFLAG_NOT_DEATHMATCH 0x00000800
56 #define SPAWNFLAG_NOT_COOP 0x00001000
59 #define FL_FLY 0x00000001
60 #define FL_SWIM 0x00000002 // implied immunity to drowining
61 #define FL_IMMUNE_LASER 0x00000004
62 #define FL_INWATER 0x00000008
63 #define FL_GODMODE 0x00000010
64 #define FL_NOTARGET 0x00000020
65 #define FL_IMMUNE_SLIME 0x00000040
66 #define FL_IMMUNE_LAVA 0x00000080
67 #define FL_PARTIALGROUND 0x00000100 // not all corners are valid
68 #define FL_WATERJUMP 0x00000200 // player jumping out of water
69 #define FL_TEAMSLAVE 0x00000400 // not the first on the team
70 #define FL_NO_KNOCKBACK 0x00000800
71 #define FL_POWER_ARMOR 0x00001000 // power armor (if any) is active
72 #define FL_RESPAWN 0x80000000 // used for item respawning
78 #define TAG_GAME 765 // clear when unloading the dll
79 #define TAG_LEVEL 766 // clear when loading a new level
82 #define MELEE_DISTANCE 80
84 #define BODY_QUEUE_SIZE 8
116 #define DEAD_RESPAWNABLE 3
119 #define RANGE_MELEE 0
125 #define GIB_ORGANIC 0
126 #define GIB_METALLIC 1
129 #define AI_STAND_GROUND 0x00000001
130 #define AI_TEMP_STAND_GROUND 0x00000002
131 #define AI_SOUND_TARGET 0x00000004
132 #define AI_LOST_SIGHT 0x00000008
133 #define AI_PURSUIT_LAST_SEEN 0x00000010
134 #define AI_PURSUE_NEXT 0x00000020
135 #define AI_PURSUE_TEMP 0x00000040
136 #define AI_HOLD_FRAME 0x00000080
137 #define AI_GOOD_GUY 0x00000100
138 #define AI_BRUTAL 0x00000200
139 #define AI_NOSTEP 0x00000400
140 #define AI_DUCKED 0x00000800
141 #define AI_COMBAT_POINT 0x00001000
142 #define AI_MEDIC 0x00002000
143 #define AI_RESURRECTING 0x00004000
146 #define AS_STRAIGHT 1
153 #define ARMOR_JACKET 1
154 #define ARMOR_COMBAT 2
156 #define ARMOR_SHARD 4
159 #define POWER_ARMOR_NONE 0
160 #define POWER_ARMOR_SCREEN 1
161 #define POWER_ARMOR_SHIELD 2
164 #define RIGHT_HANDED 0
165 #define LEFT_HANDED 1
166 #define CENTER_HANDED 2
170 #define SFL_CROSS_TRIGGER_1 0x00000001
171 #define SFL_CROSS_TRIGGER_2 0x00000002
172 #define SFL_CROSS_TRIGGER_3 0x00000004
173 #define SFL_CROSS_TRIGGER_4 0x00000008
174 #define SFL_CROSS_TRIGGER_5 0x00000010
175 #define SFL_CROSS_TRIGGER_6 0x00000020
176 #define SFL_CROSS_TRIGGER_7 0x00000040
177 #define SFL_CROSS_TRIGGER_8 0x00000080
178 #define SFL_CROSS_TRIGGER_MASK 0x000000ff
182 #define PNOISE_SELF 0
183 #define PNOISE_WEAPON 1
184 #define PNOISE_IMPACT 2
216 #define IT_WEAPON 1 // use makes active weapon
219 #define IT_STAY_COOP 8
221 #define IT_POWERUP 32
224 #define WEAP_BLASTER 1
225 #define WEAP_SHOTGUN 2
226 #define WEAP_SUPERSHOTGUN 3
227 #define WEAP_MACHINEGUN 4
228 #define WEAP_CHAINGUN 5
229 #define WEAP_GRENADES 6
230 #define WEAP_GRENADELAUNCHER 7
231 #define WEAP_ROCKETLAUNCHER 8
232 #define WEAP_HYPERBLASTER 9
233 #define WEAP_RAILGUN 10
274 char helpmessage1[512];
275 char helpmessage2[512];
283 char spawnpoint[512];
469 #define MOD_UNKNOWN 0
470 #define MOD_BLASTER 1
471 #define MOD_SHOTGUN 2
472 #define MOD_SSHOTGUN 3
473 #define MOD_MACHINEGUN 4
474 #define MOD_CHAINGUN 5
475 #define MOD_GRENADE 6
476 #define MOD_G_SPLASH 7
478 #define MOD_R_SPLASH 9
479 #define MOD_HYPERBLASTER 10
480 #define MOD_RAILGUN 11
481 #define MOD_BFG_LASER 12
482 #define MOD_BFG_BLAST 13
483 #define MOD_BFG_EFFECT 14
484 #define MOD_HANDGRENADE 15
485 #define MOD_HG_SPLASH 16
490 #define MOD_TELEFRAG 21
491 #define MOD_FALLING 22
492 #define MOD_SUICIDE 23
493 #define MOD_HELD_GRENADE 24
494 #define MOD_EXPLOSIVE 25
495 #define MOD_BARREL 26
498 #define MOD_SPLASH 29
499 #define MOD_TARGET_LASER 30
500 #define MOD_TRIGGER_HURT 31
502 #define MOD_TARGET_BLASTER 33
503 #define MOD_FRIENDLY_FIRE 0x8000000
510 #define FOFS(x) (intptr_t)&(((edict_t *)0)->x)
511 #define STOFS(x) (intptr_t)&(((spawn_temp_t *)0)->x)
512 #define LLOFS(x) (intptr_t)&(((level_locals_t *)0)->x)
513 #define CLOFS(x) (intptr_t)&(((gclient_t *)0)->x)
515 #define random() ((rand () & 0x7fff) / ((float)0x7fff))
516 #define crandom() (2.0 * (random() - 0.5))
556 #define world (&g_edicts[0])
559 #define ITEM_TRIGGER_SPAWN 0x00000001
560 #define ITEM_NO_TOUCH 0x00000002
563 #define DROPPED_ITEM 0x00010000
564 #define DROPPED_PLAYER_ITEM 0x00020000
565 #define ITEM_TARGETS_USED 0x00040000
571 #define FFL_SPAWNTEMP 1
572 #define FFL_NOSPAWN 2
616 #define ITEM_INDEX(x) ((x)-itemlist)
648 float *
tv (
float x,
float y,
float z);
663 #define DAMAGE_RADIUS 0x00000001 // damage was indirect
664 #define DAMAGE_NO_ARMOR 0x00000002 // armour does not protect from this damage
665 #define DAMAGE_ENERGY 0x00000004 // damage is from an energy based weapon
666 #define DAMAGE_NO_KNOCKBACK 0x00000008 // do not affect velocity, just view angles
667 #define DAMAGE_BULLET 0x00000010 // damage is from a bullet (used for ricochets)
668 #define DAMAGE_NO_PROTECTION 0x00000020 // armor, shields, invulnerability, and godmode have no effect
670 #define DEFAULT_BULLET_HSPREAD 300
671 #define DEFAULT_BULLET_VSPREAD 500
672 #define DEFAULT_SHOTGUN_HSPREAD 1000
673 #define DEFAULT_SHOTGUN_VSPREAD 500
674 #define DEFAULT_DEATHMATCH_SHOTGUN_COUNT 12
675 #define DEFAULT_SHOTGUN_COUNT 12
676 #define DEFAULT_SSHOTGUN_COUNT 20
823 #define ANIM_BASIC 0 // stand / run
827 #define ANIM_ATTACK 4
829 #define ANIM_REVERSE 6
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
void G_SetSpectatorStats(edict_t *ent)
void ChasePrev(edict_t *ent)
void PlayerTrail_Init(void)
void MoveClientToIntermission(edict_t *client)
void AI_SetSightClient(void)
void monster_fire_railgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int flashtype)
void ClientBeginServerFrame(edict_t *ent)
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
qboolean visible(edict_t *self, edict_t *other)
gitem_t * GetItemByIndex(int index)
void G_RunEntity(edict_t *ent)
int ArmorIndex(edict_t *ent)
edict_t * PlayerTrail_PickNext(edict_t *self)
void InitClientPersistant(gclient_t *client)
void AttackFinished(edict_t *self, float time)
void PutClientInServer(edict_t *ent)
void fire_rail(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick)
void FoundTarget(edict_t *self)
qboolean M_walkmove(edict_t *ent, float yaw, float dist)
client_persistant_t coop_respawn
void fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
qboolean(* pickup)(struct edict_s *ent, struct edict_s *other)
void monster_death_use(edict_t *self)
void player_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void fire_bfg(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
void ai_run(edict_t *self, float dist)
void G_TouchTriggers(edict_t *ent)
void InitClientResp(gclient_t *client)
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
void BecomeExplosion1(edict_t *self)
qboolean SV_FilterPacket(char *from)
struct gclient_s * client
void Think_Weapon(edict_t *ent)
void(* blocked)(edict_t *self, edict_t *other)
void M_droptofloor(edict_t *ent)
float vectoyaw(vec3_t vec)
void fire_grenade(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius)
void fire_grenade2(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean held)
float * tv(float x, float y, float z)
void(* prethink)(edict_t *ent)
void monster_fire_grenade(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int flashtype)
int clusternums[MAX_ENT_CLUSTERS]
qboolean Add_Ammo(edict_t *ent, gitem_t *item, int count)
void ValidateSelectedItem(edict_t *ent)
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
gitem_t * FindItem(char *pickup_name)
void ThrowDebris(edict_t *self, char *modelname, float speed, vec3_t origin)
int groundentity_linkcount
qboolean M_CheckAttack(edict_t *self)
void walkmonster_start(edict_t *self)
void BeginIntermission(edict_t *targ)
int sight_entity_framenum
void G_InitEdict(edict_t *e)
vec3_t intermission_origin
void(* use)(struct edict_s *ent, struct gitem_s *item)
void G_SetStats(edict_t *ent)
gitem_t * FindItemByClassname(char *classname)
void PlayerTrail_New(vec3_t spot)
qboolean infront(edict_t *self, edict_t *other)
void ai_turn(edict_t *self, float dist)
void vectoangles(vec3_t vec, vec3_t angles)
void Touch_Item(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
edict_t * findradius(edict_t *from, vec3_t org, float rad)
char * G_CopyString(char *in)
void G_FreeEdict(edict_t *e)
void M_MoveToGoal(edict_t *ent, float dist)
void FetchClientEntData(edict_t *ent)
void swimmonster_start(edict_t *self)
edict_t * PlayerTrail_LastSpot(void)
cvar_t * spectator_password
void DeathmatchScoreboardMessage(edict_t *client, edict_t *killer)
void(* think)(edict_t *self)
qboolean M_CheckBottom(edict_t *ent)
int PowerArmorType(edict_t *ent)
weaponstate_t weaponstate
void Cmd_Score_f(edict_t *ent)
void respawn(edict_t *ent)
void M_CatagorizePosition(edict_t *ent)
float damage_debounce_time
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
float touch_debounce_time
void monster_fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
void ai_charge(edict_t *self, float dist)
void monster_think(edict_t *self)
void(* pain)(edict_t *self, edict_t *other, float kick, int damage)
void ai_stand(edict_t *self, float dist)
qboolean FacingIdeal(edict_t *self)
void M_CheckGround(edict_t *ent)
void monster_fire_bfg(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int kick, float damage_radius, int flashtype)
void GetChaseTarget(edict_t *ent)
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
void fire_bullet(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int mod)
void Cmd_Help_f(edict_t *ent)
void player_pain(edict_t *self, edict_t *other, float kick, int damage)
edict_t * PlayerTrail_PickFirst(edict_t *self)
void(* use)(edict_t *self, edict_t *other, edict_t *activator)
monsterinfo_t monsterinfo
void ThrowClientHead(edict_t *self, int damage)
int range(edict_t *self, edict_t *other)
void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir, vec3_t point, vec3_t normal, int damage, int knockback, int dflags, int mod)
int sound_entity_framenum
void ai_walk(edict_t *self, float dist)
void ClientEndServerFrame(edict_t *ent)
void(* weaponthink)(struct edict_s *ent)
void G_UseTargets(edict_t *ent, edict_t *activator)
float invincible_framenum
void(* drop)(struct edict_s *ent, struct gitem_s *item)
void M_FlyCheck(edict_t *self)
void PlayerNoise(edict_t *who, vec3_t where, int type)
void G_SetMovedir(vec3_t angles, vec3_t movedir)
qboolean KillBox(edict_t *ent)
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
void(* touch)(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
void G_TouchSolids(edict_t *ent)
void fire_blaster(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect, qboolean hyper)
void G_CheckChaseStats(edict_t *ent)
qboolean OnSameTeam(edict_t *ent1, edict_t *ent2)
void ChangeWeapon(edict_t *ent)
void ChaseNext(edict_t *ent)
void UpdateChaseCam(edict_t *ent)
void SaveClientData(void)
void M_ChangeYaw(edict_t *ent)
void PrecacheItem(gitem_t *it)
void fire_shotgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int mod)
edict_t * G_PickTarget(char *targetname)
void T_RadiusDamage(edict_t *inflictor, edict_t *attacker, float damage, edict_t *ignore, float radius, int mod)
edict_t * Drop_Item(edict_t *ent, gitem_t *item)
int sound2_entity_framenum
void monster_fire_shotgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int flashtype)
void PlayerTrail_Add(vec3_t spot)
void ai_move(edict_t *self, float dist)
void SetRespawn(edict_t *ent, float delay)
void(* die)(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void(APIENTRY *qglAccum)(GLenum op
void SpawnItem(edict_t *ent, gitem_t *item)
qboolean CanDamage(edict_t *targ, edict_t *inflictor)
void flymonster_start(edict_t *self)
vec3_t intermission_angle
float fly_sound_debounce_time