vkQuake2 doxygen  1.0 dev
g_local.h File Reference
#include "q_shared.h"
#include "game.h"
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  gitem_armor_t
 
struct  gitem_s
 
struct  game_locals_t
 
struct  level_locals_t
 
struct  spawn_temp_t
 
struct  moveinfo_t
 
struct  mframe_t
 
struct  mmove_t
 
struct  monsterinfo_t
 
struct  field_t
 
struct  client_persistant_t
 
struct  client_respawn_t
 
struct  gclient_s
 
struct  edict_s
 

Macros

#define GAME_INCLUDE
 
#define GAMEVERSION   "baseq2"
 
#define svc_muzzleflash   1
 
#define svc_muzzleflash2   2
 
#define svc_temp_entity   3
 
#define svc_layout   4
 
#define svc_inventory   5
 
#define svc_stufftext   11
 
#define DAMAGE_TIME   0.5
 
#define FALL_TIME   0.3
 
#define SPAWNFLAG_NOT_EASY   0x00000100
 
#define SPAWNFLAG_NOT_MEDIUM   0x00000200
 
#define SPAWNFLAG_NOT_HARD   0x00000400
 
#define SPAWNFLAG_NOT_DEATHMATCH   0x00000800
 
#define SPAWNFLAG_NOT_COOP   0x00001000
 
#define FL_FLY   0x00000001
 
#define FL_SWIM   0x00000002
 
#define FL_IMMUNE_LASER   0x00000004
 
#define FL_INWATER   0x00000008
 
#define FL_GODMODE   0x00000010
 
#define FL_NOTARGET   0x00000020
 
#define FL_IMMUNE_SLIME   0x00000040
 
#define FL_IMMUNE_LAVA   0x00000080
 
#define FL_PARTIALGROUND   0x00000100
 
#define FL_WATERJUMP   0x00000200
 
#define FL_TEAMSLAVE   0x00000400
 
#define FL_NO_KNOCKBACK   0x00000800
 
#define FL_POWER_ARMOR   0x00001000
 
#define FL_RESPAWN   0x80000000
 
#define FRAMETIME   0.1
 
#define TAG_GAME   765
 
#define TAG_LEVEL   766
 
#define MELEE_DISTANCE   80
 
#define BODY_QUEUE_SIZE   8
 
#define DEAD_NO   0
 
#define DEAD_DYING   1
 
#define DEAD_DEAD   2
 
#define DEAD_RESPAWNABLE   3
 
#define RANGE_MELEE   0
 
#define RANGE_NEAR   1
 
#define RANGE_MID   2
 
#define RANGE_FAR   3
 
#define GIB_ORGANIC   0
 
#define GIB_METALLIC   1
 
#define AI_STAND_GROUND   0x00000001
 
#define AI_TEMP_STAND_GROUND   0x00000002
 
#define AI_SOUND_TARGET   0x00000004
 
#define AI_LOST_SIGHT   0x00000008
 
#define AI_PURSUIT_LAST_SEEN   0x00000010
 
#define AI_PURSUE_NEXT   0x00000020
 
#define AI_PURSUE_TEMP   0x00000040
 
#define AI_HOLD_FRAME   0x00000080
 
#define AI_GOOD_GUY   0x00000100
 
#define AI_BRUTAL   0x00000200
 
#define AI_NOSTEP   0x00000400
 
#define AI_DUCKED   0x00000800
 
#define AI_COMBAT_POINT   0x00001000
 
#define AI_MEDIC   0x00002000
 
#define AI_RESURRECTING   0x00004000
 
#define AS_STRAIGHT   1
 
#define AS_SLIDING   2
 
#define AS_MELEE   3
 
#define AS_MISSILE   4
 
#define ARMOR_NONE   0
 
#define ARMOR_JACKET   1
 
#define ARMOR_COMBAT   2
 
#define ARMOR_BODY   3
 
#define ARMOR_SHARD   4
 
#define POWER_ARMOR_NONE   0
 
#define POWER_ARMOR_SCREEN   1
 
#define POWER_ARMOR_SHIELD   2
 
#define RIGHT_HANDED   0
 
#define LEFT_HANDED   1
 
#define CENTER_HANDED   2
 
#define SFL_CROSS_TRIGGER_1   0x00000001
 
#define SFL_CROSS_TRIGGER_2   0x00000002
 
#define SFL_CROSS_TRIGGER_3   0x00000004
 
#define SFL_CROSS_TRIGGER_4   0x00000008
 
#define SFL_CROSS_TRIGGER_5   0x00000010
 
#define SFL_CROSS_TRIGGER_6   0x00000020
 
#define SFL_CROSS_TRIGGER_7   0x00000040
 
#define SFL_CROSS_TRIGGER_8   0x00000080
 
#define SFL_CROSS_TRIGGER_MASK   0x000000ff
 
#define PNOISE_SELF   0
 
#define PNOISE_WEAPON   1
 
#define PNOISE_IMPACT   2
 
#define IT_WEAPON   1
 
#define IT_AMMO   2
 
#define IT_ARMOR   4
 
#define IT_STAY_COOP   8
 
#define IT_KEY   16
 
#define IT_POWERUP   32
 
#define WEAP_BLASTER   1
 
#define WEAP_SHOTGUN   2
 
#define WEAP_SUPERSHOTGUN   3
 
#define WEAP_MACHINEGUN   4
 
#define WEAP_CHAINGUN   5
 
#define WEAP_GRENADES   6
 
#define WEAP_GRENADELAUNCHER   7
 
#define WEAP_ROCKETLAUNCHER   8
 
#define WEAP_HYPERBLASTER   9
 
#define WEAP_RAILGUN   10
 
#define WEAP_BFG   11
 
#define MOD_UNKNOWN   0
 
#define MOD_BLASTER   1
 
#define MOD_SHOTGUN   2
 
#define MOD_SSHOTGUN   3
 
#define MOD_MACHINEGUN   4
 
#define MOD_CHAINGUN   5
 
#define MOD_GRENADE   6
 
#define MOD_G_SPLASH   7
 
#define MOD_ROCKET   8
 
#define MOD_R_SPLASH   9
 
#define MOD_HYPERBLASTER   10
 
#define MOD_RAILGUN   11
 
#define MOD_BFG_LASER   12
 
#define MOD_BFG_BLAST   13
 
#define MOD_BFG_EFFECT   14
 
#define MOD_HANDGRENADE   15
 
#define MOD_HG_SPLASH   16
 
#define MOD_WATER   17
 
#define MOD_SLIME   18
 
#define MOD_LAVA   19
 
#define MOD_CRUSH   20
 
#define MOD_TELEFRAG   21
 
#define MOD_FALLING   22
 
#define MOD_SUICIDE   23
 
#define MOD_HELD_GRENADE   24
 
#define MOD_EXPLOSIVE   25
 
#define MOD_BARREL   26
 
#define MOD_BOMB   27
 
#define MOD_EXIT   28
 
#define MOD_SPLASH   29
 
#define MOD_TARGET_LASER   30
 
#define MOD_TRIGGER_HURT   31
 
#define MOD_HIT   32
 
#define MOD_TARGET_BLASTER   33
 
#define MOD_FRIENDLY_FIRE   0x8000000
 
#define FOFS(x)   (intptr_t)&(((edict_t *)0)->x)
 
#define STOFS(x)   (intptr_t)&(((spawn_temp_t *)0)->x)
 
#define LLOFS(x)   (intptr_t)&(((level_locals_t *)0)->x)
 
#define CLOFS(x)   (intptr_t)&(((gclient_t *)0)->x)
 
#define random()   ((rand () & 0x7fff) / ((float)0x7fff))
 
#define crandom()   (2.0 * (random() - 0.5))
 
#define world   (&g_edicts[0])
 
#define ITEM_TRIGGER_SPAWN   0x00000001
 
#define ITEM_NO_TOUCH   0x00000002
 
#define DROPPED_ITEM   0x00010000
 
#define DROPPED_PLAYER_ITEM   0x00020000
 
#define ITEM_TARGETS_USED   0x00040000
 
#define FFL_SPAWNTEMP   1
 
#define FFL_NOSPAWN   2
 
#define ITEM_INDEX(x)   ((x)-itemlist)
 
#define DAMAGE_RADIUS   0x00000001
 
#define DAMAGE_NO_ARMOR   0x00000002
 
#define DAMAGE_ENERGY   0x00000004
 
#define DAMAGE_NO_KNOCKBACK   0x00000008
 
#define DAMAGE_BULLET   0x00000010
 
#define DAMAGE_NO_PROTECTION   0x00000020
 
#define DEFAULT_BULLET_HSPREAD   300
 
#define DEFAULT_BULLET_VSPREAD   500
 
#define DEFAULT_SHOTGUN_HSPREAD   1000
 
#define DEFAULT_SHOTGUN_VSPREAD   500
 
#define DEFAULT_DEATHMATCH_SHOTGUN_COUNT   12
 
#define DEFAULT_SHOTGUN_COUNT   12
 
#define DEFAULT_SSHOTGUN_COUNT   20
 
#define ANIM_BASIC   0
 
#define ANIM_WAVE   1
 
#define ANIM_JUMP   2
 
#define ANIM_PAIN   3
 
#define ANIM_ATTACK   4
 
#define ANIM_DEATH   5
 
#define ANIM_REVERSE   6
 

Typedefs

typedef struct gitem_s gitem_t
 

Enumerations

enum  damage_t { DAMAGE_NO, DAMAGE_YES, DAMAGE_AIM }
 
enum  weaponstate_t { WEAPON_READY, WEAPON_ACTIVATING, WEAPON_DROPPING, WEAPON_FIRING }
 
enum  ammo_t {
  AMMO_BULLETS, AMMO_SHELLS, AMMO_ROCKETS, AMMO_GRENADES,
  AMMO_CELLS, AMMO_SLUGS
}
 
enum  movetype_t {
  MOVETYPE_NONE, MOVETYPE_NOCLIP, MOVETYPE_PUSH, MOVETYPE_STOP,
  MOVETYPE_WALK, MOVETYPE_STEP, MOVETYPE_FLY, MOVETYPE_TOSS,
  MOVETYPE_FLYMISSILE, MOVETYPE_BOUNCE
}
 
enum  fieldtype_t {
  F_INT, F_FLOAT, F_LSTRING, F_GSTRING,
  F_VECTOR, F_ANGLEHACK, F_EDICT, F_ITEM,
  F_CLIENT, F_FUNCTION, F_MMOVE, F_IGNORE
}
 

Functions

void Cmd_Help_f (edict_t *ent)
 
void Cmd_Score_f (edict_t *ent)
 
void PrecacheItem (gitem_t *it)
 
void InitItems (void)
 
void SetItemNames (void)
 
gitem_tFindItem (char *pickup_name)
 
gitem_tFindItemByClassname (char *classname)
 
edict_tDrop_Item (edict_t *ent, gitem_t *item)
 
void SetRespawn (edict_t *ent, float delay)
 
void ChangeWeapon (edict_t *ent)
 
void SpawnItem (edict_t *ent, gitem_t *item)
 
void Think_Weapon (edict_t *ent)
 
int ArmorIndex (edict_t *ent)
 
int PowerArmorType (edict_t *ent)
 
gitem_tGetItemByIndex (int index)
 
qboolean Add_Ammo (edict_t *ent, gitem_t *item, int count)
 
void Touch_Item (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
 
qboolean KillBox (edict_t *ent)
 
void G_ProjectSource (vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
 
edict_tG_Find (edict_t *from, int fieldofs, char *match)
 
edict_tfindradius (edict_t *from, vec3_t org, float rad)
 
edict_tG_PickTarget (char *targetname)
 
void G_UseTargets (edict_t *ent, edict_t *activator)
 
void G_SetMovedir (vec3_t angles, vec3_t movedir)
 
void G_InitEdict (edict_t *e)
 
edict_tG_Spawn (void)
 
void G_FreeEdict (edict_t *e)
 
void G_TouchTriggers (edict_t *ent)
 
void G_TouchSolids (edict_t *ent)
 
char * G_CopyString (char *in)
 
float * tv (float x, float y, float z)
 
char * vtos (vec3_t v)
 
float vectoyaw (vec3_t vec)
 
void vectoangles (vec3_t vec, vec3_t angles)
 
qboolean OnSameTeam (edict_t *ent1, edict_t *ent2)
 
qboolean CanDamage (edict_t *targ, edict_t *inflictor)
 
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)
 
void T_RadiusDamage (edict_t *inflictor, edict_t *attacker, float damage, edict_t *ignore, float radius, int mod)
 
void monster_fire_bullet (edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
 
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 monster_fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
 
void monster_fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int flashtype)
 
void monster_fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
 
void monster_fire_railgun (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int flashtype)
 
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 M_droptofloor (edict_t *ent)
 
void monster_think (edict_t *self)
 
void walkmonster_start (edict_t *self)
 
void swimmonster_start (edict_t *self)
 
void flymonster_start (edict_t *self)
 
void AttackFinished (edict_t *self, float time)
 
void monster_death_use (edict_t *self)
 
void M_CatagorizePosition (edict_t *ent)
 
qboolean M_CheckAttack (edict_t *self)
 
void M_FlyCheck (edict_t *self)
 
void M_CheckGround (edict_t *ent)
 
void ThrowHead (edict_t *self, char *gibname, int damage, int type)
 
void ThrowClientHead (edict_t *self, int damage)
 
void ThrowGib (edict_t *self, char *gibname, int damage, int type)
 
void BecomeExplosion1 (edict_t *self)
 
void AI_SetSightClient (void)
 
void ai_stand (edict_t *self, float dist)
 
void ai_move (edict_t *self, float dist)
 
void ai_walk (edict_t *self, float dist)
 
void ai_turn (edict_t *self, float dist)
 
void ai_run (edict_t *self, float dist)
 
void ai_charge (edict_t *self, float dist)
 
int range (edict_t *self, edict_t *other)
 
void FoundTarget (edict_t *self)
 
qboolean infront (edict_t *self, edict_t *other)
 
qboolean visible (edict_t *self, edict_t *other)
 
qboolean FacingIdeal (edict_t *self)
 
void ThrowDebris (edict_t *self, char *modelname, float speed, vec3_t origin)
 
qboolean fire_hit (edict_t *self, vec3_t aim, int damage, int kick)
 
void fire_bullet (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int mod)
 
void fire_shotgun (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int mod)
 
void fire_blaster (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect, qboolean hyper)
 
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)
 
void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
 
void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick)
 
void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
 
void PlayerTrail_Init (void)
 
void PlayerTrail_Add (vec3_t spot)
 
void PlayerTrail_New (vec3_t spot)
 
edict_tPlayerTrail_PickFirst (edict_t *self)
 
edict_tPlayerTrail_PickNext (edict_t *self)
 
edict_tPlayerTrail_LastSpot (void)
 
void respawn (edict_t *ent)
 
void BeginIntermission (edict_t *targ)
 
void PutClientInServer (edict_t *ent)
 
void InitClientPersistant (gclient_t *client)
 
void InitClientResp (gclient_t *client)
 
void InitBodyQue (void)
 
void ClientBeginServerFrame (edict_t *ent)
 
void player_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void ServerCommand (void)
 
qboolean SV_FilterPacket (char *from)
 
void ClientEndServerFrame (edict_t *ent)
 
void MoveClientToIntermission (edict_t *client)
 
void G_SetStats (edict_t *ent)
 
void G_SetSpectatorStats (edict_t *ent)
 
void G_CheckChaseStats (edict_t *ent)
 
void ValidateSelectedItem (edict_t *ent)
 
void DeathmatchScoreboardMessage (edict_t *client, edict_t *killer)
 
void PlayerNoise (edict_t *who, vec3_t where, int type)
 
qboolean M_CheckBottom (edict_t *ent)
 
qboolean M_walkmove (edict_t *ent, float yaw, float dist)
 
void M_MoveToGoal (edict_t *ent, float dist)
 
void M_ChangeYaw (edict_t *ent)
 
void G_RunEntity (edict_t *ent)
 
void SaveClientData (void)
 
void FetchClientEntData (edict_t *ent)
 
void UpdateChaseCam (edict_t *ent)
 
void ChaseNext (edict_t *ent)
 
void ChasePrev (edict_t *ent)
 
void GetChaseTarget (edict_t *ent)
 

Variables

game_locals_t game
 
level_locals_t level
 
game_import_t gi
 
game_export_t globals
 
spawn_temp_t st
 
int sm_meat_index
 
int snd_fry
 
int jacket_armor_index
 
int combat_armor_index
 
int body_armor_index
 
int meansOfDeath
 
edict_tg_edicts
 
cvar_tmaxentities
 
cvar_tdeathmatch
 
cvar_tcoop
 
cvar_tdmflags
 
cvar_tskill
 
cvar_tfraglimit
 
cvar_ttimelimit
 
cvar_tpassword
 
cvar_tspectator_password
 
cvar_tneedpass
 
cvar_tg_select_empty
 
cvar_tdedicated
 
cvar_tfilterban
 
cvar_tsv_gravity
 
cvar_tsv_maxvelocity
 
cvar_tgun_x
 
cvar_tgun_y
 
cvar_tgun_z
 
cvar_tsv_rollspeed
 
cvar_tsv_rollangle
 
cvar_trun_pitch
 
cvar_trun_roll
 
cvar_tbob_up
 
cvar_tbob_pitch
 
cvar_tbob_roll
 
cvar_tsv_cheats
 
cvar_tmaxclients
 
cvar_tmaxspectators
 
cvar_tflood_msgs
 
cvar_tflood_persecond
 
cvar_tflood_waitdelay
 
cvar_tsv_maplist
 
field_t fields []
 
gitem_t itemlist []
 

Macro Definition Documentation

◆ AI_BRUTAL

#define AI_BRUTAL   0x00000200

Definition at line 138 of file g_local.h.

◆ AI_COMBAT_POINT

#define AI_COMBAT_POINT   0x00001000

Definition at line 141 of file g_local.h.

◆ AI_DUCKED

#define AI_DUCKED   0x00000800

Definition at line 140 of file g_local.h.

◆ AI_GOOD_GUY

#define AI_GOOD_GUY   0x00000100

Definition at line 137 of file g_local.h.

◆ AI_HOLD_FRAME

#define AI_HOLD_FRAME   0x00000080

Definition at line 136 of file g_local.h.

◆ AI_LOST_SIGHT

#define AI_LOST_SIGHT   0x00000008

Definition at line 132 of file g_local.h.

◆ AI_MEDIC

#define AI_MEDIC   0x00002000

Definition at line 142 of file g_local.h.

◆ AI_NOSTEP

#define AI_NOSTEP   0x00000400

Definition at line 139 of file g_local.h.

◆ AI_PURSUE_NEXT

#define AI_PURSUE_NEXT   0x00000020

Definition at line 134 of file g_local.h.

◆ AI_PURSUE_TEMP

#define AI_PURSUE_TEMP   0x00000040

Definition at line 135 of file g_local.h.

◆ AI_PURSUIT_LAST_SEEN

#define AI_PURSUIT_LAST_SEEN   0x00000010

Definition at line 133 of file g_local.h.

◆ AI_RESURRECTING

#define AI_RESURRECTING   0x00004000

Definition at line 143 of file g_local.h.

◆ AI_SOUND_TARGET

#define AI_SOUND_TARGET   0x00000004

Definition at line 131 of file g_local.h.

◆ AI_STAND_GROUND

#define AI_STAND_GROUND   0x00000001

Definition at line 129 of file g_local.h.

◆ AI_TEMP_STAND_GROUND

#define AI_TEMP_STAND_GROUND   0x00000002

Definition at line 130 of file g_local.h.

◆ ANIM_ATTACK

#define ANIM_ATTACK   4

Definition at line 827 of file g_local.h.

◆ ANIM_BASIC

#define ANIM_BASIC   0

Definition at line 823 of file g_local.h.

◆ ANIM_DEATH

#define ANIM_DEATH   5

Definition at line 828 of file g_local.h.

◆ ANIM_JUMP

#define ANIM_JUMP   2

Definition at line 825 of file g_local.h.

◆ ANIM_PAIN

#define ANIM_PAIN   3

Definition at line 826 of file g_local.h.

◆ ANIM_REVERSE

#define ANIM_REVERSE   6

Definition at line 829 of file g_local.h.

◆ ANIM_WAVE

#define ANIM_WAVE   1

Definition at line 824 of file g_local.h.

◆ ARMOR_BODY

#define ARMOR_BODY   3

Definition at line 155 of file g_local.h.

◆ ARMOR_COMBAT

#define ARMOR_COMBAT   2

Definition at line 154 of file g_local.h.

◆ ARMOR_JACKET

#define ARMOR_JACKET   1

Definition at line 153 of file g_local.h.

◆ ARMOR_NONE

#define ARMOR_NONE   0

Definition at line 152 of file g_local.h.

◆ ARMOR_SHARD

#define ARMOR_SHARD   4

Definition at line 156 of file g_local.h.

◆ AS_MELEE

#define AS_MELEE   3

Definition at line 148 of file g_local.h.

◆ AS_MISSILE

#define AS_MISSILE   4

Definition at line 149 of file g_local.h.

◆ AS_SLIDING

#define AS_SLIDING   2

Definition at line 147 of file g_local.h.

◆ AS_STRAIGHT

#define AS_STRAIGHT   1

Definition at line 146 of file g_local.h.

◆ BODY_QUEUE_SIZE

#define BODY_QUEUE_SIZE   8

Definition at line 84 of file g_local.h.

◆ CENTER_HANDED

#define CENTER_HANDED   2

Definition at line 166 of file g_local.h.

◆ CLOFS

#define CLOFS (   x)    (intptr_t)&(((gclient_t *)0)->x)

Definition at line 513 of file g_local.h.

◆ crandom

#define crandom ( )    (2.0 * (random() - 0.5))

Definition at line 516 of file g_local.h.

◆ DAMAGE_BULLET

#define DAMAGE_BULLET   0x00000010

Definition at line 667 of file g_local.h.

◆ DAMAGE_ENERGY

#define DAMAGE_ENERGY   0x00000004

Definition at line 665 of file g_local.h.

◆ DAMAGE_NO_ARMOR

#define DAMAGE_NO_ARMOR   0x00000002

Definition at line 664 of file g_local.h.

◆ DAMAGE_NO_KNOCKBACK

#define DAMAGE_NO_KNOCKBACK   0x00000008

Definition at line 666 of file g_local.h.

◆ DAMAGE_NO_PROTECTION

#define DAMAGE_NO_PROTECTION   0x00000020

Definition at line 668 of file g_local.h.

◆ DAMAGE_RADIUS

#define DAMAGE_RADIUS   0x00000001

Definition at line 663 of file g_local.h.

◆ DAMAGE_TIME

#define DAMAGE_TIME   0.5

Definition at line 46 of file g_local.h.

◆ DEAD_DEAD

#define DEAD_DEAD   2

Definition at line 115 of file g_local.h.

◆ DEAD_DYING

#define DEAD_DYING   1

Definition at line 114 of file g_local.h.

◆ DEAD_NO

#define DEAD_NO   0

Definition at line 113 of file g_local.h.

◆ DEAD_RESPAWNABLE

#define DEAD_RESPAWNABLE   3

Definition at line 116 of file g_local.h.

◆ DEFAULT_BULLET_HSPREAD

#define DEFAULT_BULLET_HSPREAD   300

Definition at line 670 of file g_local.h.

◆ DEFAULT_BULLET_VSPREAD

#define DEFAULT_BULLET_VSPREAD   500

Definition at line 671 of file g_local.h.

◆ DEFAULT_DEATHMATCH_SHOTGUN_COUNT

#define DEFAULT_DEATHMATCH_SHOTGUN_COUNT   12

Definition at line 674 of file g_local.h.

◆ DEFAULT_SHOTGUN_COUNT

#define DEFAULT_SHOTGUN_COUNT   12

Definition at line 675 of file g_local.h.

◆ DEFAULT_SHOTGUN_HSPREAD

#define DEFAULT_SHOTGUN_HSPREAD   1000

Definition at line 672 of file g_local.h.

◆ DEFAULT_SHOTGUN_VSPREAD

#define DEFAULT_SHOTGUN_VSPREAD   500

Definition at line 673 of file g_local.h.

◆ DEFAULT_SSHOTGUN_COUNT

#define DEFAULT_SSHOTGUN_COUNT   20

Definition at line 676 of file g_local.h.

◆ DROPPED_ITEM

#define DROPPED_ITEM   0x00010000

Definition at line 563 of file g_local.h.

◆ DROPPED_PLAYER_ITEM

#define DROPPED_PLAYER_ITEM   0x00020000

Definition at line 564 of file g_local.h.

◆ FALL_TIME

#define FALL_TIME   0.3

Definition at line 47 of file g_local.h.

◆ FFL_NOSPAWN

#define FFL_NOSPAWN   2

Definition at line 572 of file g_local.h.

◆ FFL_SPAWNTEMP

#define FFL_SPAWNTEMP   1

Definition at line 571 of file g_local.h.

◆ FL_FLY

#define FL_FLY   0x00000001

Definition at line 59 of file g_local.h.

◆ FL_GODMODE

#define FL_GODMODE   0x00000010

Definition at line 63 of file g_local.h.

◆ FL_IMMUNE_LASER

#define FL_IMMUNE_LASER   0x00000004

Definition at line 61 of file g_local.h.

◆ FL_IMMUNE_LAVA

#define FL_IMMUNE_LAVA   0x00000080

Definition at line 66 of file g_local.h.

◆ FL_IMMUNE_SLIME

#define FL_IMMUNE_SLIME   0x00000040

Definition at line 65 of file g_local.h.

◆ FL_INWATER

#define FL_INWATER   0x00000008

Definition at line 62 of file g_local.h.

◆ FL_NO_KNOCKBACK

#define FL_NO_KNOCKBACK   0x00000800

Definition at line 70 of file g_local.h.

◆ FL_NOTARGET

#define FL_NOTARGET   0x00000020

Definition at line 64 of file g_local.h.

◆ FL_PARTIALGROUND

#define FL_PARTIALGROUND   0x00000100

Definition at line 67 of file g_local.h.

◆ FL_POWER_ARMOR

#define FL_POWER_ARMOR   0x00001000

Definition at line 71 of file g_local.h.

◆ FL_RESPAWN

#define FL_RESPAWN   0x80000000

Definition at line 72 of file g_local.h.

◆ FL_SWIM

#define FL_SWIM   0x00000002

Definition at line 60 of file g_local.h.

◆ FL_TEAMSLAVE

#define FL_TEAMSLAVE   0x00000400

Definition at line 69 of file g_local.h.

◆ FL_WATERJUMP

#define FL_WATERJUMP   0x00000200

Definition at line 68 of file g_local.h.

◆ FOFS

#define FOFS (   x)    (intptr_t)&(((edict_t *)0)->x)

Definition at line 510 of file g_local.h.

◆ FRAMETIME

#define FRAMETIME   0.1

Definition at line 75 of file g_local.h.

◆ GAME_INCLUDE

#define GAME_INCLUDE

Definition at line 27 of file g_local.h.

◆ GAMEVERSION

#define GAMEVERSION   "baseq2"

Definition at line 33 of file g_local.h.

◆ GIB_METALLIC

#define GIB_METALLIC   1

Definition at line 126 of file g_local.h.

◆ GIB_ORGANIC

#define GIB_ORGANIC   0

Definition at line 125 of file g_local.h.

◆ IT_AMMO

#define IT_AMMO   2

Definition at line 217 of file g_local.h.

◆ IT_ARMOR

#define IT_ARMOR   4

Definition at line 218 of file g_local.h.

◆ IT_KEY

#define IT_KEY   16

Definition at line 220 of file g_local.h.

◆ IT_POWERUP

#define IT_POWERUP   32

Definition at line 221 of file g_local.h.

◆ IT_STAY_COOP

#define IT_STAY_COOP   8

Definition at line 219 of file g_local.h.

◆ IT_WEAPON

#define IT_WEAPON   1

Definition at line 216 of file g_local.h.

◆ ITEM_INDEX

#define ITEM_INDEX (   x)    ((x)-itemlist)

Definition at line 616 of file g_local.h.

◆ ITEM_NO_TOUCH

#define ITEM_NO_TOUCH   0x00000002

Definition at line 560 of file g_local.h.

◆ ITEM_TARGETS_USED

#define ITEM_TARGETS_USED   0x00040000

Definition at line 565 of file g_local.h.

◆ ITEM_TRIGGER_SPAWN

#define ITEM_TRIGGER_SPAWN   0x00000001

Definition at line 559 of file g_local.h.

◆ LEFT_HANDED

#define LEFT_HANDED   1

Definition at line 165 of file g_local.h.

◆ LLOFS

#define LLOFS (   x)    (intptr_t)&(((level_locals_t *)0)->x)

Definition at line 512 of file g_local.h.

◆ MELEE_DISTANCE

#define MELEE_DISTANCE   80

Definition at line 82 of file g_local.h.

◆ MOD_BARREL

#define MOD_BARREL   26

Definition at line 495 of file g_local.h.

◆ MOD_BFG_BLAST

#define MOD_BFG_BLAST   13

Definition at line 482 of file g_local.h.

◆ MOD_BFG_EFFECT

#define MOD_BFG_EFFECT   14

Definition at line 483 of file g_local.h.

◆ MOD_BFG_LASER

#define MOD_BFG_LASER   12

Definition at line 481 of file g_local.h.

◆ MOD_BLASTER

#define MOD_BLASTER   1

Definition at line 470 of file g_local.h.

◆ MOD_BOMB

#define MOD_BOMB   27

Definition at line 496 of file g_local.h.

◆ MOD_CHAINGUN

#define MOD_CHAINGUN   5

Definition at line 474 of file g_local.h.

◆ MOD_CRUSH

#define MOD_CRUSH   20

Definition at line 489 of file g_local.h.

◆ MOD_EXIT

#define MOD_EXIT   28

Definition at line 497 of file g_local.h.

◆ MOD_EXPLOSIVE

#define MOD_EXPLOSIVE   25

Definition at line 494 of file g_local.h.

◆ MOD_FALLING

#define MOD_FALLING   22

Definition at line 491 of file g_local.h.

◆ MOD_FRIENDLY_FIRE

#define MOD_FRIENDLY_FIRE   0x8000000

Definition at line 503 of file g_local.h.

◆ MOD_G_SPLASH

#define MOD_G_SPLASH   7

Definition at line 476 of file g_local.h.

◆ MOD_GRENADE

#define MOD_GRENADE   6

Definition at line 475 of file g_local.h.

◆ MOD_HANDGRENADE

#define MOD_HANDGRENADE   15

Definition at line 484 of file g_local.h.

◆ MOD_HELD_GRENADE

#define MOD_HELD_GRENADE   24

Definition at line 493 of file g_local.h.

◆ MOD_HG_SPLASH

#define MOD_HG_SPLASH   16

Definition at line 485 of file g_local.h.

◆ MOD_HIT

#define MOD_HIT   32

Definition at line 501 of file g_local.h.

◆ MOD_HYPERBLASTER

#define MOD_HYPERBLASTER   10

Definition at line 479 of file g_local.h.

◆ MOD_LAVA

#define MOD_LAVA   19

Definition at line 488 of file g_local.h.

◆ MOD_MACHINEGUN

#define MOD_MACHINEGUN   4

Definition at line 473 of file g_local.h.

◆ MOD_R_SPLASH

#define MOD_R_SPLASH   9

Definition at line 478 of file g_local.h.

◆ MOD_RAILGUN

#define MOD_RAILGUN   11

Definition at line 480 of file g_local.h.

◆ MOD_ROCKET

#define MOD_ROCKET   8

Definition at line 477 of file g_local.h.

◆ MOD_SHOTGUN

#define MOD_SHOTGUN   2

Definition at line 471 of file g_local.h.

◆ MOD_SLIME

#define MOD_SLIME   18

Definition at line 487 of file g_local.h.

◆ MOD_SPLASH

#define MOD_SPLASH   29

Definition at line 498 of file g_local.h.

◆ MOD_SSHOTGUN

#define MOD_SSHOTGUN   3

Definition at line 472 of file g_local.h.

◆ MOD_SUICIDE

#define MOD_SUICIDE   23

Definition at line 492 of file g_local.h.

◆ MOD_TARGET_BLASTER

#define MOD_TARGET_BLASTER   33

Definition at line 502 of file g_local.h.

◆ MOD_TARGET_LASER

#define MOD_TARGET_LASER   30

Definition at line 499 of file g_local.h.

◆ MOD_TELEFRAG

#define MOD_TELEFRAG   21

Definition at line 490 of file g_local.h.

◆ MOD_TRIGGER_HURT

#define MOD_TRIGGER_HURT   31

Definition at line 500 of file g_local.h.

◆ MOD_UNKNOWN

#define MOD_UNKNOWN   0

Definition at line 469 of file g_local.h.

◆ MOD_WATER

#define MOD_WATER   17

Definition at line 486 of file g_local.h.

◆ PNOISE_IMPACT

#define PNOISE_IMPACT   2

Definition at line 184 of file g_local.h.

◆ PNOISE_SELF

#define PNOISE_SELF   0

Definition at line 182 of file g_local.h.

◆ PNOISE_WEAPON

#define PNOISE_WEAPON   1

Definition at line 183 of file g_local.h.

◆ POWER_ARMOR_NONE

#define POWER_ARMOR_NONE   0

Definition at line 159 of file g_local.h.

◆ POWER_ARMOR_SCREEN

#define POWER_ARMOR_SCREEN   1

Definition at line 160 of file g_local.h.

◆ POWER_ARMOR_SHIELD

#define POWER_ARMOR_SHIELD   2

Definition at line 161 of file g_local.h.

◆ random

#define random ( )    ((rand () & 0x7fff) / ((float)0x7fff))

Definition at line 515 of file g_local.h.

◆ RANGE_FAR

#define RANGE_FAR   3

Definition at line 122 of file g_local.h.

◆ RANGE_MELEE

#define RANGE_MELEE   0

Definition at line 119 of file g_local.h.

◆ RANGE_MID

#define RANGE_MID   2

Definition at line 121 of file g_local.h.

◆ RANGE_NEAR

#define RANGE_NEAR   1

Definition at line 120 of file g_local.h.

◆ RIGHT_HANDED

#define RIGHT_HANDED   0

Definition at line 164 of file g_local.h.

◆ SFL_CROSS_TRIGGER_1

#define SFL_CROSS_TRIGGER_1   0x00000001

Definition at line 170 of file g_local.h.

◆ SFL_CROSS_TRIGGER_2

#define SFL_CROSS_TRIGGER_2   0x00000002

Definition at line 171 of file g_local.h.

◆ SFL_CROSS_TRIGGER_3

#define SFL_CROSS_TRIGGER_3   0x00000004

Definition at line 172 of file g_local.h.

◆ SFL_CROSS_TRIGGER_4

#define SFL_CROSS_TRIGGER_4   0x00000008

Definition at line 173 of file g_local.h.

◆ SFL_CROSS_TRIGGER_5

#define SFL_CROSS_TRIGGER_5   0x00000010

Definition at line 174 of file g_local.h.

◆ SFL_CROSS_TRIGGER_6

#define SFL_CROSS_TRIGGER_6   0x00000020

Definition at line 175 of file g_local.h.

◆ SFL_CROSS_TRIGGER_7

#define SFL_CROSS_TRIGGER_7   0x00000040

Definition at line 176 of file g_local.h.

◆ SFL_CROSS_TRIGGER_8

#define SFL_CROSS_TRIGGER_8   0x00000080

Definition at line 177 of file g_local.h.

◆ SFL_CROSS_TRIGGER_MASK

#define SFL_CROSS_TRIGGER_MASK   0x000000ff

Definition at line 178 of file g_local.h.

◆ SPAWNFLAG_NOT_COOP

#define SPAWNFLAG_NOT_COOP   0x00001000

Definition at line 56 of file g_local.h.

◆ SPAWNFLAG_NOT_DEATHMATCH

#define SPAWNFLAG_NOT_DEATHMATCH   0x00000800

Definition at line 55 of file g_local.h.

◆ SPAWNFLAG_NOT_EASY

#define SPAWNFLAG_NOT_EASY   0x00000100

Definition at line 52 of file g_local.h.

◆ SPAWNFLAG_NOT_HARD

#define SPAWNFLAG_NOT_HARD   0x00000400

Definition at line 54 of file g_local.h.

◆ SPAWNFLAG_NOT_MEDIUM

#define SPAWNFLAG_NOT_MEDIUM   0x00000200

Definition at line 53 of file g_local.h.

◆ STOFS

#define STOFS (   x)    (intptr_t)&(((spawn_temp_t *)0)->x)

Definition at line 511 of file g_local.h.

◆ svc_inventory

#define svc_inventory   5

Definition at line 40 of file g_local.h.

◆ svc_layout

#define svc_layout   4

Definition at line 39 of file g_local.h.

◆ svc_muzzleflash

#define svc_muzzleflash   1

Definition at line 36 of file g_local.h.

◆ svc_muzzleflash2

#define svc_muzzleflash2   2

Definition at line 37 of file g_local.h.

◆ svc_stufftext

#define svc_stufftext   11

Definition at line 41 of file g_local.h.

◆ svc_temp_entity

#define svc_temp_entity   3

Definition at line 38 of file g_local.h.

◆ TAG_GAME

#define TAG_GAME   765

Definition at line 78 of file g_local.h.

◆ TAG_LEVEL

#define TAG_LEVEL   766

Definition at line 79 of file g_local.h.

◆ WEAP_BFG

#define WEAP_BFG   11

Definition at line 234 of file g_local.h.

◆ WEAP_BLASTER

#define WEAP_BLASTER   1

Definition at line 224 of file g_local.h.

◆ WEAP_CHAINGUN

#define WEAP_CHAINGUN   5

Definition at line 228 of file g_local.h.

◆ WEAP_GRENADELAUNCHER

#define WEAP_GRENADELAUNCHER   7

Definition at line 230 of file g_local.h.

◆ WEAP_GRENADES

#define WEAP_GRENADES   6

Definition at line 229 of file g_local.h.

◆ WEAP_HYPERBLASTER

#define WEAP_HYPERBLASTER   9

Definition at line 232 of file g_local.h.

◆ WEAP_MACHINEGUN

#define WEAP_MACHINEGUN   4

Definition at line 227 of file g_local.h.

◆ WEAP_RAILGUN

#define WEAP_RAILGUN   10

Definition at line 233 of file g_local.h.

◆ WEAP_ROCKETLAUNCHER

#define WEAP_ROCKETLAUNCHER   8

Definition at line 231 of file g_local.h.

◆ WEAP_SHOTGUN

#define WEAP_SHOTGUN   2

Definition at line 225 of file g_local.h.

◆ WEAP_SUPERSHOTGUN

#define WEAP_SUPERSHOTGUN   3

Definition at line 226 of file g_local.h.

◆ world

#define world   (&g_edicts[0])

Definition at line 556 of file g_local.h.

Typedef Documentation

◆ gitem_t

typedef struct gitem_s gitem_t

Enumeration Type Documentation

◆ ammo_t

enum ammo_t
Enumerator
AMMO_BULLETS 
AMMO_SHELLS 
AMMO_ROCKETS 
AMMO_GRENADES 
AMMO_CELLS 
AMMO_SLUGS 

Definition at line 101 of file g_local.h.

102 {
103  AMMO_BULLETS,
104  AMMO_SHELLS,
105  AMMO_ROCKETS,
107  AMMO_CELLS,
108  AMMO_SLUGS
109 } ammo_t;

◆ damage_t

enum damage_t
Enumerator
DAMAGE_NO 
DAMAGE_YES 
DAMAGE_AIM 

Definition at line 86 of file g_local.h.

87 {
88  DAMAGE_NO,
89  DAMAGE_YES, // will take damage if hit
90  DAMAGE_AIM // auto targeting recognizes this
91 } damage_t;

◆ fieldtype_t

Enumerator
F_INT 
F_FLOAT 
F_LSTRING 
F_GSTRING 
F_VECTOR 
F_ANGLEHACK 
F_EDICT 
F_ITEM 
F_CLIENT 
F_FUNCTION 
F_MMOVE 
F_IGNORE 

Definition at line 574 of file g_local.h.

574  {
575  F_INT,
576  F_FLOAT,
577  F_LSTRING, // string on disk, pointer in memory, TAG_LEVEL
578  F_GSTRING, // string on disk, pointer in memory, TAG_GAME
579  F_VECTOR,
580  F_ANGLEHACK,
581  F_EDICT, // index on disk, pointer in memory
582  F_ITEM, // index on disk, pointer in memory
583  F_CLIENT, // index on disk, pointer in memory
584  F_FUNCTION,
585  F_MMOVE,
586  F_IGNORE
587 } fieldtype_t;

◆ movetype_t

enum movetype_t
Enumerator
MOVETYPE_NONE 
MOVETYPE_NOCLIP 
MOVETYPE_PUSH 
MOVETYPE_STOP 
MOVETYPE_WALK 
MOVETYPE_STEP 
MOVETYPE_FLY 
MOVETYPE_TOSS 
MOVETYPE_FLYMISSILE 
MOVETYPE_BOUNCE 

Definition at line 188 of file g_local.h.

189 {
190 MOVETYPE_NONE, // never moves
191 MOVETYPE_NOCLIP, // origin and angles change with no interaction
192 MOVETYPE_PUSH, // no clip to world, push on box contact
193 MOVETYPE_STOP, // no clip to world, stops on box contact
194 
195 MOVETYPE_WALK, // gravity
196 MOVETYPE_STEP, // gravity, special edge handling
198 MOVETYPE_TOSS, // gravity
199 MOVETYPE_FLYMISSILE, // extra size to monsters
201 } movetype_t;

◆ weaponstate_t

Enumerator
WEAPON_READY 
WEAPON_ACTIVATING 
WEAPON_DROPPING 
WEAPON_FIRING 

Definition at line 93 of file g_local.h.

Function Documentation

◆ Add_Ammo()

qboolean Add_Ammo ( edict_t ent,
gitem_t item,
int  count 
)

Definition at line 447 of file g_items.c.

448 {
449  int index;
450  int max;
451 
452  if (!ent->client)
453  return false;
454 
455  if (item->tag == AMMO_BULLETS)
456  max = ent->client->pers.max_bullets;
457  else if (item->tag == AMMO_SHELLS)
458  max = ent->client->pers.max_shells;
459  else if (item->tag == AMMO_ROCKETS)
460  max = ent->client->pers.max_rockets;
461  else if (item->tag == AMMO_GRENADES)
462  max = ent->client->pers.max_grenades;
463  else if (item->tag == AMMO_CELLS)
464  max = ent->client->pers.max_cells;
465  else if (item->tag == AMMO_SLUGS)
466  max = ent->client->pers.max_slugs;
467  else
468  return false;
469 
470  index = ITEM_INDEX(item);
471 
472  if (ent->client->pers.inventory[index] == max)
473  return false;
474 
475  ent->client->pers.inventory[index] += count;
476 
477  if (ent->client->pers.inventory[index] > max)
478  ent->client->pers.inventory[index] = max;
479 
480  return true;
481 }

Referenced by Cmd_Give_f(), Pickup_Ammo(), and Pickup_Weapon().

◆ ai_charge()

void ai_charge ( edict_t self,
float  dist 
)

Definition at line 194 of file g_ai.c.

195 {
196  vec3_t v;
197 
198  VectorSubtract (self->enemy->s.origin, self->s.origin, v);
199  self->ideal_yaw = vectoyaw(v);
200  M_ChangeYaw (self);
201 
202  if (dist)
203  M_walkmove (self, self->s.angles[YAW], dist);
204 }

◆ ai_move()

void ai_move ( edict_t self,
float  dist 
)

Definition at line 92 of file g_ai.c.

93 {
94  M_walkmove (self, self->s.angles[YAW], dist);
95 }

◆ ai_run()

void ai_run ( edict_t self,
float  dist 
)

Definition at line 914 of file g_ai.c.

915 {
916  vec3_t v;
917  edict_t *tempgoal;
918  edict_t *save;
919  qboolean new;
920  edict_t *marker;
921  float d1, d2;
922  trace_t tr;
923  vec3_t v_forward, v_right;
924  float left, center, right;
925  vec3_t left_target, right_target;
926 
927  // if we're going to a combat point, just proceed
928  if (self->monsterinfo.aiflags & AI_COMBAT_POINT)
929  {
930  M_MoveToGoal (self, dist);
931  return;
932  }
933 
934  if (self->monsterinfo.aiflags & AI_SOUND_TARGET)
935  {
936  VectorSubtract (self->s.origin, self->enemy->s.origin, v);
937  if (VectorLength(v) < 64)
938  {
939  self->monsterinfo.aiflags |= (AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
940  self->monsterinfo.stand (self);
941  return;
942  }
943 
944  M_MoveToGoal (self, dist);
945 
946  if (!FindTarget (self))
947  return;
948  }
949 
950  if (ai_checkattack (self, dist))
951  return;
952 
953  if (self->monsterinfo.attack_state == AS_SLIDING)
954  {
955  ai_run_slide (self, dist);
956  return;
957  }
958 
959  if (enemy_vis)
960  {
961 // if (self.aiflags & AI_LOST_SIGHT)
962 // dprint("regained sight\n");
963  M_MoveToGoal (self, dist);
964  self->monsterinfo.aiflags &= ~AI_LOST_SIGHT;
966  self->monsterinfo.trail_time = level.time;
967  return;
968  }
969 
970  // coop will change to another enemy if visible
971  if (coop->value)
972  { // FIXME: insane guys get mad with this, which causes crashes!
973  if (FindTarget (self))
974  return;
975  }
976 
977  if ((self->monsterinfo.search_time) && (level.time > (self->monsterinfo.search_time + 20)))
978  {
979  M_MoveToGoal (self, dist);
980  self->monsterinfo.search_time = 0;
981 // dprint("search timeout\n");
982  return;
983  }
984 
985  save = self->goalentity;
986  tempgoal = G_Spawn();
987  self->goalentity = tempgoal;
988 
989  new = false;
990 
991  if (!(self->monsterinfo.aiflags & AI_LOST_SIGHT))
992  {
993  // just lost sight of the player, decide where to go first
994 // dprint("lost sight of player, last seen at "); dprint(vtos(self.last_sighting)); dprint("\n");
996  self->monsterinfo.aiflags &= ~(AI_PURSUE_NEXT | AI_PURSUE_TEMP);
997  new = true;
998  }
999 
1000  if (self->monsterinfo.aiflags & AI_PURSUE_NEXT)
1001  {
1002  self->monsterinfo.aiflags &= ~AI_PURSUE_NEXT;
1003 // dprint("reached current goal: "); dprint(vtos(self.origin)); dprint(" "); dprint(vtos(self.last_sighting)); dprint(" "); dprint(ftos(vlen(self.origin - self.last_sighting))); dprint("\n");
1004 
1005  // give ourself more time since we got this far
1006  self->monsterinfo.search_time = level.time + 5;
1007 
1008  if (self->monsterinfo.aiflags & AI_PURSUE_TEMP)
1009  {
1010 // dprint("was temp goal; retrying original\n");
1011  self->monsterinfo.aiflags &= ~AI_PURSUE_TEMP;
1012  marker = NULL;
1014  new = true;
1015  }
1016  else if (self->monsterinfo.aiflags & AI_PURSUIT_LAST_SEEN)
1017  {
1018  self->monsterinfo.aiflags &= ~AI_PURSUIT_LAST_SEEN;
1019  marker = PlayerTrail_PickFirst (self);
1020  }
1021  else
1022  {
1023  marker = PlayerTrail_PickNext (self);
1024  }
1025 
1026  if (marker)
1027  {
1028  VectorCopy (marker->s.origin, self->monsterinfo.last_sighting);
1029  self->monsterinfo.trail_time = marker->timestamp;
1030  self->s.angles[YAW] = self->ideal_yaw = marker->s.angles[YAW];
1031 // dprint("heading is "); dprint(ftos(self.ideal_yaw)); dprint("\n");
1032 
1033 // debug_drawline(self.origin, self.last_sighting, 52);
1034  new = true;
1035  }
1036  }
1037 
1039  d1 = VectorLength(v);
1040  if (d1 <= dist)
1041  {
1042  self->monsterinfo.aiflags |= AI_PURSUE_NEXT;
1043  dist = d1;
1044  }
1045 
1047 
1048  if (new)
1049  {
1050 // gi.dprintf("checking for course correction\n");
1051 
1052  tr = gi.trace(self->s.origin, self->mins, self->maxs, self->monsterinfo.last_sighting, self, MASK_PLAYERSOLID);
1053  if (tr.fraction < 1)
1054  {
1055  VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
1056  d1 = VectorLength(v);
1057  center = tr.fraction;
1058  d2 = d1 * ((center+1)/2);
1059  self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
1060  AngleVectors(self->s.angles, v_forward, v_right, NULL);
1061 
1062  VectorSet(v, d2, -16, 0);
1063  G_ProjectSource (self->s.origin, v, v_forward, v_right, left_target);
1064  tr = gi.trace(self->s.origin, self->mins, self->maxs, left_target, self, MASK_PLAYERSOLID);
1065  left = tr.fraction;
1066 
1067  VectorSet(v, d2, 16, 0);
1068  G_ProjectSource (self->s.origin, v, v_forward, v_right, right_target);
1069  tr = gi.trace(self->s.origin, self->mins, self->maxs, right_target, self, MASK_PLAYERSOLID);
1070  right = tr.fraction;
1071 
1072  center = (d1*center)/d2;
1073  if (left >= center && left > right)
1074  {
1075  if (left < 1)
1076  {
1077  VectorSet(v, d2 * left * 0.5, -16, 0);
1078  G_ProjectSource (self->s.origin, v, v_forward, v_right, left_target);
1079 // gi.dprintf("incomplete path, go part way and adjust again\n");
1080  }
1082  self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
1083  VectorCopy (left_target, self->goalentity->s.origin);
1084  VectorCopy (left_target, self->monsterinfo.last_sighting);
1085  VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
1086  self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
1087 // gi.dprintf("adjusted left\n");
1088 // debug_drawline(self.origin, self.last_sighting, 152);
1089  }
1090  else if (right >= center && right > left)
1091  {
1092  if (right < 1)
1093  {
1094  VectorSet(v, d2 * right * 0.5, 16, 0);
1095  G_ProjectSource (self->s.origin, v, v_forward, v_right, right_target);
1096 // gi.dprintf("incomplete path, go part way and adjust again\n");
1097  }
1099  self->monsterinfo.aiflags |= AI_PURSUE_TEMP;
1100  VectorCopy (right_target, self->goalentity->s.origin);
1101  VectorCopy (right_target, self->monsterinfo.last_sighting);
1102  VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
1103  self->s.angles[YAW] = self->ideal_yaw = vectoyaw(v);
1104 // gi.dprintf("adjusted right\n");
1105 // debug_drawline(self.origin, self.last_sighting, 152);
1106  }
1107  }
1108 // else gi.dprintf("course was fine\n");
1109  }
1110 
1111  M_MoveToGoal (self, dist);
1112 
1113  G_FreeEdict(tempgoal);
1114 
1115  if (self)
1116  self->goalentity = save;
1117 }

◆ AI_SetSightClient()

void AI_SetSightClient ( void  )

Definition at line 50 of file g_ai.c.

51 {
52  edict_t *ent;
53  int start, check;
54 
55  if (level.sight_client == NULL)
56  start = 1;
57  else
58  start = level.sight_client - g_edicts;
59 
60  check = start;
61  while (1)
62  {
63  check++;
64  if (check > game.maxclients)
65  check = 1;
66  ent = &g_edicts[check];
67  if (ent->inuse
68  && ent->health > 0
69  && !(ent->flags & FL_NOTARGET) )
70  {
71  level.sight_client = ent;
72  return; // got one
73  }
74  if (check == start)
75  {
76  level.sight_client = NULL;
77  return; // nobody to see
78  }
79  }
80 }

Referenced by G_RunFrame().

◆ ai_stand()

void ai_stand ( edict_t self,
float  dist 
)

Definition at line 106 of file g_ai.c.

107 {
108  vec3_t v;
109 
110  if (dist)
111  M_walkmove (self, self->s.angles[YAW], dist);
112 
113  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
114  {
115  if (self->enemy)
116  {
117  VectorSubtract (self->enemy->s.origin, self->s.origin, v);
118  self->ideal_yaw = vectoyaw(v);
119  if (self->s.angles[YAW] != self->ideal_yaw && self->monsterinfo.aiflags & AI_TEMP_STAND_GROUND)
120  {
121  self->monsterinfo.aiflags &= ~(AI_STAND_GROUND | AI_TEMP_STAND_GROUND);
122  self->monsterinfo.run (self);
123  }
124  M_ChangeYaw (self);
125  ai_checkattack (self, 0);
126  }
127  else
128  FindTarget (self);
129  return;
130  }
131 
132  if (FindTarget (self))
133  return;
134 
135  if (level.time > self->monsterinfo.pausetime)
136  {
137  self->monsterinfo.walk (self);
138  return;
139  }
140 
141  if (!(self->spawnflags & 1) && (self->monsterinfo.idle) && (level.time > self->monsterinfo.idle_time))
142  {
143  if (self->monsterinfo.idle_time)
144  {
145  self->monsterinfo.idle (self);
146  self->monsterinfo.idle_time = level.time + 15 + random() * 15;
147  }
148  else
149  {
150  self->monsterinfo.idle_time = level.time + random() * 15;
151  }
152  }
153 }

◆ ai_turn()

void ai_turn ( edict_t self,
float  dist 
)

Definition at line 215 of file g_ai.c.

216 {
217  if (dist)
218  M_walkmove (self, self->s.angles[YAW], dist);
219 
220  if (FindTarget (self))
221  return;
222 
223  M_ChangeYaw (self);
224 }

◆ ai_walk()

void ai_walk ( edict_t self,
float  dist 
)

Definition at line 163 of file g_ai.c.

164 {
165  M_MoveToGoal (self, dist);
166 
167  // check for noticing a player
168  if (FindTarget (self))
169  return;
170 
171  if ((self->monsterinfo.search) && (level.time > self->monsterinfo.idle_time))
172  {
173  if (self->monsterinfo.idle_time)
174  {
175  self->monsterinfo.search (self);
176  self->monsterinfo.idle_time = level.time + 15 + random() * 15;
177  }
178  else
179  {
180  self->monsterinfo.idle_time = level.time + random() * 15;
181  }
182  }
183 }

◆ ArmorIndex()

int ArmorIndex ( edict_t ent)

Definition at line 590 of file g_items.c.

591 {
592  if (!ent->client)
593  return 0;
594 
595  if (ent->client->pers.inventory[jacket_armor_index] > 0)
596  return jacket_armor_index;
597 
598  if (ent->client->pers.inventory[combat_armor_index] > 0)
599  return combat_armor_index;
600 
601  if (ent->client->pers.inventory[body_armor_index] > 0)
602  return body_armor_index;
603 
604  return 0;
605 }

Referenced by CheckArmor(), G_SetStats(), and Pickup_Armor().

◆ AttackFinished()

void AttackFinished ( edict_t self,
float  time 
)

Definition at line 135 of file g_monster.c.

136 {
137  self->monsterinfo.attack_finished = level.time + time;
138 }

Referenced by HuntTarget().

◆ BecomeExplosion1()

void BecomeExplosion1 ( edict_t self)

◆ BeginIntermission()

void BeginIntermission ( edict_t targ)

Definition at line 74 of file p_hud.c.

75 {
76  int i, n;
77  edict_t *ent, *client;
78 
79  if (level.intermissiontime)
80  return; // already activated
81 
82  game.autosaved = false;
83 
84  // respawn any dead clients
85  for (i=0 ; i<maxclients->value ; i++)
86  {
87  client = g_edicts + 1 + i;
88  if (!client->inuse)
89  continue;
90  if (client->health <= 0)
91  respawn(client);
92  }
93 
94  level.intermissiontime = level.time;
95  level.changemap = targ->map;
96 
97  if (strstr(level.changemap, "*"))
98  {
99  if (coop->value)
100  {
101  for (i=0 ; i<maxclients->value ; i++)
102  {
103  client = g_edicts + 1 + i;
104  if (!client->inuse)
105  continue;
106  // strip players of all keys between units
107  for (n = 0; n < MAX_ITEMS; n++)
108  {
109  if (itemlist[n].flags & IT_KEY)
110  client->client->pers.inventory[n] = 0;
111  }
112  }
113  }
114  }
115  else
116  {
117  if (!deathmatch->value)
118  {
119  level.exitintermission = 1; // go immediately to the next level
120  return;
121  }
122  }
123 
124  level.exitintermission = 0;
125 
126  // find an intermission spot
127  ent = G_Find (NULL, FOFS(classname), "info_player_intermission");
128  if (!ent)
129  { // the map creator forgot to put in an intermission point...
130  ent = G_Find (NULL, FOFS(classname), "info_player_start");
131  if (!ent)
132  ent = G_Find (NULL, FOFS(classname), "info_player_deathmatch");
133  }
134  else
135  { // chose one of four spots
136  i = rand() & 3;
137  while (i--)
138  {
139  ent = G_Find (ent, FOFS(classname), "info_player_intermission");
140  if (!ent) // wrap around the list
141  ent = G_Find (ent, FOFS(classname), "info_player_intermission");
142  }
143  }
144 
145  VectorCopy (ent->s.origin, level.intermission_origin);
146  VectorCopy (ent->s.angles, level.intermission_angle);
147 
148  // move all clients to the intermission point
149  for (i=0 ; i<maxclients->value ; i++)
150  {
151  client = g_edicts + 1 + i;
152  if (!client->inuse)
153  continue;
154  MoveClientToIntermission (client);
155  }
156 }

Referenced by EndDMLevel(), and use_target_changelevel().

◆ CanDamage()

qboolean CanDamage ( edict_t targ,
edict_t inflictor 
)

Definition at line 32 of file g_combat.c.

33 {
34  vec3_t dest;
35  trace_t trace;
36 
37 // bmodels need special checking because their origin is 0,0,0
38  if (targ->movetype == MOVETYPE_PUSH)
39  {
40  VectorAdd (targ->absmin, targ->absmax, dest);
41  VectorScale (dest, 0.5, dest);
42  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
43  if (trace.fraction == 1.0)
44  return true;
45  if (trace.ent == targ)
46  return true;
47  return false;
48  }
49 
50  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, targ->s.origin, inflictor, MASK_SOLID);
51  if (trace.fraction == 1.0)
52  return true;
53 
54  VectorCopy (targ->s.origin, dest);
55  dest[0] += 15.0;
56  dest[1] += 15.0;
57  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
58  if (trace.fraction == 1.0)
59  return true;
60 
61  VectorCopy (targ->s.origin, dest);
62  dest[0] += 15.0;
63  dest[1] -= 15.0;
64  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
65  if (trace.fraction == 1.0)
66  return true;
67 
68  VectorCopy (targ->s.origin, dest);
69  dest[0] -= 15.0;
70  dest[1] += 15.0;
71  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
72  if (trace.fraction == 1.0)
73  return true;
74 
75  VectorCopy (targ->s.origin, dest);
76  dest[0] -= 15.0;
77  dest[1] -= 15.0;
78  trace = gi.trace (inflictor->s.origin, vec3_origin, vec3_origin, dest, inflictor, MASK_SOLID);
79  if (trace.fraction == 1.0)
80  return true;
81 
82 
83  return false;
84 }

Referenced by bfg_explode(), and T_RadiusDamage().

◆ ChangeWeapon()

void ChangeWeapon ( edict_t ent)

Definition at line 174 of file p_weapon.c.

175 {
176  int i;
177 
178  if (ent->client->grenade_time)
179  {
180  ent->client->grenade_time = level.time;
181  ent->client->weapon_sound = 0;
182  weapon_grenade_fire (ent, false);
183  ent->client->grenade_time = 0;
184  }
185 
186  ent->client->pers.lastweapon = ent->client->pers.weapon;
187  ent->client->pers.weapon = ent->client->newweapon;
188  ent->client->newweapon = NULL;
189  ent->client->machinegun_shots = 0;
190 
191  // set visible model
192  if (ent->s.modelindex == 255) {
193  if (ent->client->pers.weapon)
194  i = ((ent->client->pers.weapon->weapmodel & 0xff) << 8);
195  else
196  i = 0;
197  ent->s.skinnum = (ent - g_edicts - 1) | i;
198  }
199 
200  if (ent->client->pers.weapon && ent->client->pers.weapon->ammo)
202  else
203  ent->client->ammo_index = 0;
204 
205  if (!ent->client->pers.weapon)
206  { // dead
207  ent->client->ps.gunindex = 0;
208  return;
209  }
210 
212  ent->client->ps.gunframe = 0;
214 
216  if(ent->client->ps.pmove.pm_flags & PMF_DUCKED)
217  {
218  ent->s.frame = FRAME_crpain1;
219  ent->client->anim_end = FRAME_crpain4;
220  }
221  else
222  {
223  ent->s.frame = FRAME_pain301;
224  ent->client->anim_end = FRAME_pain304;
225 
226  }
227 }

Referenced by PutClientInServer(), Think_Weapon(), Weapon_Generic(), and Weapon_Grenade().

◆ ChaseNext()

void ChaseNext ( edict_t ent)

Definition at line 111 of file g_chase.c.

112 {
113  int i;
114  edict_t *e;
115 
116  if (!ent->client->chase_target)
117  return;
118 
119  i = ent->client->chase_target - g_edicts;
120  do {
121  i++;
122  if (i > maxclients->value)
123  i = 1;
124  e = g_edicts + i;
125  if (!e->inuse)
126  continue;
127  if (!e->client->resp.spectator)
128  break;
129  } while (e != ent->client->chase_target);
130 
131  ent->client->chase_target = e;
132  ent->client->update_chase = true;
133 }

Referenced by ClientThink(), SelectNextItem(), and UpdateChaseCam().

◆ ChasePrev()

void ChasePrev ( edict_t ent)

Definition at line 135 of file g_chase.c.

136 {
137  int i;
138  edict_t *e;
139 
140  if (!ent->client->chase_target)
141  return;
142 
143  i = ent->client->chase_target - g_edicts;
144  do {
145  i--;
146  if (i < 1)
147  i = maxclients->value;
148  e = g_edicts + i;
149  if (!e->inuse)
150  continue;
151  if (!e->client->resp.spectator)
152  break;
153  } while (e != ent->client->chase_target);
154 
155  ent->client->chase_target = e;
156  ent->client->update_chase = true;
157 }

Referenced by SelectPrevItem().

◆ ClientBeginServerFrame()

void ClientBeginServerFrame ( edict_t ent)

Definition at line 1765 of file p_client.c.

1766 {
1767  gclient_t *client;
1768  int buttonMask;
1769 
1770  if (level.intermissiontime)
1771  return;
1772 
1773  client = ent->client;
1774 
1775  if (deathmatch->value &&
1776  client->pers.spectator != client->resp.spectator &&
1777  (level.time - client->respawn_time) >= 5) {
1778  spectator_respawn(ent);
1779  return;
1780  }
1781 
1782  // run weapon animations if it hasn't been done by a ucmd_t
1783  if (!client->weapon_thunk && !client->resp.spectator)
1784  Think_Weapon (ent);
1785  else
1786  client->weapon_thunk = false;
1787 
1788  if (ent->deadflag)
1789  {
1790  // wait for any button just going down
1791  if ( level.time > client->respawn_time)
1792  {
1793  // in deathmatch, only wait for attack button
1794  if (deathmatch->value)
1795  buttonMask = BUTTON_ATTACK;
1796  else
1797  buttonMask = -1;
1798 
1799  if ( ( client->latched_buttons & buttonMask ) ||
1800  (deathmatch->value && ((int)dmflags->value & DF_FORCE_RESPAWN) ) )
1801  {
1802  respawn(ent);
1803  client->latched_buttons = 0;
1804  }
1805  }
1806  return;
1807  }
1808 
1809  // add player trail so monsters can follow
1810  if (!deathmatch->value)
1811  if (!visible (ent, PlayerTrail_LastSpot() ) )
1812  PlayerTrail_Add (ent->s.old_origin);
1813 
1814  client->latched_buttons = 0;
1815 }

Referenced by G_RunFrame().

◆ ClientEndServerFrame()

void ClientEndServerFrame ( edict_t ent)

Definition at line 958 of file p_view.c.

959 {
960  float bobtime;
961  int i;
962 
963  current_player = ent;
964  current_client = ent->client;
965 
966  //
967  // If the origin or velocity have changed since ClientThink(),
968  // update the pmove values. This will happen when the client
969  // is pushed by a bmodel or kicked by an explosion.
970  //
971  // If it wasn't updated here, the view position would lag a frame
972  // behind the body position when pushed -- "sinking into plats"
973  //
974  for (i=0 ; i<3 ; i++)
975  {
976  current_client->ps.pmove.origin[i] = ent->s.origin[i]*8.0;
977  current_client->ps.pmove.velocity[i] = ent->velocity[i]*8.0;
978  }
979 
980  //
981  // If the end of unit layout is displayed, don't give
982  // the player any normal movement attributes
983  //
984  if (level.intermissiontime)
985  {
986  // FIXME: add view drifting here?
987  current_client->ps.blend[3] = 0;
988  current_client->ps.fov = 90;
989  G_SetStats (ent);
990  return;
991  }
992 
994 
995  // burn from lava, etc
996  P_WorldEffects ();
997 
998  //
999  // set model angles from view angles so other things in
1000  // the world can tell which direction you are looking
1001  //
1002  if (ent->client->v_angle[PITCH] > 180)
1003  ent->s.angles[PITCH] = (-360 + ent->client->v_angle[PITCH])/3;
1004  else
1005  ent->s.angles[PITCH] = ent->client->v_angle[PITCH]/3;
1006  ent->s.angles[YAW] = ent->client->v_angle[YAW];
1007  ent->s.angles[ROLL] = 0;
1008  ent->s.angles[ROLL] = SV_CalcRoll (ent->s.angles, ent->velocity)*4;
1009 
1010  //
1011  // calculate speed and cycle to be used for
1012  // all cyclic walking effects
1013  //
1014  xyspeed = sqrt(ent->velocity[0]*ent->velocity[0] + ent->velocity[1]*ent->velocity[1]);
1015 
1016  if (xyspeed < 5)
1017  {
1018  bobmove = 0;
1019  current_client->bobtime = 0; // start at beginning of cycle again
1020  }
1021  else if (ent->groundentity)
1022  { // so bobbing only cycles when on ground
1023  if (xyspeed > 210)
1024  bobmove = 0.25;
1025  else if (xyspeed > 100)
1026  bobmove = 0.125;
1027  else
1028  bobmove = 0.0625;
1029  }
1030 
1031  bobtime = (current_client->bobtime += bobmove);
1032 
1034  bobtime *= 4;
1035 
1036  bobcycle = (int)bobtime;
1037  bobfracsin = fabs(sin(bobtime*M_PI));
1038 
1039  // detect hitting the floor
1040  P_FallingDamage (ent);
1041 
1042  // apply all the damage taken this frame
1043  P_DamageFeedback (ent);
1044 
1045  // determine the view offsets
1046  SV_CalcViewOffset (ent);
1047 
1048  // determine the gun offsets
1049  SV_CalcGunOffset (ent);
1050 
1051  // determine the full screen color blend
1052  // must be after viewoffset, so eye contents can be
1053  // accurately determined
1054  // FIXME: with client prediction, the contents
1055  // should be determined by the client
1056  SV_CalcBlend (ent);
1057 
1058  // chase cam stuff
1059  if (ent->client->resp.spectator)
1060  G_SetSpectatorStats(ent);
1061  else
1062  G_SetStats (ent);
1063  G_CheckChaseStats(ent);
1064 
1065  G_SetClientEvent (ent);
1066 
1067  G_SetClientEffects (ent);
1068 
1069  G_SetClientSound (ent);
1070 
1071  G_SetClientFrame (ent);
1072 
1073  VectorCopy (ent->velocity, ent->client->oldvelocity);
1075 
1076  // clear weapon kicks
1077  VectorClear (ent->client->kick_origin);
1078  VectorClear (ent->client->kick_angles);
1079 
1080  // if the scoreboard is up, update it
1081  if (ent->client->showscores && !(level.framenum & 31) )
1082  {
1083  DeathmatchScoreboardMessage (ent, ent->enemy);
1084  gi.unicast (ent, false);
1085  }
1086 }

Referenced by ClientBegin(), ClientBeginDeathmatch(), and ClientEndServerFrames().

◆ Cmd_Help_f()

void Cmd_Help_f ( edict_t ent)

Definition at line 347 of file p_hud.c.

348 {
349  // this is for backwards compatability
350  if (deathmatch->value)
351  {
352  Cmd_Score_f (ent);
353  return;
354  }
355 
356  ent->client->showinventory = false;
357  ent->client->showscores = false;
358 
359  if (ent->client->showhelp && (ent->client->pers.game_helpchanged == game.helpchanged))
360  {
361  ent->client->showhelp = false;
362  return;
363  }
364 
365  ent->client->showhelp = true;
366  ent->client->pers.helpchanged = 0;
367  HelpComputer (ent);
368 }

Referenced by ClientCommand(), and player_die().

◆ Cmd_Score_f()

void Cmd_Score_f ( edict_t ent)

Definition at line 277 of file p_hud.c.

278 {
279  ent->client->showinventory = false;
280  ent->client->showhelp = false;
281 
282  if (!deathmatch->value && !coop->value)
283  return;
284 
285  if (ent->client->showscores)
286  {
287  ent->client->showscores = false;
288  return;
289  }
290 
291  ent->client->showscores = true;
292  DeathmatchScoreboard (ent);
293 }

Referenced by ClientCommand(), and Cmd_Help_f().

◆ DeathmatchScoreboardMessage()

void DeathmatchScoreboardMessage ( edict_t client,
edict_t killer 
)

Definition at line 165 of file p_hud.c.

166 {
167  char entry[1024];
168  char string[1400];
169  int stringlength;
170  int i, j, k;
171  int sorted[MAX_CLIENTS];
172  int sortedscores[MAX_CLIENTS];
173  int score, total;
174  int picnum;
175  int x, y;
176  gclient_t *cl;
177  edict_t *cl_ent;
178  char *tag;
179 
180  // sort the clients by score
181  total = 0;
182  for (i=0 ; i<game.maxclients ; i++)
183  {
184  cl_ent = g_edicts + 1 + i;
185  if (!cl_ent->inuse || game.clients[i].resp.spectator)
186  continue;
187  score = game.clients[i].resp.score;
188  for (j=0 ; j<total ; j++)
189  {
190  if (score > sortedscores[j])
191  break;
192  }
193  for (k=total ; k>j ; k--)
194  {
195  sorted[k] = sorted[k-1];
196  sortedscores[k] = sortedscores[k-1];
197  }
198  sorted[j] = i;
199  sortedscores[j] = score;
200  total++;
201  }
202 
203  // print level name and exit rules
204  string[0] = 0;
205 
206  stringlength = (int)strlen(string);
207 
208  // add the clients in sorted order
209  if (total > 12)
210  total = 12;
211 
212  for (i=0 ; i<total ; i++)
213  {
214  cl = &game.clients[sorted[i]];
215  cl_ent = g_edicts + 1 + sorted[i];
216 
217  picnum = gi.imageindex ("i_fixme");
218  x = (i>=6) ? 160 : 0;
219  y = 32 + 32 * (i%6);
220 
221  // add a dogtag
222  if (cl_ent == ent)
223  tag = "tag1";
224  else if (cl_ent == killer)
225  tag = "tag2";
226  else
227  tag = NULL;
228  if (tag)
229  {
230  Com_sprintf (entry, sizeof(entry),
231  "xv %i yv %i picn %s ",x+32, y, tag);
232  j = (int)strlen(entry);
233  if (stringlength + j > 1024)
234  break;
235  strcpy (string + stringlength, entry);
236  stringlength += j;
237  }
238 
239  // send the layout
240  Com_sprintf (entry, sizeof(entry),
241  "client %i %i %i %i %i %i ",
242  x, y, sorted[i], cl->resp.score, cl->ping, (level.framenum - cl->resp.enterframe)/600);
243  j = (int)strlen(entry);
244  if (stringlength + j > 1024)
245  break;
246  strcpy (string + stringlength, entry);
247  stringlength += j;
248  }
249 
251  gi.WriteString (string);
252 }

Referenced by ClientEndServerFrame(), DeathmatchScoreboard(), and MoveClientToIntermission().

◆ Drop_Item()

edict_t* Drop_Item ( edict_t ent,
gitem_t item 
)

Definition at line 843 of file g_items.c.

844 {
845  edict_t *dropped;
847  vec3_t offset;
848 
849  dropped = G_Spawn();
850 
851  dropped->classname = item->classname;
852  dropped->item = item;
853  dropped->spawnflags = DROPPED_ITEM;
854  dropped->s.effects = item->world_model_flags;
855  dropped->s.renderfx = RF_GLOW;
856  VectorSet (dropped->mins, -15, -15, -15);
857  VectorSet (dropped->maxs, 15, 15, 15);
858  gi.setmodel (dropped, dropped->item->world_model);
859  dropped->solid = SOLID_TRIGGER;
860  dropped->movetype = MOVETYPE_TOSS;
861  dropped->touch = drop_temp_touch;
862  dropped->owner = ent;
863 
864  if (ent->client)
865  {
866  trace_t trace;
867 
869  VectorSet(offset, 24, 0, -16);
870  G_ProjectSource (ent->s.origin, offset, forward, right, dropped->s.origin);
871  trace = gi.trace (ent->s.origin, dropped->mins, dropped->maxs,
872  dropped->s.origin, ent, CONTENTS_SOLID);
873  VectorCopy (trace.endpos, dropped->s.origin);
874  }
875  else
876  {
878  VectorCopy (ent->s.origin, dropped->s.origin);
879  }
880 
881  VectorScale (forward, 100, dropped->velocity);
882  dropped->velocity[2] = 300;
883 
884  dropped->think = drop_make_touchable;
885  dropped->nextthink = level.time + 1;
886 
887  gi.linkentity (dropped);
888 
889  return dropped;
890 }

Referenced by Drop_Ammo(), Drop_General(), Drop_Weapon(), monster_death_use(), and TossClientWeapon().

◆ FacingIdeal()

qboolean FacingIdeal ( edict_t self)

Definition at line 594 of file g_ai.c.

595 {
596  float delta;
597 
598  delta = anglemod(self->s.angles[YAW] - self->ideal_yaw);
599  if (delta > 45 && delta < 315)
600  return false;
601  return true;
602 }

Referenced by ai_run_melee(), and ai_run_missile().

◆ FetchClientEntData()

void FetchClientEntData ( edict_t ent)

Definition at line 668 of file p_client.c.

669 {
670  ent->health = ent->client->pers.health;
671  ent->max_health = ent->client->pers.max_health;
672  ent->flags |= ent->client->pers.savedFlags;
673  if (coop->value)
674  ent->client->resp.score = ent->client->pers.score;
675 }

Referenced by PutClientInServer().

◆ FindItem()

gitem_t* FindItem ( char *  pickup_name)

Definition at line 100 of file g_items.c.

101 {
102  int i;
103  gitem_t *it;
104 
105  it = itemlist;
106  for (i=0 ; i<game.num_items ; i++, it++)
107  {
108  if (!it->pickup_name)
109  continue;
110  if (!Q_stricmp(it->pickup_name, pickup_name))
111  return it;
112  }
113 
114  return NULL;
115 }

Referenced by ChangeWeapon(), CheckPowerArmor(), Cmd_Drop_f(), Cmd_Give_f(), Cmd_Use_f(), G_SetStats(), InitClientPersistant(), NoAmmoWeaponChange(), Pickup_Ammo(), Pickup_Bandolier(), Pickup_Pack(), Pickup_Weapon(), PrecacheItem(), SetItemNames(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_worldspawn(), Use_PowerArmor(), and Use_Weapon().

◆ FindItemByClassname()

gitem_t* FindItemByClassname ( char *  classname)

Definition at line 77 of file g_items.c.

78 {
79  int i;
80  gitem_t *it;
81 
82  it = itemlist;
83  for (i=0 ; i<game.num_items ; i++, it++)
84  {
85  if (!it->classname)
86  continue;
87  if (!Q_stricmp(it->classname, classname))
88  return it;
89  }
90 
91  return NULL;
92 }

Referenced by monster_start(), SP_trigger_key(), SP_turret_driver(), and TossClientWeapon().

◆ findradius()

edict_t* findradius ( edict_t from,
vec3_t  org,
float  rad 
)

Definition at line 78 of file g_utils.c.

79 {
80  vec3_t eorg;
81  int j;
82 
83  if (!from)
84  from = g_edicts;
85  else
86  from++;
87  for ( ; from < &g_edicts[globals.num_edicts]; from++)
88  {
89  if (!from->inuse)
90  continue;
91  if (from->solid == SOLID_NOT)
92  continue;
93  for (j=0 ; j<3 ; j++)
94  eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5);
95  if (VectorLength(eorg) > rad)
96  continue;
97  return from;
98  }
99 
100  return NULL;
101 }

Referenced by bfg_explode(), bfg_think(), medic_FindDeadMonster(), and T_RadiusDamage().

◆ fire_bfg()

void fire_bfg ( edict_t self,
vec3_t  start,
vec3_t  dir,
int  damage,
int  speed,
float  damage_radius 
)

Definition at line 884 of file g_weapon.c.

885 {
886  edict_t *bfg;
887 
888  bfg = G_Spawn();
889  VectorCopy (start, bfg->s.origin);
890  VectorCopy (dir, bfg->movedir);
891  vectoangles (dir, bfg->s.angles);
892  VectorScale (dir, speed, bfg->velocity);
894  bfg->clipmask = MASK_SHOT;
895  bfg->solid = SOLID_BBOX;
896  bfg->s.effects |= EF_BFG | EF_ANIM_ALLFAST;
897  VectorClear (bfg->mins);
898  VectorClear (bfg->maxs);
899  bfg->s.modelindex = gi.modelindex ("sprites/s_bfg1.sp2");
900  bfg->owner = self;
901  bfg->touch = bfg_touch;
902  bfg->nextthink = level.time + 8000/speed;
903  bfg->think = G_FreeEdict;
904  bfg->radius_dmg = damage;
905  bfg->dmg_radius = damage_radius;
906  bfg->classname = "bfg blast";
907  bfg->s.sound = gi.soundindex ("weapons/bfg__l1a.wav");
908 
909  bfg->think = bfg_think;
910  bfg->nextthink = level.time + FRAMETIME;
911  bfg->teammaster = bfg;
912  bfg->teamchain = NULL;
913 
914  if (self->client)
915  check_dodge (self, bfg->s.origin, dir, speed);
916 
917  gi.linkentity (bfg);
918 }

Referenced by monster_fire_bfg(), and weapon_bfg_fire().

◆ fire_blaster()

void fire_blaster ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  speed,
int  effect,
qboolean  hyper 
)

Definition at line 345 of file g_weapon.c.

346 {
347  edict_t *bolt;
348  trace_t tr;
349 
350  VectorNormalize (dir);
351 
352  bolt = G_Spawn();
353  bolt->svflags = SVF_DEADMONSTER;
354  // yes, I know it looks weird that projectiles are deadmonsters
355  // what this means is that when prediction is used against the object
356  // (blaster/hyperblaster shots), the player won't be solid clipped against
357  // the object. Right now trying to run into a firing hyperblaster
358  // is very jerky since you are predicted 'against' the shots.
359  VectorCopy (start, bolt->s.origin);
360  VectorCopy (start, bolt->s.old_origin);
361  vectoangles (dir, bolt->s.angles);
362  VectorScale (dir, speed, bolt->velocity);
364  bolt->clipmask = MASK_SHOT;
365  bolt->solid = SOLID_BBOX;
366  bolt->s.effects |= effect;
367  VectorClear (bolt->mins);
368  VectorClear (bolt->maxs);
369  bolt->s.modelindex = gi.modelindex ("models/objects/laser/tris.md2");
370  bolt->s.sound = gi.soundindex ("misc/lasfly.wav");
371  bolt->owner = self;
372  bolt->touch = blaster_touch;
373  bolt->nextthink = level.time + 2;
374  bolt->think = G_FreeEdict;
375  bolt->dmg = damage;
376  bolt->classname = "bolt";
377  if (hyper)
378  bolt->spawnflags = 1;
379  gi.linkentity (bolt);
380 
381  if (self->client)
382  check_dodge (self, bolt->s.origin, dir, speed);
383 
384  tr = gi.trace (self->s.origin, NULL, NULL, bolt->s.origin, bolt, MASK_SHOT);
385  if (tr.fraction < 1.0)
386  {
387  VectorMA (bolt->s.origin, -10, dir, bolt->s.origin);
388  bolt->touch (bolt, tr.ent, NULL, NULL);
389  }
390 }

Referenced by Blaster_Fire(), monster_fire_blaster(), and use_target_blaster().

◆ fire_bullet()

void fire_bullet ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  kick,
int  hspread,
int  vspread,
int  mod 
)

Definition at line 277 of file g_weapon.c.

278 {
279  fire_lead (self, start, aimdir, damage, kick, TE_GUNSHOT, hspread, vspread, mod);
280 }

Referenced by Chaingun_Fire(), Machinegun_Fire(), and monster_fire_bullet().

◆ fire_grenade()

void fire_grenade ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  speed,
float  timer,
float  damage_radius 
)

Definition at line 486 of file g_weapon.c.

487 {
488  edict_t *grenade;
489  vec3_t dir;
491 
492  vectoangles (aimdir, dir);
493  AngleVectors (dir, forward, right, up);
494 
495  grenade = G_Spawn();
496  VectorCopy (start, grenade->s.origin);
497  VectorScale (aimdir, speed, grenade->velocity);
498  VectorMA (grenade->velocity, 200 + crandom() * 10.0, up, grenade->velocity);
499  VectorMA (grenade->velocity, crandom() * 10.0, right, grenade->velocity);
500  VectorSet (grenade->avelocity, 300, 300, 300);
501  grenade->movetype = MOVETYPE_BOUNCE;
502  grenade->clipmask = MASK_SHOT;
503  grenade->solid = SOLID_BBOX;
504  grenade->s.effects |= EF_GRENADE;
505  VectorClear (grenade->mins);
506  VectorClear (grenade->maxs);
507  grenade->s.modelindex = gi.modelindex ("models/objects/grenade/tris.md2");
508  grenade->owner = self;
509  grenade->touch = Grenade_Touch;
510  grenade->nextthink = level.time + timer;
511  grenade->think = Grenade_Explode;
512  grenade->dmg = damage;
513  grenade->dmg_radius = damage_radius;
514  grenade->classname = "grenade";
515 
516  gi.linkentity (grenade);
517 }

Referenced by monster_fire_grenade(), and weapon_grenadelauncher_fire().

◆ fire_grenade2()

void fire_grenade2 ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  speed,
float  timer,
float  damage_radius,
qboolean  held 
)

Definition at line 519 of file g_weapon.c.

520 {
521  edict_t *grenade;
522  vec3_t dir;
524 
525  vectoangles (aimdir, dir);
526  AngleVectors (dir, forward, right, up);
527 
528  grenade = G_Spawn();
529  VectorCopy (start, grenade->s.origin);
530  VectorScale (aimdir, speed, grenade->velocity);
531  VectorMA (grenade->velocity, 200 + crandom() * 10.0, up, grenade->velocity);
532  VectorMA (grenade->velocity, crandom() * 10.0, right, grenade->velocity);
533  VectorSet (grenade->avelocity, 300, 300, 300);
534  grenade->movetype = MOVETYPE_BOUNCE;
535  grenade->clipmask = MASK_SHOT;
536  grenade->solid = SOLID_BBOX;
537  grenade->s.effects |= EF_GRENADE;
538  VectorClear (grenade->mins);
539  VectorClear (grenade->maxs);
540  grenade->s.modelindex = gi.modelindex ("models/objects/grenade2/tris.md2");
541  grenade->owner = self;
542  grenade->touch = Grenade_Touch;
543  grenade->nextthink = level.time + timer;
544  grenade->think = Grenade_Explode;
545  grenade->dmg = damage;
546  grenade->dmg_radius = damage_radius;
547  grenade->classname = "hgrenade";
548  if (held)
549  grenade->spawnflags = 3;
550  else
551  grenade->spawnflags = 1;
552  grenade->s.sound = gi.soundindex("weapons/hgrenc1b.wav");
553 
554  if (timer <= 0.0)
555  Grenade_Explode (grenade);
556  else
557  {
558  gi.sound (self, CHAN_WEAPON, gi.soundindex ("weapons/hgrent1a.wav"), 1, ATTN_NORM, 0);
559  gi.linkentity (grenade);
560  }
561 }

Referenced by weapon_grenade_fire().

◆ fire_hit()

qboolean fire_hit ( edict_t self,
vec3_t  aim,
int  damage,
int  kick 
)

Definition at line 63 of file g_weapon.c.

64 {
65  trace_t tr;
67  vec3_t v;
68  vec3_t point;
69  float range;
70  vec3_t dir;
71 
72  //see if enemy is in range
73  VectorSubtract (self->enemy->s.origin, self->s.origin, dir);
74  range = VectorLength(dir);
75  if (range > aim[0])
76  return false;
77 
78  if (aim[1] > self->mins[0] && aim[1] < self->maxs[0])
79  {
80  // the hit is straight on so back the range up to the edge of their bbox
81  range -= self->enemy->maxs[0];
82  }
83  else
84  {
85  // this is a side hit so adjust the "right" value out to the edge of their bbox
86  if (aim[1] < 0)
87  aim[1] = self->enemy->mins[0];
88  else
89  aim[1] = self->enemy->maxs[0];
90  }
91 
92  VectorMA (self->s.origin, range, dir, point);
93 
94  tr = gi.trace (self->s.origin, NULL, NULL, point, self, MASK_SHOT);
95  if (tr.fraction < 1)
96  {
97  if (!tr.ent->takedamage)
98  return false;
99  // if it will hit any client/monster then hit the one we wanted to hit
100  if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client))
101  tr.ent = self->enemy;
102  }
103 
104  AngleVectors(self->s.angles, forward, right, up);
105  VectorMA (self->s.origin, range, forward, point);
106  VectorMA (point, aim[1], right, point);
107  VectorMA (point, aim[2], up, point);
108  VectorSubtract (point, self->enemy->s.origin, dir);
109 
110  // do the damage
111  T_Damage (tr.ent, self, self, dir, point, vec3_origin, damage, kick/2, DAMAGE_NO_KNOCKBACK, MOD_HIT);
112 
113  if (!(tr.ent->svflags & SVF_MONSTER) && (!tr.ent->client))
114  return false;
115 
116  // do our special form of knockback here
117  VectorMA (self->enemy->absmin, 0.5, self->enemy->size, v);
118  VectorSubtract (v, point, v);
119  VectorNormalize (v);
120  VectorMA (self->enemy->velocity, kick, v, self->enemy->velocity);
121  if (self->enemy->velocity[2] > 0)
122  self->enemy->groundentity = NULL;
123  return true;
124 }

Referenced by berserk_attack_club(), berserk_attack_spike(), brain_hit_left(), brain_hit_right(), brain_tentacle_attack(), ChickSlash(), flipper_bite(), floater_wham(), flyer_slash_left(), flyer_slash_right(), GaldiatorMelee(), infantry_smack(), mutant_hit_left(), and mutant_hit_right().

◆ fire_rail()

void fire_rail ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  kick 
)

Definition at line 658 of file g_weapon.c.

659 {
660  vec3_t from;
661  vec3_t end;
662  trace_t tr;
663  edict_t *ignore;
664  int mask;
665  qboolean water;
666 
667  VectorMA (start, 8192, aimdir, end);
668  VectorCopy (start, from);
669  ignore = self;
670  water = false;
672  while (ignore)
673  {
674  tr = gi.trace (from, NULL, NULL, end, ignore, mask);
675 
677  {
679  water = true;
680  }
681  else
682  {
683  //ZOID--added so rail goes through SOLID_BBOX entities (gibs, etc)
684  if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client) ||
685  (tr.ent->solid == SOLID_BBOX))
686  ignore = tr.ent;
687  else
688  ignore = NULL;
689 
690  if ((tr.ent != self) && (tr.ent->takedamage))
691  T_Damage (tr.ent, self, self, aimdir, tr.endpos, tr.plane.normal, damage, kick, 0, MOD_RAILGUN);
692  }
693 
694  VectorCopy (tr.endpos, from);
695  }
696 
697  // send gun puff / flash
700  gi.WritePosition (start);
701  gi.WritePosition (tr.endpos);
702  gi.multicast (self->s.origin, MULTICAST_PHS);
703 // gi.multicast (start, MULTICAST_PHS);
704  if (water)
705  {
708  gi.WritePosition (start);
709  gi.WritePosition (tr.endpos);
711  }
712 
713  if (self->client)
714  PlayerNoise(self, tr.endpos, PNOISE_IMPACT);
715 }

Referenced by monster_fire_railgun(), and weapon_railgun_fire().

◆ fire_rocket()

void fire_rocket ( edict_t self,
vec3_t  start,
vec3_t  dir,
int  damage,
int  speed,
float  damage_radius,
int  radius_damage 
)

Definition at line 620 of file g_weapon.c.

621 {
622  edict_t *rocket;
623 
624  rocket = G_Spawn();
625  VectorCopy (start, rocket->s.origin);
626  VectorCopy (dir, rocket->movedir);
627  vectoangles (dir, rocket->s.angles);
628  VectorScale (dir, speed, rocket->velocity);
629  rocket->movetype = MOVETYPE_FLYMISSILE;
630  rocket->clipmask = MASK_SHOT;
631  rocket->solid = SOLID_BBOX;
632  rocket->s.effects |= EF_ROCKET;
633  VectorClear (rocket->mins);
634  VectorClear (rocket->maxs);
635  rocket->s.modelindex = gi.modelindex ("models/objects/rocket/tris.md2");
636  rocket->owner = self;
637  rocket->touch = rocket_touch;
638  rocket->nextthink = level.time + 8000/speed;
639  rocket->think = G_FreeEdict;
640  rocket->dmg = damage;
641  rocket->radius_dmg = radius_damage;
642  rocket->dmg_radius = damage_radius;
643  rocket->s.sound = gi.soundindex ("weapons/rockfly.wav");
644  rocket->classname = "rocket";
645 
646  if (self->client)
647  check_dodge (self, rocket->s.origin, dir, speed);
648 
649  gi.linkentity (rocket);
650 }

Referenced by monster_fire_rocket(), turret_breach_fire(), and Weapon_RocketLauncher_Fire().

◆ fire_shotgun()

void fire_shotgun ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  kick,
int  hspread,
int  vspread,
int  count,
int  mod 
)

Definition at line 290 of file g_weapon.c.

291 {
292  int i;
293 
294  for (i = 0; i < count; i++)
295  fire_lead (self, start, aimdir, damage, kick, TE_SHOTGUN, hspread, vspread, mod);
296 }

Referenced by monster_fire_shotgun(), weapon_shotgun_fire(), and weapon_supershotgun_fire().

◆ flymonster_start()

void flymonster_start ( edict_t self)

Definition at line 715 of file g_monster.c.

716 {
717  self->flags |= FL_FLY;
718  self->think = flymonster_start_go;
719  monster_start (self);
720 }

Referenced by SP_misc_insane(), SP_monster_boss2(), SP_monster_floater(), SP_monster_flyer(), and SP_monster_hover().

◆ FoundTarget()

void FoundTarget ( edict_t self)

Definition at line 347 of file g_ai.c.

348 {
349  // let other monsters see this monster for a while
350  if (self->enemy->client)
351  {
352  level.sight_entity = self;
353  level.sight_entity_framenum = level.framenum;
354  level.sight_entity->light_level = 128;
355  }
356 
357  self->show_hostile = level.time + 1; // wake up other monsters
358 
360  self->monsterinfo.trail_time = level.time;
361 
362  if (!self->combattarget)
363  {
364  HuntTarget (self);
365  return;
366  }
367 
368  self->goalentity = self->movetarget = G_PickTarget(self->combattarget);
369  if (!self->movetarget)
370  {
371  self->goalentity = self->movetarget = self->enemy;
372  HuntTarget (self);
373  gi.dprintf("%s at %s, combattarget %s not found\n", self->classname, vtos(self->s.origin), self->combattarget);
374  return;
375  }
376 
377  // clear out our combattarget, these are a one shot deal
378  self->combattarget = NULL;
379  self->monsterinfo.aiflags |= AI_COMBAT_POINT;
380 
381  // clear the targetname, that point is ours!
382  self->movetarget->targetname = NULL;
383  self->monsterinfo.pausetime = 0;
384 
385  // run for it
386  self->monsterinfo.run (self);
387 }

Referenced by FindTarget(), M_ReactToDamage(), medic_cable_attack(), medic_idle(), medic_run(), medic_search(), monster_triggered_spawn(), and monster_use().

◆ G_CheckChaseStats()

void G_CheckChaseStats ( edict_t ent)

Definition at line 531 of file p_hud.c.

532 {
533  int i;
534  gclient_t *cl;
535 
536  for (i = 1; i <= maxclients->value; i++) {
537  cl = g_edicts[i].client;
538  if (!g_edicts[i].inuse || cl->chase_target != ent)
539  continue;
540  memcpy(cl->ps.stats, ent->client->ps.stats, sizeof(cl->ps.stats));
542  }
543 }

Referenced by ClientEndServerFrame().

◆ G_CopyString()

char* G_CopyString ( char *  in)

Definition at line 391 of file g_utils.c.

392 {
393  char *out;
394 
395  out = gi.TagMalloc ((int)strlen(in)+1, TAG_LEVEL);
396  strcpy (out, in);
397  return out;
398 }

◆ G_Find()

edict_t* G_Find ( edict_t from,
int  fieldofs,
char *  match 
)

Definition at line 45 of file g_utils.c.

46 {
47  char *s;
48 
49  if (!from)
50  from = g_edicts;
51  else
52  from++;
53 
54  for ( ; from < &g_edicts[globals.num_edicts] ; from++)
55  {
56  if (!from->inuse)
57  continue;
58  s = *(char **) ((byte *)from + fieldofs);
59  if (!s)
60  continue;
61  if (!Q_stricmp (s, match))
62  return from;
63  }
64 
65  return NULL;
66 }

Referenced by BeginIntermission(), door_use_areaportals(), EndDMLevel(), func_clock_think(), G_PickTarget(), G_UseTargets(), misc_viper_bomb_use(), monster_start_go(), SelectCoopSpawnPoint(), SelectFarthestDeathmatchSpawnPoint(), SelectRandomDeathmatchSpawnPoint(), SelectSpawnPoint(), SP_FixCoopSpots(), target_laser_start(), target_lightramp_use(), and teleporter_touch().

◆ G_FreeEdict()

void G_FreeEdict ( edict_t e)

Definition at line 452 of file g_utils.c.

453 {
454  gi.unlinkentity (ed); // unlink from world
455 
456  if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
457  {
458 // gi.dprintf("tried to free special edict\n");
459  return;
460  }
461 
462  memset (ed, 0, sizeof(*ed));
463  ed->classname = "freed";
464  ed->freetime = level.time;
465  ed->inuse = false;
466 }

Referenced by ai_run(), BecomeExplosion1(), BecomeExplosion2(), bfg_explode(), bfg_touch(), blaster_touch(), Cmd_Give_f(), debris_die(), Drop_Ammo(), drop_make_touchable(), droptofloor(), fire_bfg(), fire_blaster(), fire_rocket(), func_explosive_explode(), G_UseTargets(), gib_die(), gib_think(), Grenade_Explode(), Grenade_Touch(), MegaHealth_think(), misc_blackhole_use(), monster_start(), multi_trigger(), rocket_touch(), SP_func_clock(), SP_func_explosive(), SP_info_null(), SP_info_player_coop(), SP_info_player_deathmatch(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_light(), SP_misc_actor(), SP_misc_deadsoldier(), SP_misc_explobox(), SP_misc_gib_arm(), SP_misc_gib_head(), SP_misc_gib_leg(), SP_misc_insane(), SP_misc_strogg_ship(), SP_misc_teleporter(), SP_misc_viper(), SP_monster_berserk(), SP_monster_boss2(), SP_monster_boss3_stand(), SP_monster_brain(), SP_monster_chick(), SP_monster_flipper(), SP_monster_floater(), SP_monster_flyer(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_hover(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier(), SP_monster_soldier_light(), SP_monster_soldier_ss(), SP_monster_supertank(), SP_monster_tank(), SP_path_corner(), SP_point_combat(), SP_target_changelevel(), SP_target_goal(), SP_target_help(), SP_target_lightramp(), SP_target_secret(), SP_trigger_gravity(), SP_turret_driver(), SpawnEntities(), SpawnItem(), target_crosslevel_target_think(), target_lightramp_use(), Think_Delay(), ThrowDebris(), ThrowGib(), ThrowHead(), TossClientWeapon(), Touch_Item(), trigger_crosslevel_trigger_use(), trigger_push_touch(), turret_breach_finish_init(), Use_Boss3(), use_target_goal(), and use_target_secret().

◆ G_InitEdict()

void G_InitEdict ( edict_t e)

Definition at line 401 of file g_utils.c.

402 {
403  e->inuse = true;
404  e->classname = "noclass";
405  e->gravity = 1.0;
406  e->s.number = e - g_edicts;
407 }

Referenced by ClientBegin(), ClientBeginDeathmatch(), and G_Spawn().

◆ G_PickTarget()

edict_t* G_PickTarget ( char *  targetname)

Definition at line 118 of file g_utils.c.

119 {
120  edict_t *ent = NULL;
121  int num_choices = 0;
122  edict_t *choice[MAXCHOICES];
123 
124  if (!targetname)
125  {
126  gi.dprintf("G_PickTarget called with NULL targetname\n");
127  return NULL;
128  }
129 
130  while(1)
131  {
132  ent = G_Find (ent, FOFS(targetname), targetname);
133  if (!ent)
134  break;
135  choice[num_choices++] = ent;
136  if (num_choices == MAXCHOICES)
137  break;
138  }
139 
140  if (!num_choices)
141  {
142  gi.dprintf("G_PickTarget: target %s not found\n", targetname);
143  return NULL;
144  }
145 
146  return choice[rand() % num_choices];
147 }

Referenced by actor_use(), FoundTarget(), func_train_find(), monster_start_go(), path_corner_touch(), point_combat_touch(), target_actor_touch(), train_next(), trigger_elevator_init(), trigger_elevator_use(), turret_breach_finish_init(), and turret_driver_link().

◆ G_ProjectSource()

void G_ProjectSource ( vec3_t  point,
vec3_t  distance,
vec3_t  forward,
vec3_t  right,
vec3_t  result 
)

◆ G_RunEntity()

void G_RunEntity ( edict_t ent)

Definition at line 932 of file g_phys.c.

933 {
934  if (ent->prethink)
935  ent->prethink (ent);
936 
937  switch ( (int)ent->movetype)
938  {
939  case MOVETYPE_PUSH:
940  case MOVETYPE_STOP:
941  SV_Physics_Pusher (ent);
942  break;
943  case MOVETYPE_NONE:
944  SV_Physics_None (ent);
945  break;
946  case MOVETYPE_NOCLIP:
947  SV_Physics_Noclip (ent);
948  break;
949  case MOVETYPE_STEP:
950  SV_Physics_Step (ent);
951  break;
952  case MOVETYPE_TOSS:
953  case MOVETYPE_BOUNCE:
954  case MOVETYPE_FLY:
955  case MOVETYPE_FLYMISSILE:
956  SV_Physics_Toss (ent);
957  break;
958  default:
959  gi.error ("SV_Physics: bad movetype %i", (int)ent->movetype);
960  }
961 }

Referenced by G_RunFrame().

◆ G_SetMovedir()

void G_SetMovedir ( vec3_t  angles,
vec3_t  movedir 
)

Definition at line 314 of file g_utils.c.

315 {
316  if (VectorCompare (angles, VEC_UP))
317  {
318  VectorCopy (MOVEDIR_UP, movedir);
319  }
320  else if (VectorCompare (angles, VEC_DOWN))
321  {
322  VectorCopy (MOVEDIR_DOWN, movedir);
323  }
324  else
325  {
326  AngleVectors (angles, movedir, NULL, NULL);
327  }
328 
329  VectorClear (angles);
330 }

Referenced by InitTrigger(), SP_func_button(), SP_func_door(), SP_func_water(), SP_target_actor(), SP_target_blaster(), SP_target_spawner(), SP_target_splash(), SP_trigger_multiple(), and target_laser_start().

◆ G_SetSpectatorStats()

void G_SetSpectatorStats ( edict_t ent)

Definition at line 550 of file p_hud.c.

551 {
552  gclient_t *cl = ent->client;
553 
554  if (!cl->chase_target)
555  G_SetStats (ent);
556 
557  cl->ps.stats[STAT_SPECTATOR] = 1;
558 
559  // layouts are independant in spectator
560  cl->ps.stats[STAT_LAYOUTS] = 0;
561  if (cl->pers.health <= 0 || level.intermissiontime || cl->showscores)
562  cl->ps.stats[STAT_LAYOUTS] |= 1;
563  if (cl->showinventory && cl->pers.health > 0)
564  cl->ps.stats[STAT_LAYOUTS] |= 2;
565 
566  if (cl->chase_target && cl->chase_target->inuse)
567  cl->ps.stats[STAT_CHASE] = CS_PLAYERSKINS +
568  (cl->chase_target - g_edicts) - 1;
569  else
570  cl->ps.stats[STAT_CHASE] = 0;
571 }

Referenced by ClientEndServerFrame(), and G_CheckChaseStats().

◆ G_SetStats()

void G_SetStats ( edict_t ent)

Definition at line 378 of file p_hud.c.

379 {
380  gitem_t *item;
381  int index = 0, cells = 0;
382  int power_armor_type;
383 
384  //
385  // health
386  //
387  ent->client->ps.stats[STAT_HEALTH_ICON] = level.pic_health;
388  ent->client->ps.stats[STAT_HEALTH] = ent->health;
389 
390  //
391  // ammo
392  //
393  if (!ent->client->ammo_index /* || !ent->client->pers.inventory[ent->client->ammo_index] */)
394  {
395  ent->client->ps.stats[STAT_AMMO_ICON] = 0;
396  ent->client->ps.stats[STAT_AMMO] = 0;
397  }
398  else
399  {
400  item = &itemlist[ent->client->ammo_index];
401  ent->client->ps.stats[STAT_AMMO_ICON] = gi.imageindex (item->icon);
402  ent->client->ps.stats[STAT_AMMO] = ent->client->pers.inventory[ent->client->ammo_index];
403  }
404 
405  //
406  // armor
407  //
408  power_armor_type = PowerArmorType (ent);
409  if (power_armor_type)
410  {
411  cells = ent->client->pers.inventory[ITEM_INDEX(FindItem ("cells"))];
412  if (cells == 0)
413  { // ran out of cells for power armor
414  ent->flags &= ~FL_POWER_ARMOR;
415  gi.sound(ent, CHAN_ITEM, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0);
416  power_armor_type = 0;;
417  }
418  }
419 
420  index = ArmorIndex (ent);
421  if (power_armor_type && (!index || (level.framenum & 8) ) )
422  { // flash between power armor and other armor icon
423  ent->client->ps.stats[STAT_ARMOR_ICON] = gi.imageindex ("i_powershield");
424  ent->client->ps.stats[STAT_ARMOR] = cells;
425  }
426  else if (index)
427  {
428  item = GetItemByIndex (index);
429  ent->client->ps.stats[STAT_ARMOR_ICON] = gi.imageindex (item->icon);
430  ent->client->ps.stats[STAT_ARMOR] = ent->client->pers.inventory[index];
431  }
432  else
433  {
434  ent->client->ps.stats[STAT_ARMOR_ICON] = 0;
435  ent->client->ps.stats[STAT_ARMOR] = 0;
436  }
437 
438  //
439  // pickup message
440  //
441  if (level.time > ent->client->pickup_msg_time)
442  {
443  ent->client->ps.stats[STAT_PICKUP_ICON] = 0;
444  ent->client->ps.stats[STAT_PICKUP_STRING] = 0;
445  }
446 
447  //
448  // timers
449  //
450  if (ent->client->quad_framenum > level.framenum)
451  {
452  ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_quad");
453  ent->client->ps.stats[STAT_TIMER] = (ent->client->quad_framenum - level.framenum)/10;
454  }
455  else if (ent->client->invincible_framenum > level.framenum)
456  {
457  ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_invulnerability");
458  ent->client->ps.stats[STAT_TIMER] = (ent->client->invincible_framenum - level.framenum)/10;
459  }
460  else if (ent->client->enviro_framenum > level.framenum)
461  {
462  ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_envirosuit");
463  ent->client->ps.stats[STAT_TIMER] = (ent->client->enviro_framenum - level.framenum)/10;
464  }
465  else if (ent->client->breather_framenum > level.framenum)
466  {
467  ent->client->ps.stats[STAT_TIMER_ICON] = gi.imageindex ("p_rebreather");
468  ent->client->ps.stats[STAT_TIMER] = (ent->client->breather_framenum - level.framenum)/10;
469  }
470  else
471  {
472  ent->client->ps.stats[STAT_TIMER_ICON] = 0;
473  ent->client->ps.stats[STAT_TIMER] = 0;
474  }
475 
476  //
477  // selected item
478  //
479  if (ent->client->pers.selected_item == -1)
480  ent->client->ps.stats[STAT_SELECTED_ICON] = 0;
481  else
483 
485 
486  //
487  // layouts
488  //
489  ent->client->ps.stats[STAT_LAYOUTS] = 0;
490 
491  if (deathmatch->value)
492  {
493  if (ent->client->pers.health <= 0 || level.intermissiontime
494  || ent->client->showscores)
495  ent->client->ps.stats[STAT_LAYOUTS] |= 1;
496  if (ent->client->showinventory && ent->client->pers.health > 0)
497  ent->client->ps.stats[STAT_LAYOUTS] |= 2;
498  }
499  else
500  {
501  if (ent->client->showscores || ent->client->showhelp)
502  ent->client->ps.stats[STAT_LAYOUTS] |= 1;
503  if (ent->client->showinventory && ent->client->pers.health > 0)
504  ent->client->ps.stats[STAT_LAYOUTS] |= 2;
505  }
506 
507  //
508  // frags
509  //
510  ent->client->ps.stats[STAT_FRAGS] = ent->client->resp.score;
511 
512  //
513  // help icon / current weapon if not shown
514  //
515  if (ent->client->pers.helpchanged && (level.framenum&8) )
516  ent->client->ps.stats[STAT_HELPICON] = gi.imageindex ("i_help");
517  else if ( (ent->client->pers.hand == CENTER_HANDED)
518  && ent->client->pers.weapon)
520  else
521  ent->client->ps.stats[STAT_HELPICON] = 0;
522 
523  ent->client->ps.stats[STAT_SPECTATOR] = 0;
524 }

Referenced by ClientEndServerFrame(), and G_SetSpectatorStats().

◆ G_Spawn()

edict_t* G_Spawn ( void  )

Definition at line 420 of file g_utils.c.

421 {
422  int i;
423  edict_t *e;
424 
425  e = &g_edicts[(int)maxclients->value+1];
426  for ( i=maxclients->value+1 ; i<globals.num_edicts ; i++, e++)
427  {
428  // the first couple seconds of server time can involve a lot of
429  // freeing and allocating, so relax the replacement policy
430  if (!e->inuse && ( e->freetime < 2 || level.time - e->freetime > 0.5 ) )
431  {
432  G_InitEdict (e);
433  return e;
434  }
435  }
436 
437  if (i == game.maxentities)
438  gi.error ("ED_Alloc: no free edicts");
439 
441  G_InitEdict (e);
442  return e;
443 }

Referenced by ai_run(), Cmd_Give_f(), CreateTargetChangeLevel(), Drop_Item(), fire_bfg(), fire_blaster(), fire_grenade(), fire_grenade2(), fire_rocket(), G_UseTargets(), InitBodyQue(), jorg_dead(), makron_die(), MakronToss(), plat_spawn_inside_trigger(), PlayerNoise(), PlayerTrail_Init(), SP_CreateCoopSpots(), SP_misc_teleporter(), SpawnEntities(), Think_SpawnDoorTrigger(), ThrowDebris(), ThrowGib(), and use_target_spawner().

◆ G_TouchSolids()

void G_TouchSolids ( edict_t ent)

Definition at line 508 of file g_utils.c.

509 {
510  int i, num;
511  edict_t *touch[MAX_EDICTS], *hit;
512 
513  num = gi.BoxEdicts (ent->absmin, ent->absmax, touch
515 
516  // be careful, it is possible to have an entity in this
517  // list removed before we get to it (killtriggered)
518  for (i=0 ; i<num ; i++)
519  {
520  hit = touch[i];
521  if (!hit->inuse)
522  continue;
523  if (ent->touch)
524  ent->touch (hit, ent, NULL, NULL);
525  if (!ent->inuse)
526  break;
527  }
528 }

◆ G_TouchTriggers()

void G_TouchTriggers ( edict_t ent)

Definition at line 475 of file g_utils.c.

476 {
477  int i, num;
478  edict_t *touch[MAX_EDICTS], *hit;
479 
480  // dead things don't activate triggers!
481  if ((ent->client || (ent->svflags & SVF_MONSTER)) && (ent->health <= 0))
482  return;
483 
484  num = gi.BoxEdicts (ent->absmin, ent->absmax, touch
486 
487  // be careful, it is possible to have an entity in this
488  // list removed before we get to it (killtriggered)
489  for (i=0 ; i<num ; i++)
490  {
491  hit = touch[i];
492  if (!hit->inuse)
493  continue;
494  if (!hit->touch)
495  continue;
496  hit->touch (hit, ent, NULL, NULL);
497  }
498 }

Referenced by ClientThink(), SV_movestep(), SV_Physics_Step(), SV_Push(), SV_PushEntity(), and SV_StepDirection().

◆ G_UseTargets()

void G_UseTargets ( edict_t ent,
edict_t activator 
)

Definition at line 173 of file g_utils.c.

174 {
175  edict_t *t;
176 
177 //
178 // check for a delay
179 //
180  if (ent->delay)
181  {
182  // create a temp object to fire at a later time
183  t = G_Spawn();
184  t->classname = "DelayedUse";
185  t->nextthink = level.time + ent->delay;
186  t->think = Think_Delay;
187  t->activator = activator;
188  if (!activator)
189  gi.dprintf ("Think_Delay with no activator\n");
190  t->message = ent->message;
191  t->target = ent->target;
192  t->killtarget = ent->killtarget;
193  return;
194  }
195 
196 
197 //
198 // print the message
199 //
200  if ((ent->message) && !(activator->svflags & SVF_MONSTER))
201  {
202  gi.centerprintf (activator, "%s", ent->message);
203  if (ent->noise_index)
204  gi.sound (activator, CHAN_AUTO, ent->noise_index, 1, ATTN_NORM, 0);
205  else
206  gi.sound (activator, CHAN_AUTO, gi.soundindex ("misc/talk1.wav"), 1, ATTN_NORM, 0);
207  }
208 
209 //
210 // kill killtargets
211 //
212  if (ent->killtarget)
213  {
214  t = NULL;
215  while ((t = G_Find (t, FOFS(targetname), ent->killtarget)))
216  {
217  G_FreeEdict (t);
218  if (!ent->inuse)
219  {
220  gi.dprintf("entity was removed while using killtargets\n");
221  return;
222  }
223  }
224  }
225 
226 //
227 // fire targets
228 //
229  if (ent->target)
230  {
231  t = NULL;
232  while ((t = G_Find (t, FOFS(targetname), ent->target)))
233  {
234  // doors fire area portals in a specific way
235  if (!Q_stricmp(t->classname, "func_areaportal") &&
236  (!Q_stricmp(ent->classname, "func_door") || !Q_stricmp(ent->classname, "func_door_rotating")))
237  continue;
238 
239  if (t == ent)
240  {
241  gi.dprintf ("WARNING: Entity used itself.\n");
242  }
243  else
244  {
245  if (t->use)
246  t->use (t, ent, activator);
247  }
248  if (!ent->inuse)
249  {
250  gi.dprintf("entity was removed while using targets\n");
251  return;
252  }
253  }
254  }
255 }

Referenced by button_wait(), door_go_up(), func_clock_think(), func_explosive_explode(), func_timer_think(), misc_viper_bomb_touch(), monster_death_use(), multi_trigger(), path_corner_touch(), point_combat_touch(), SP_trigger_always(), target_actor_touch(), target_crosslevel_target_think(), target_explosion_explode(), Think_Delay(), Touch_Item(), train_wait(), trigger_key_use(), trigger_relay_use(), use_target_goal(), and use_target_secret().

◆ GetChaseTarget()

void GetChaseTarget ( edict_t ent)

Definition at line 159 of file g_chase.c.

160 {
161  int i;
162  edict_t *other;
163 
164  for (i = 1; i <= maxclients->value; i++) {
165  other = g_edicts + i;
166  if (other->inuse && !other->client->resp.spectator) {
167  ent->client->chase_target = other;
168  ent->client->update_chase = true;
169  UpdateChaseCam(ent);
170  return;
171  }
172  }
173  gi.centerprintf(ent, "No other players to chase.");
174 }

Referenced by ClientThink().

◆ GetItemByIndex()

gitem_t* GetItemByIndex ( int  index)

Definition at line 62 of file g_items.c.

63 {
64  if (index == 0 || index >= game.num_items)
65  return NULL;
66 
67  return &itemlist[index];
68 }

Referenced by CheckArmor(), and G_SetStats().

◆ infront()

qboolean infront ( edict_t self,
edict_t other 
)

Definition at line 312 of file g_ai.c.

313 {
314  vec3_t vec;
315  float dot;
316  vec3_t forward;
317 
318  AngleVectors (self->s.angles, forward, NULL, NULL);
319  VectorSubtract (other->s.origin, self->s.origin, vec);
320  VectorNormalize (vec);
321  dot = DotProduct (vec, forward);
322 
323  if (dot > 0.3)
324  return true;
325  return false;
326 }

◆ InitBodyQue()

void InitBodyQue ( void  )

Definition at line 918 of file p_client.c.

919 {
920  int i;
921  edict_t *ent;
922 
923  level.body_que = 0;
924  for (i=0; i<BODY_QUEUE_SIZE ; i++)
925  {
926  ent = G_Spawn();
927  ent->classname = "bodyque";
928  }
929 }

Referenced by SP_worldspawn().

◆ InitClientPersistant()

void InitClientPersistant ( gclient_t client)

Definition at line 607 of file p_client.c.

608 {
609  gitem_t *item;
610 
611  memset (&client->pers, 0, sizeof(client->pers));
612 
613  item = FindItem("Blaster");
614  client->pers.selected_item = ITEM_INDEX(item);
615  client->pers.inventory[client->pers.selected_item] = 1;
616 
617  client->pers.weapon = item;
618 
619  client->pers.health = 100;
620  client->pers.max_health = 100;
621 
622  client->pers.max_bullets = 200;
623  client->pers.max_shells = 100;
624  client->pers.max_rockets = 50;
625  client->pers.max_grenades = 50;
626  client->pers.max_cells = 200;
627  client->pers.max_slugs = 50;
628 
629  client->pers.connected = true;
630 }

Referenced by ClientConnect(), and PutClientInServer().

◆ InitClientResp()

void InitClientResp ( gclient_t client)

Definition at line 633 of file p_client.c.

634 {
635  memset (&client->resp, 0, sizeof(client->resp));
636  client->resp.enterframe = level.framenum;
637  client->resp.coop_respawn = client->pers;
638 }

Referenced by ClientBegin(), ClientBeginDeathmatch(), and ClientConnect().

◆ InitItems()

void InitItems ( void  )

Definition at line 2186 of file g_items.c.

2187 {
2188  game.num_items = sizeof(itemlist)/sizeof(itemlist[0]) - 1;
2189 }

Referenced by InitGame().

◆ KillBox()

qboolean KillBox ( edict_t ent)

Definition at line 549 of file g_utils.c.

550 {
551  trace_t tr;
552 
553  while (1)
554  {
555  tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, ent->s.origin, NULL, MASK_PLAYERSOLID);
556  if (!tr.ent)
557  break;
558 
559  // nail it
560  T_Damage (tr.ent, ent, ent, vec3_origin, ent->s.origin, vec3_origin, 100000, 0, DAMAGE_NO_PROTECTION, MOD_TELEFRAG);
561 
562  // if we didn't kill it, fail
563  if (tr.ent->solid)
564  return false;
565  }
566 
567  return true; // all clear
568 }

Referenced by func_explosive_spawn(), func_object_use(), func_wall_use(), monster_triggered_spawn(), PutClientInServer(), teleporter_touch(), use_killbox(), and use_target_spawner().

◆ M_CatagorizePosition()

void M_CatagorizePosition ( edict_t ent)

Definition at line 183 of file g_monster.c.

184 {
185  vec3_t point;
186  int cont;
187 
188 //
189 // get waterlevel
190 //
191  point[0] = ent->s.origin[0];
192  point[1] = ent->s.origin[1];
193  point[2] = ent->s.origin[2] + ent->mins[2] + 1;
194  cont = gi.pointcontents (point);
195 
196  if (!(cont & MASK_WATER))
197  {
198  ent->waterlevel = 0;
199  ent->watertype = 0;
200  return;
201  }
202 
203  ent->watertype = cont;
204  ent->waterlevel = 1;
205  point[2] += 26;
206  cont = gi.pointcontents (point);
207  if (!(cont & MASK_WATER))
208  return;
209 
210  ent->waterlevel = 2;
211  point[2] += 22;
212  cont = gi.pointcontents (point);
213  if (cont & MASK_WATER)
214  ent->waterlevel = 3;
215 }

Referenced by M_droptofloor(), and monster_think().

◆ M_ChangeYaw()

void M_ChangeYaw ( edict_t ent)

Definition at line 304 of file m_move.c.

305 {
306  float ideal;
307  float current;
308  float move;
309  float speed;
310 
311  current = anglemod(ent->s.angles[YAW]);
312  ideal = ent->ideal_yaw;
313 
314  if (current == ideal)
315  return;
316 
317  move = ideal - current;
318  speed = ent->yaw_speed;
319  if (ideal > current)
320  {
321  if (move >= 180)
322  move = move - 360;
323  }
324  else
325  {
326  if (move <= -180)
327  move = move + 360;
328  }
329  if (move > 0)
330  {
331  if (move > speed)
332  move = speed;
333  }
334  else
335  {
336  if (move < -speed)
337  move = -speed;
338  }
339 
340  ent->s.angles[YAW] = anglemod (current + move);
341 }

Referenced by ai_charge(), ai_run_melee(), ai_run_missile(), ai_run_slide(), ai_stand(), ai_turn(), FindTarget(), and SV_StepDirection().

◆ M_CheckAttack()

qboolean M_CheckAttack ( edict_t self)

Definition at line 607 of file g_ai.c.

608 {
609  vec3_t spot1, spot2;
610  float chance;
611  trace_t tr;
612 
613  if (self->enemy->health > 0)
614  {
615  // see if any entities are in the way of the shot
616  VectorCopy (self->s.origin, spot1);
617  spot1[2] += self->viewheight;
618  VectorCopy (self->enemy->s.origin, spot2);
619  spot2[2] += self->enemy->viewheight;
620 
622 
623  // do we have a clear shot?
624  if (tr.ent != self->enemy)
625  return false;
626  }
627 
628  // melee attack
629  if (enemy_range == RANGE_MELEE)
630  {
631  // don't always melee in easy mode
632  if (skill->value == 0 && (rand()&3) )
633  return false;
634  if (self->monsterinfo.melee)
635  self->monsterinfo.attack_state = AS_MELEE;
636  else
637  self->monsterinfo.attack_state = AS_MISSILE;
638  return true;
639  }
640 
641 // missile attack
642  if (!self->monsterinfo.attack)
643  return false;
644 
645  if (level.time < self->monsterinfo.attack_finished)
646  return false;
647 
648  if (enemy_range == RANGE_FAR)
649  return false;
650 
651  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
652  {
653  chance = 0.4;
654  }
655  else if (enemy_range == RANGE_MELEE)
656  {
657  chance = 0.2;
658  }
659  else if (enemy_range == RANGE_NEAR)
660  {
661  chance = 0.1;
662  }
663  else if (enemy_range == RANGE_MID)
664  {
665  chance = 0.02;
666  }
667  else
668  {
669  return false;
670  }
671 
672  if (skill->value == 0)
673  chance *= 0.5;
674  else if (skill->value >= 2)
675  chance *= 2;
676 
677  if (random () < chance)
678  {
679  self->monsterinfo.attack_state = AS_MISSILE;
680  self->monsterinfo.attack_finished = level.time + 2*random();
681  return true;
682  }
683 
684  if (self->flags & FL_FLY)
685  {
686  if (random() < 0.3)
687  self->monsterinfo.attack_state = AS_SLIDING;
688  else
689  self->monsterinfo.attack_state = AS_STRAIGHT;
690  }
691 
692  return false;
693 }

Referenced by medic_checkattack(), and monster_start().

◆ M_CheckBottom()

qboolean M_CheckBottom ( edict_t ent)

Definition at line 37 of file m_move.c.

38 {
39  vec3_t mins, maxs, start, stop;
40  trace_t trace;
41  int x, y;
42  float mid, bottom;
43 
44  VectorAdd (ent->s.origin, ent->mins, mins);
45  VectorAdd (ent->s.origin, ent->maxs, maxs);
46 
47 // if all of the points under the corners are solid world, don't bother
48 // with the tougher checks
49 // the corners must be within 16 of the midpoint
50  start[2] = mins[2] - 1;
51  for (x=0 ; x<=1 ; x++)
52  for (y=0 ; y<=1 ; y++)
53  {
54  start[0] = x ? maxs[0] : mins[0];
55  start[1] = y ? maxs[1] : mins[1];
56  if (gi.pointcontents (start) != CONTENTS_SOLID)
57  goto realcheck;
58  }
59 
60  c_yes++;
61  return true; // we got out easy
62 
63 realcheck:
64  c_no++;
65 //
66 // check it for real...
67 //
68  start[2] = mins[2];
69 
70 // the midpoint must be within 16 of the bottom
71  start[0] = stop[0] = (mins[0] + maxs[0])*0.5;
72  start[1] = stop[1] = (mins[1] + maxs[1])*0.5;
73  stop[2] = start[2] - 2*STEPSIZE;
74  trace = gi.trace (start, vec3_origin, vec3_origin, stop, ent, MASK_MONSTERSOLID);
75 
76  if (trace.fraction == 1.0)
77  return false;
78  mid = bottom = trace.endpos[2];
79 
80 // the corners must be within 16 of the midpoint
81  for (x=0 ; x<=1 ; x++)
82  for (y=0 ; y<=1 ; y++)
83  {
84  start[0] = stop[0] = x ? maxs[0] : mins[0];
85  start[1] = stop[1] = y ? maxs[1] : mins[1];
86 
87  trace = gi.trace (start, vec3_origin, vec3_origin, stop, ent, MASK_MONSTERSOLID);
88 
89  if (trace.fraction != 1.0 && trace.endpos[2] > bottom)
90  bottom = trace.endpos[2];
91  if (trace.fraction == 1.0 || mid - trace.endpos[2] > STEPSIZE)
92  return false;
93  }
94 
95  c_yes++;
96  return true;
97 }

Referenced by mutant_jump_touch(), SV_movestep(), SV_NewChaseDir(), and SV_Physics_Step().

◆ M_CheckGround()

void M_CheckGround ( edict_t ent)

Definition at line 141 of file g_monster.c.

142 {
143  vec3_t point;
144  trace_t trace;
145 
146  if (ent->flags & (FL_SWIM|FL_FLY))
147  return;
148 
149  if (ent->velocity[2] > 100)
150  {
151  ent->groundentity = NULL;
152  return;
153  }
154 
155 // if the hull point one-quarter unit down is solid the entity is on ground
156  point[0] = ent->s.origin[0];
157  point[1] = ent->s.origin[1];
158  point[2] = ent->s.origin[2] - 0.25;
159 
160  trace = gi.trace (ent->s.origin, ent->mins, ent->maxs, point, ent, MASK_MONSTERSOLID);
161 
162  // check steepness
163  if ( trace.plane.normal[2] < 0.7 && !trace.startsolid)
164  {
165  ent->groundentity = NULL;
166  return;
167  }
168 
169 // ent->groundentity = trace.ent;
170 // ent->groundentity_linkcount = trace.ent->linkcount;
171 // if (!trace.startsolid && !trace.allsolid)
172 // VectorCopy (trace.endpos, ent->s.origin);
173  if (!trace.startsolid && !trace.allsolid)
174  {
175  VectorCopy (trace.endpos, ent->s.origin);
176  ent->groundentity = trace.ent;
177  ent->groundentity_linkcount = trace.ent->linkcount;
178  ent->velocity[2] = 0;
179  }
180 }

Referenced by G_RunFrame(), M_droptofloor(), monster_think(), and SV_Physics_Step().

◆ M_droptofloor()

void M_droptofloor ( edict_t ent)

Definition at line 310 of file g_monster.c.

311 {
312  vec3_t end;
313  trace_t trace;
314 
315  ent->s.origin[2] += 1;
316  VectorCopy (ent->s.origin, end);
317  end[2] -= 256;
318 
319  trace = gi.trace (ent->s.origin, ent->mins, ent->maxs, end, ent, MASK_MONSTERSOLID);
320 
321  if (trace.fraction == 1 || trace.allsolid)
322  return;
323 
324  VectorCopy (trace.endpos, ent->s.origin);
325 
326  gi.linkentity (ent);
327  M_CheckGround (ent);
328  M_CatagorizePosition (ent);
329 }

Referenced by SP_misc_explobox(), and walkmonster_start_go().

◆ M_FlyCheck()

void M_FlyCheck ( edict_t self)

Definition at line 123 of file g_monster.c.

124 {
125  if (self->waterlevel)
126  return;
127 
128  if (random() > 0.5)
129  return;
130 
131  self->think = M_FliesOn;
132  self->nextthink = level.time + 5 + 10 * random();
133 }

Referenced by infantry_dead(), and mutant_dead().

◆ M_MoveToGoal()

void M_MoveToGoal ( edict_t ent,
float  dist 
)

Definition at line 515 of file m_move.c.

516 {
517  edict_t *goal;
518 
519  goal = ent->goalentity;
520 
521  if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
522  return;
523 
524 // if the next step hits the enemy, return immediately
525  if (ent->enemy && SV_CloseEnough (ent, ent->enemy, dist) )
526  return;
527 
528 // bump around...
529  if ( (rand()&3)==1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
530  {
531  if (ent->inuse)
532  SV_NewChaseDir (ent, goal, dist);
533  }
534 }

Referenced by ai_run(), and ai_walk().

◆ M_walkmove()

qboolean M_walkmove ( edict_t ent,
float  yaw,
float  dist 
)

Definition at line 542 of file m_move.c.

543 {
544  vec3_t move;
545 
546  if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
547  return false;
548 
549  yaw = yaw*M_PI*2 / 360;
550 
551  move[0] = cos(yaw)*dist;
552  move[1] = sin(yaw)*dist;
553  move[2] = 0;
554 
555  return SV_movestep(ent, move, true);
556 }

Referenced by ai_charge(), ai_move(), ai_run_slide(), ai_stand(), ai_turn(), barrel_touch(), flymonster_start_go(), and walkmonster_start_go().

◆ monster_death_use()

void monster_death_use ( edict_t self)

Definition at line 511 of file g_monster.c.

512 {
513  self->flags &= ~(FL_FLY|FL_SWIM);
514  self->monsterinfo.aiflags &= AI_GOOD_GUY;
515 
516  if (self->item)
517  {
518  Drop_Item (self, self->item);
519  self->item = NULL;
520  }
521 
522  if (self->deathtarget)
523  self->target = self->deathtarget;
524 
525  if (!self->target)
526  return;
527 
528  G_UseTargets (self, self->enemy);
529 }

Referenced by Killed().

◆ monster_fire_bfg()

void monster_fire_bfg ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  speed,
int  kick,
float  damage_radius,
int  flashtype 
)

Definition at line 91 of file g_monster.c.

92 {
93  fire_bfg (self, start, aimdir, damage, speed, damage_radius);
94 
96  gi.WriteShort (self - g_edicts);
97  gi.WriteByte (flashtype);
98  gi.multicast (start, MULTICAST_PVS);
99 }

Referenced by jorgBFG(), and makronBFG().

◆ monster_fire_blaster()

void monster_fire_blaster ( edict_t self,
vec3_t  start,
vec3_t  dir,
int  damage,
int  speed,
int  flashtype,
int  effect 
)

Definition at line 51 of file g_monster.c.

52 {
53  fire_blaster (self, start, dir, damage, speed, effect, false);
54 
56  gi.WriteShort (self - g_edicts);
57  gi.WriteByte (flashtype);
58  gi.multicast (start, MULTICAST_PVS);
59 }

Referenced by floater_fire_blaster(), flyer_fire(), hover_fire_blaster(), MakronHyperblaster(), medic_fire_blaster(), soldier_fire(), and TankBlaster().

◆ monster_fire_bullet()

void monster_fire_bullet ( edict_t self,
vec3_t  start,
vec3_t  dir,
int  damage,
int  kick,
int  hspread,
int  vspread,
int  flashtype 
)

Definition at line 31 of file g_monster.c.

32 {
33  fire_bullet (self, start, dir, damage, kick, hspread, vspread, MOD_UNKNOWN);
34 
36  gi.WriteShort (self - g_edicts);
37  gi.WriteByte (flashtype);
38  gi.multicast (start, MULTICAST_PVS);
39 }

Referenced by actorMachineGun(), boss2_firebullet_left(), boss2_firebullet_right(), GunnerFire(), InfantryMachineGun(), jorg_firebullet_left(), jorg_firebullet_right(), soldier_fire(), supertankMachineGun(), and TankMachineGun().

◆ monster_fire_grenade()

void monster_fire_grenade ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  speed,
int  flashtype 
)

Definition at line 61 of file g_monster.c.

62 {
63  fire_grenade (self, start, aimdir, damage, speed, 2.5, damage+40);
64 
66  gi.WriteShort (self - g_edicts);
67  gi.WriteByte (flashtype);
68  gi.multicast (start, MULTICAST_PVS);
69 }

Referenced by GunnerGrenade().

◆ monster_fire_railgun()

void monster_fire_railgun ( edict_t self,
vec3_t  start,
vec3_t  aimdir,
int  damage,
int  kick,
int  flashtype 
)

Definition at line 81 of file g_monster.c.

82 {
83  fire_rail (self, start, aimdir, damage, kick);
84 
86  gi.WriteShort (self - g_edicts);
87  gi.WriteByte (flashtype);
88  gi.multicast (start, MULTICAST_PVS);
89 }

Referenced by GladiatorGun(), and MakronRailgun().

◆ monster_fire_rocket()

void monster_fire_rocket ( edict_t self,
vec3_t  start,
vec3_t  dir,
int  damage,
int  speed,
int  flashtype 
)

Definition at line 71 of file g_monster.c.

72 {
73  fire_rocket (self, start, dir, damage, speed, damage+20, damage);
74 
76  gi.WriteShort (self - g_edicts);
77  gi.WriteByte (flashtype);
78  gi.multicast (start, MULTICAST_PVS);
79 }

Referenced by Boss2Rocket(), ChickRocket(), supertankRocket(), and TankRocket().

◆ monster_fire_shotgun()

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 
)

Definition at line 41 of file g_monster.c.

42 {
43  fire_shotgun (self, start, aimdir, damage, kick, hspread, vspread, count, MOD_UNKNOWN);
44 
46  gi.WriteShort (self - g_edicts);
47  gi.WriteByte (flashtype);
48  gi.multicast (start, MULTICAST_PVS);
49 }

Referenced by soldier_fire().

◆ monster_think()

void monster_think ( edict_t self)

Definition at line 419 of file g_monster.c.

420 {
421  M_MoveFrame (self);
422  if (self->linkcount != self->monsterinfo.linkcount)
423  {
424  self->monsterinfo.linkcount = self->linkcount;
425  M_CheckGround (self);
426  }
427  M_CatagorizePosition (self);
428  M_WorldEffects (self);
429  M_SetEffects (self);
430 }

Referenced by monster_start_go().

◆ MoveClientToIntermission()

void MoveClientToIntermission ( edict_t client)

Definition at line 33 of file p_hud.c.

34 {
35  if (deathmatch->value || coop->value)
36  ent->client->showscores = true;
37  VectorCopy (level.intermission_origin, ent->s.origin);
38  ent->client->ps.pmove.origin[0] = level.intermission_origin[0]*8;
39  ent->client->ps.pmove.origin[1] = level.intermission_origin[1]*8;
40  ent->client->ps.pmove.origin[2] = level.intermission_origin[2]*8;
41  VectorCopy (level.intermission_angle, ent->client->ps.viewangles);
42  ent->client->ps.pmove.pm_type = PM_FREEZE;
43  ent->client->ps.gunindex = 0;
44  ent->client->ps.blend[3] = 0;
45  ent->client->ps.rdflags &= ~RDF_UNDERWATER;
46 
47  // clean up powerup info
48  ent->client->quad_framenum = 0;
49  ent->client->invincible_framenum = 0;
50  ent->client->breather_framenum = 0;
51  ent->client->enviro_framenum = 0;
52  ent->client->grenade_blew_up = false;
53  ent->client->grenade_time = 0;
54 
55  ent->viewheight = 0;
56  ent->s.modelindex = 0;
57  ent->s.modelindex2 = 0;
58  ent->s.modelindex3 = 0;
59  ent->s.modelindex = 0;
60  ent->s.effects = 0;
61  ent->s.sound = 0;
62  ent->solid = SOLID_NOT;
63 
64  // add the layout
65 
66  if (deathmatch->value || coop->value)
67  {
69  gi.unicast (ent, true);
70  }
71 
72 }

Referenced by BeginIntermission(), ClientBegin(), and ClientBeginDeathmatch().

◆ OnSameTeam()

qboolean OnSameTeam ( edict_t ent1,
edict_t ent2 
)

Definition at line 49 of file g_cmds.c.

50 {
51  char ent1Team [512];
52  char ent2Team [512];
53 
54  if (!((int)(dmflags->value) & (DF_MODELTEAMS | DF_SKINTEAMS)))
55  return false;
56 
57  strcpy (ent1Team, ClientTeam (ent1));
58  strcpy (ent2Team, ClientTeam (ent2));
59 
60  if (strcmp(ent1Team, ent2Team) == 0)
61  return true;
62  return false;
63 }

Referenced by Cmd_Say_f(), and T_Damage().

◆ player_die()

void player_die ( edict_t self,
edict_t inflictor,
edict_t attacker,
int  damage,
vec3_t  point 
)

Definition at line 501 of file p_client.c.

502 {
503  int n;
504 
505  VectorClear (self->avelocity);
506 
507  self->takedamage = DAMAGE_YES;
508  self->movetype = MOVETYPE_TOSS;
509 
510  self->s.modelindex2 = 0; // remove linked weapon model
511 
512  self->s.angles[0] = 0;
513  self->s.angles[2] = 0;
514 
515  self->s.sound = 0;
516  self->client->weapon_sound = 0;
517 
518  self->maxs[2] = -8;
519 
520 // self->solid = SOLID_NOT;
521  self->svflags |= SVF_DEADMONSTER;
522 
523  if (!self->deadflag)
524  {
525  self->client->respawn_time = level.time + 1.0;
526  LookAtKiller (self, inflictor, attacker);
527  self->client->ps.pmove.pm_type = PM_DEAD;
528  ClientObituary (self, inflictor, attacker);
529  TossClientWeapon (self);
530  if (deathmatch->value)
531  Cmd_Help_f (self); // show scores
532 
533  // clear inventory
534  // this is kind of ugly, but it's how we want to handle keys in coop
535  for (n = 0; n < game.num_items; n++)
536  {
537  if (coop->value && itemlist[n].flags & IT_KEY)
538  self->client->resp.coop_respawn.inventory[n] = self->client->pers.inventory[n];
539  self->client->pers.inventory[n] = 0;
540  }
541  }
542 
543  // remove powerups
544  self->client->quad_framenum = 0;
545  self->client->invincible_framenum = 0;
546  self->client->breather_framenum = 0;
547  self->client->enviro_framenum = 0;
548  self->flags &= ~FL_POWER_ARMOR;
549 
550  if (self->health < -40)
551  { // gib
552  gi.sound (self, CHAN_BODY, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
553  for (n= 0; n < 4; n++)
554  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
555  ThrowClientHead (self, damage);
556 
557  self->takedamage = DAMAGE_NO;
558  }
559  else
560  { // normal death
561  if (!self->deadflag)
562  {
563  static int i;
564 
565  i = (i+1)%3;
566  // start a death animation
567  self->client->anim_priority = ANIM_DEATH;
568  if (self->client->ps.pmove.pm_flags & PMF_DUCKED)
569  {
570  self->s.frame = FRAME_crdeath1-1;
571  self->client->anim_end = FRAME_crdeath5;
572  }
573  else switch (i)
574  {
575  case 0:
576  self->s.frame = FRAME_death101-1;
577  self->client->anim_end = FRAME_death106;
578  break;
579  case 1:
580  self->s.frame = FRAME_death201-1;
581  self->client->anim_end = FRAME_death206;
582  break;
583  case 2:
584  self->s.frame = FRAME_death301-1;
585  self->client->anim_end = FRAME_death308;
586  break;
587  }
588  gi.sound (self, CHAN_VOICE, gi.soundindex(va("*death%i.wav", (rand()%4)+1)), 1, ATTN_NORM, 0);
589  }
590  }
591 
592  self->deadflag = DEAD_DEAD;
593 
594  gi.linkentity (self);
595 }

Referenced by Cmd_Kill_f(), and PutClientInServer().

◆ player_pain()

void player_pain ( edict_t self,
edict_t other,
float  kick,
int  damage 
)

Definition at line 179 of file p_client.c.

180 {
181  // player pain is handled at the end of the frame in P_DamageFeedback
182 }

Referenced by PutClientInServer().

◆ PlayerNoise()

void PlayerNoise ( edict_t who,
vec3_t  where,
int  type 
)

Definition at line 58 of file p_weapon.c.

59 {
60  edict_t *noise;
61 
62  if (type == PNOISE_WEAPON)
63  {
64  if (who->client->silencer_shots)
65  {
66  who->client->silencer_shots--;
67  return;
68  }
69  }
70 
71  if (deathmatch->value)
72  return;
73 
74  if (who->flags & FL_NOTARGET)
75  return;
76 
77 
78  if (!who->mynoise)
79  {
80  noise = G_Spawn();
81  noise->classname = "player_noise";
82  VectorSet (noise->mins, -8, -8, -8);
83  VectorSet (noise->maxs, 8, 8, 8);
84  noise->owner = who;
85  noise->svflags = SVF_NOCLIENT;
86  who->mynoise = noise;
87 
88  noise = G_Spawn();
89  noise->classname = "player_noise";
90  VectorSet (noise->mins, -8, -8, -8);
91  VectorSet (noise->maxs, 8, 8, 8);
92  noise->owner = who;
93  noise->svflags = SVF_NOCLIENT;
94  who->mynoise2 = noise;
95  }
96 
97  if (type == PNOISE_SELF || type == PNOISE_WEAPON)
98  {
99  noise = who->mynoise;
100  level.sound_entity = noise;
101  level.sound_entity_framenum = level.framenum;
102  }
103  else // type == PNOISE_IMPACT
104  {
105  noise = who->mynoise2;
106  level.sound2_entity = noise;
107  level.sound2_entity_framenum = level.framenum;
108  }
109 
110  VectorCopy (where, noise->s.origin);
111  VectorSubtract (where, noise->maxs, noise->absmin);
112  VectorAdd (where, noise->maxs, noise->absmax);
113  noise->teleport_time = level.time;
114  gi.linkentity (noise);
115 }

Referenced by bfg_touch(), Blaster_Fire(), blaster_touch(), Chaingun_Fire(), ClientThink(), fire_lead(), fire_rail(), Grenade_Explode(), Machinegun_Fire(), P_WorldEffects(), rocket_touch(), weapon_bfg_fire(), weapon_grenadelauncher_fire(), weapon_railgun_fire(), Weapon_RocketLauncher_Fire(), weapon_shotgun_fire(), and weapon_supershotgun_fire().

◆ PlayerTrail_Add()

void PlayerTrail_Add ( vec3_t  spot)

Definition at line 67 of file p_trail.c.

68 {
69  vec3_t temp;
70 
71  if (!trail_active)
72  return;
73 
74  VectorCopy (spot, trail[trail_head]->s.origin);
75 
77 
78  VectorSubtract (spot, trail[PREV(trail_head)]->s.origin, temp);
79  trail[trail_head]->s.angles[1] = vectoyaw (temp);
80 
82 }

Referenced by ClientBeginServerFrame(), and PlayerTrail_New().

◆ PlayerTrail_Init()

void PlayerTrail_Init ( void  )

Definition at line 49 of file p_trail.c.

50 {
51  int n;
52 
53  if (deathmatch->value /* FIXME || coop */)
54  return;
55 
56  for (n = 0; n < TRAIL_LENGTH; n++)
57  {
58  trail[n] = G_Spawn();
59  trail[n]->classname = "player_trail";
60  }
61 
62  trail_head = 0;
63  trail_active = true;
64 }

Referenced by PlayerTrail_New(), and SpawnEntities().

◆ PlayerTrail_LastSpot()

edict_t* PlayerTrail_LastSpot ( void  )

Definition at line 143 of file p_trail.c.

144 {
145  return trail[PREV(trail_head)];
146 }

Referenced by ClientBeginServerFrame().

◆ PlayerTrail_New()

void PlayerTrail_New ( vec3_t  spot)

Definition at line 85 of file p_trail.c.

86 {
87  if (!trail_active)
88  return;
89 
91  PlayerTrail_Add (spot);
92 }

◆ PlayerTrail_PickFirst()

edict_t* PlayerTrail_PickFirst ( edict_t self)

Definition at line 95 of file p_trail.c.

96 {
97  int marker;
98  int n;
99 
100  if (!trail_active)
101  return NULL;
102 
103  for (marker = trail_head, n = TRAIL_LENGTH; n; n--)
104  {
105  if(trail[marker]->timestamp <= self->monsterinfo.trail_time)
106  marker = NEXT(marker);
107  else
108  break;
109  }
110 
111  if (visible(self, trail[marker]))
112  {
113  return trail[marker];
114  }
115 
116  if (visible(self, trail[PREV(marker)]))
117  {
118  return trail[PREV(marker)];
119  }
120 
121  return trail[marker];
122 }

Referenced by ai_run().

◆ PlayerTrail_PickNext()

edict_t* PlayerTrail_PickNext ( edict_t self)

Definition at line 124 of file p_trail.c.

125 {
126  int marker;
127  int n;
128 
129  if (!trail_active)
130  return NULL;
131 
132  for (marker = trail_head, n = TRAIL_LENGTH; n; n--)
133  {
134  if(trail[marker]->timestamp <= self->monsterinfo.trail_time)
135  marker = NEXT(marker);
136  else
137  break;
138  }
139 
140  return trail[marker];
141 }

Referenced by ai_run().

◆ PowerArmorType()

int PowerArmorType ( edict_t ent)

Definition at line 688 of file g_items.c.

689 {
690  if (!ent->client)
691  return POWER_ARMOR_NONE;
692 
693  if (!(ent->flags & FL_POWER_ARMOR))
694  return POWER_ARMOR_NONE;
695 
696  if (ent->client->pers.inventory[power_shield_index] > 0)
697  return POWER_ARMOR_SHIELD;
698 
699  if (ent->client->pers.inventory[power_screen_index] > 0)
700  return POWER_ARMOR_SCREEN;
701 
702  return POWER_ARMOR_NONE;
703 }

Referenced by CheckPowerArmor(), G_SetClientEffects(), and G_SetStats().

◆ PrecacheItem()

void PrecacheItem ( gitem_t it)

Definition at line 993 of file g_items.c.

994 {
995  char *s, *start;
996  char data[MAX_QPATH];
997  int len;
998  gitem_t *ammo;
999 
1000  if (!it)
1001  return;
1002 
1003  if (it->pickup_sound)
1004  gi.soundindex (it->pickup_sound);
1005  if (it->world_model)
1006  gi.modelindex (it->world_model);
1007  if (it->view_model)
1008  gi.modelindex (it->view_model);
1009  if (it->icon)
1010  gi.imageindex (it->icon);
1011 
1012  // parse everything for its ammo
1013  if (it->ammo && it->ammo[0])
1014  {
1015  ammo = FindItem (it->ammo);
1016  if (ammo != it)
1017  PrecacheItem (ammo);
1018  }
1019 
1020  // parse the space seperated precache string for other items
1021  s = it->precaches;
1022  if (!s || !s[0])
1023  return;
1024 
1025  while (*s)
1026  {
1027  start = s;
1028  while (*s && *s != ' ')
1029  s++;
1030 
1031  len = s-start;
1032  if (len >= MAX_QPATH || len < 5)
1033  gi.error ("PrecacheItem: %s has bad precache string", it->classname);
1034  memcpy (data, start, len);
1035  data[len] = 0;
1036  if (*s)
1037  s++;
1038 
1039  // determine type based on extension
1040  if (!strcmp(data+len-3, "md2"))
1041  gi.modelindex (data);
1042  else if (!strcmp(data+len-3, "sp2"))
1043  gi.modelindex (data);
1044  else if (!strcmp(data+len-3, "wav"))
1045  gi.soundindex (data);
1046  if (!strcmp(data+len-3, "pcx"))
1047  gi.imageindex (data);
1048  }
1049 }

Referenced by PrecacheItem(), SP_worldspawn(), and SpawnItem().

◆ PutClientInServer()

void PutClientInServer ( edict_t ent)

Definition at line 1097 of file p_client.c.

1098 {
1099  vec3_t mins = {-16, -16, -24};
1100  vec3_t maxs = {16, 16, 32};
1101  int index;
1102  vec3_t spawn_origin, spawn_angles;
1103  gclient_t *client;
1104  int i;
1105  client_persistant_t saved;
1106  client_respawn_t resp;
1107 
1108  // find a spawn point
1109  // do it before setting health back up, so farthest
1110  // ranging doesn't count this client
1111  SelectSpawnPoint (ent, spawn_origin, spawn_angles);
1112 
1113  index = ent-g_edicts-1;
1114  client = ent->client;
1115 
1116  // deathmatch wipes most client data every spawn
1117  if (deathmatch->value)
1118  {
1119  char userinfo[MAX_INFO_STRING];
1120 
1121  resp = client->resp;
1122  memcpy (userinfo, client->pers.userinfo, sizeof(userinfo));
1123  InitClientPersistant (client);
1124  ClientUserinfoChanged (ent, userinfo);
1125  }
1126  else if (coop->value)
1127  {
1128 // int n;
1129  char userinfo[MAX_INFO_STRING];
1130 
1131  resp = client->resp;
1132  memcpy (userinfo, client->pers.userinfo, sizeof(userinfo));
1133  // this is kind of ugly, but it's how we want to handle keys in coop
1134 // for (n = 0; n < game.num_items; n++)
1135 // {
1136 // if (itemlist[n].flags & IT_KEY)
1137 // resp.coop_respawn.inventory[n] = client->pers.inventory[n];
1138 // }
1140  resp.coop_respawn.helpchanged = client->pers.helpchanged;
1141  client->pers = resp.coop_respawn;
1142  ClientUserinfoChanged (ent, userinfo);
1143  if (resp.score > client->pers.score)
1144  client->pers.score = resp.score;
1145  }
1146  else
1147  {
1148  memset (&resp, 0, sizeof(resp));
1149  }
1150 
1151  // clear everything but the persistant data
1152  saved = client->pers;
1153  memset (client, 0, sizeof(*client));
1154  client->pers = saved;
1155  if (client->pers.health <= 0)
1156  InitClientPersistant(client);
1157  client->resp = resp;
1158 
1159  // copy some data from the client to the entity
1160  FetchClientEntData (ent);
1161 
1162  // clear entity values
1163  ent->groundentity = NULL;
1164  ent->client = &game.clients[index];
1165  ent->takedamage = DAMAGE_AIM;
1166  ent->movetype = MOVETYPE_WALK;
1167  ent->viewheight = 22;
1168  ent->inuse = true;
1169  ent->classname = "player";
1170  ent->mass = 200;
1171  ent->solid = SOLID_BBOX;
1172  ent->deadflag = DEAD_NO;
1173  ent->air_finished = level.time + 12;
1174  ent->clipmask = MASK_PLAYERSOLID;
1175  ent->model = "players/male/tris.md2";
1176  ent->pain = player_pain;
1177  ent->die = player_die;
1178  ent->waterlevel = 0;
1179  ent->watertype = 0;
1180  ent->flags &= ~FL_NO_KNOCKBACK;
1181  ent->svflags &= ~SVF_DEADMONSTER;
1182 
1183  VectorCopy (mins, ent->mins);
1184  VectorCopy (maxs, ent->maxs);
1185  VectorClear (ent->velocity);
1186 
1187  // clear playerstate values
1188  memset (&ent->client->ps, 0, sizeof(client->ps));
1189 
1190  client->ps.pmove.origin[0] = spawn_origin[0]*8;
1191  client->ps.pmove.origin[1] = spawn_origin[1]*8;
1192  client->ps.pmove.origin[2] = spawn_origin[2]*8;
1193 
1194  if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
1195  {
1196  client->ps.fov = 90;
1197  }
1198  else
1199  {
1200  client->ps.fov = atoi(Info_ValueForKey(client->pers.userinfo, "fov"));
1201  if (client->ps.fov < 1)
1202  client->ps.fov = 90;
1203  else if (client->ps.fov > 160)
1204  client->ps.fov = 160;
1205  }
1206 
1207  client->ps.gunindex = gi.modelindex(client->pers.weapon->view_model);
1208 
1209  // clear entity state values
1210  ent->s.effects = 0;
1211  ent->s.modelindex = 255; // will use the skin specified model
1212  ent->s.modelindex2 = 255; // custom gun model
1213  // sknum is player num and weapon number
1214  // weapon number will be added in changeweapon
1215  ent->s.skinnum = ent - g_edicts - 1;
1216 
1217  ent->s.frame = 0;
1218  VectorCopy (spawn_origin, ent->s.origin);
1219  ent->s.origin[2] += 1; // make sure off ground
1220  VectorCopy (ent->s.origin, ent->s.old_origin);
1221 
1222  // set the delta angle
1223  for (i=0 ; i<3 ; i++)
1224  {
1225  client->ps.pmove.delta_angles[i] = ANGLE2SHORT(spawn_angles[i] - client->resp.cmd_angles[i]);
1226  }
1227 
1228  ent->s.angles[PITCH] = 0;
1229  ent->s.angles[YAW] = spawn_angles[YAW];
1230  ent->s.angles[ROLL] = 0;
1231  VectorCopy (ent->s.angles, client->ps.viewangles);
1232  VectorCopy (ent->s.angles, client->v_angle);
1233 
1234  // spawn a spectator
1235  if (client->pers.spectator) {
1236  client->chase_target = NULL;
1237 
1238  client->resp.spectator = true;
1239 
1240  ent->movetype = MOVETYPE_NOCLIP;
1241  ent->solid = SOLID_NOT;
1242  ent->svflags |= SVF_NOCLIENT;
1243  ent->client->ps.gunindex = 0;
1244  gi.linkentity (ent);
1245  return;
1246  } else
1247  client->resp.spectator = false;
1248 
1249  if (!KillBox (ent))
1250  { // could't spawn in?
1251  }
1252 
1253  gi.linkentity (ent);
1254 
1255  // force the current weapon up
1256  client->newweapon = client->pers.weapon;
1257  ChangeWeapon (ent);
1258 }

Referenced by ClientBegin(), ClientBeginDeathmatch(), respawn(), and spectator_respawn().

◆ range()

int range ( edict_t self,
edict_t other 
)

Definition at line 264 of file g_ai.c.

265 {
266  vec3_t v;
267  float len;
268 
269  VectorSubtract (self->s.origin, other->s.origin, v);
270  len = VectorLength (v);
271  if (len < MELEE_DISTANCE)
272  return RANGE_MELEE;
273  if (len < 500)
274  return RANGE_NEAR;
275  if (len < 1000)
276  return RANGE_MID;
277  return RANGE_FAR;
278 }

Referenced by ai_checkattack(), and FindTarget().

◆ respawn()

void respawn ( edict_t ent)

Definition at line 980 of file p_client.c.

981 {
982  if (deathmatch->value || coop->value)
983  {
984  // spectator's don't leave bodies
985  if (self->movetype != MOVETYPE_NOCLIP)
986  CopyToBodyQue (self);
987  self->svflags &= ~SVF_NOCLIENT;
988  PutClientInServer (self);
989 
990  // add a teleportation effect
991  self->s.event = EV_PLAYER_TELEPORT;
992 
993  // hold in place briefly
994  self->client->ps.pmove.pm_flags = PMF_TIME_TELEPORT;
995  self->client->ps.pmove.pm_time = 14;
996 
997  self->client->respawn_time = level.time;
998 
999  return;
1000  }
1001 
1002  // restart the entire server
1003  gi.AddCommandString ("menu_loadgame\n");
1004 }

Referenced by BeginIntermission(), and ClientBeginServerFrame().

◆ SaveClientData()

void SaveClientData ( void  )

Definition at line 650 of file p_client.c.

651 {
652  int i;
653  edict_t *ent;
654 
655  for (i=0 ; i<game.maxclients ; i++)
656  {
657  ent = &g_edicts[1+i];
658  if (!ent->inuse)
659  continue;
660  game.clients[i].pers.health = ent->health;
663  if (coop->value)
664  game.clients[i].pers.score = ent->client->resp.score;
665  }
666 }

Referenced by SpawnEntities(), and WriteGame().

◆ ServerCommand()

void ServerCommand ( void  )

Definition at line 282 of file g_svcmds.c.

283 {
284  char *cmd;
285 
286  cmd = gi.argv(1);
287  if (Q_stricmp (cmd, "test") == 0)
288  Svcmd_Test_f ();
289  else if (Q_stricmp (cmd, "addip") == 0)
290  SVCmd_AddIP_f ();
291  else if (Q_stricmp (cmd, "removeip") == 0)
292  SVCmd_RemoveIP_f ();
293  else if (Q_stricmp (cmd, "listip") == 0)
294  SVCmd_ListIP_f ();
295  else if (Q_stricmp (cmd, "writeip") == 0)
296  SVCmd_WriteIP_f ();
297  else
298  gi.cprintf (NULL, PRINT_HIGH, "Unknown server command \"%s\"\n", cmd);
299 }

Referenced by GetGameAPI().

◆ SetItemNames()

void SetItemNames ( void  )

Definition at line 2200 of file g_items.c.

2201 {
2202  int i;
2203  gitem_t *it;
2204 
2205  for (i=0 ; i<game.num_items ; i++)
2206  {
2207  it = &itemlist[i];
2209  }
2210 
2211  jacket_armor_index = ITEM_INDEX(FindItem("Jacket Armor"));
2212  combat_armor_index = ITEM_INDEX(FindItem("Combat Armor"));
2213  body_armor_index = ITEM_INDEX(FindItem("Body Armor"));
2214  power_screen_index = ITEM_INDEX(FindItem("Power Screen"));
2215  power_shield_index = ITEM_INDEX(FindItem("Power Shield"));
2216 }

Referenced by SP_worldspawn().

◆ SetRespawn()

void SetRespawn ( edict_t ent,
float  delay 
)

Definition at line 146 of file g_items.c.

147 {
148  ent->flags |= FL_RESPAWN;
149  ent->svflags |= SVF_NOCLIENT;
150  ent->solid = SOLID_NOT;
151  ent->nextthink = level.time + delay;
152  ent->think = DoRespawn;
153  gi.linkentity (ent);
154 }

Referenced by MegaHealth_think(), Pickup_Adrenaline(), Pickup_Ammo(), Pickup_AncientHead(), Pickup_Armor(), Pickup_Bandolier(), Pickup_Health(), Pickup_Pack(), Pickup_PowerArmor(), Pickup_Powerup(), and Pickup_Weapon().

◆ SpawnItem()

void SpawnItem ( edict_t ent,
gitem_t item 
)

Definition at line 1061 of file g_items.c.

1062 {
1063  PrecacheItem (item);
1064 
1065  if (ent->spawnflags)
1066  {
1067  if (strcmp(ent->classname, "key_power_cube") != 0)
1068  {
1069  ent->spawnflags = 0;
1070  gi.dprintf("%s at %s has invalid spawnflags set\n", ent->classname, vtos(ent->s.origin));
1071  }
1072  }
1073 
1074  // some items will be prevented in deathmatch
1075  if (deathmatch->value)
1076  {
1077  if ( (int)dmflags->value & DF_NO_ARMOR )
1078  {
1079  if (item->pickup == Pickup_Armor || item->pickup == Pickup_PowerArmor)
1080  {
1081  G_FreeEdict (ent);
1082  return;
1083  }
1084  }
1085  if ( (int)dmflags->value & DF_NO_ITEMS )
1086  {
1087  if (item->pickup == Pickup_Powerup)
1088  {
1089  G_FreeEdict (ent);
1090  return;
1091  }
1092  }
1093  if ( (int)dmflags->value & DF_NO_HEALTH )
1094  {
1095  if (item->pickup == Pickup_Health || item->pickup == Pickup_Adrenaline || item->pickup == Pickup_AncientHead)
1096  {
1097  G_FreeEdict (ent);
1098  return;
1099  }
1100  }
1101  if ( (int)dmflags->value & DF_INFINITE_AMMO )
1102  {
1103  if ( (item->flags == IT_AMMO) || (strcmp(ent->classname, "weapon_bfg") == 0) )
1104  {
1105  G_FreeEdict (ent);
1106  return;
1107  }
1108  }
1109  }
1110 
1111  if (coop->value && (strcmp(ent->classname, "key_power_cube") == 0))
1112  {
1113  ent->spawnflags |= (1 << (8 + level.power_cubes));
1114  level.power_cubes++;
1115  }
1116 
1117  // don't let them drop items that stay in a coop game
1118  if ((coop->value) && (item->flags & IT_STAY_COOP))
1119  {
1120  item->drop = NULL;
1121  }
1122 
1123  ent->item = item;
1124  ent->nextthink = level.time + 2 * FRAMETIME; // items start after other solids
1125  ent->think = droptofloor;
1126  ent->s.effects = item->world_model_flags;
1127  ent->s.renderfx = RF_GLOW;
1128  if (ent->model)
1129  gi.modelindex (ent->model);
1130 }

Referenced by Cmd_Give_f(), ED_CallSpawn(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), and SP_item_health_small().

◆ SV_FilterPacket()

qboolean SV_FilterPacket ( char *  from)

Definition at line 123 of file g_svcmds.c.

124 {
125  int i;
126  unsigned in;
127  byte m[4];
128  char *p;
129 
130  i = 0;
131  p = from;
132  while (*p && i < 4) {
133  m[i] = 0;
134  while (*p >= '0' && *p <= '9') {
135  m[i] = m[i]*10 + (*p - '0');
136  p++;
137  }
138  if (!*p || *p == ':')
139  break;
140  i++, p++;
141  }
142 
143  in = *(unsigned *)m;
144 
145  for (i=0 ; i<numipfilters ; i++)
146  if ( (in & ipfilters[i].mask) == ipfilters[i].compare)
147  return (int)filterban->value;
148 
149  return (int)!filterban->value;
150 }

Referenced by ClientConnect().

◆ swimmonster_start()

void swimmonster_start ( edict_t self)

Definition at line 735 of file g_monster.c.

736 {
737  self->flags |= FL_SWIM;
738  self->think = swimmonster_start_go;
739  monster_start (self);
740 }

Referenced by SP_monster_flipper().

◆ T_Damage()

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 
)

Definition at line 377 of file g_combat.c.

378 {
379  gclient_t *client;
380  int take;
381  int save;
382  int asave;
383  int psave;
384  int te_sparks;
385 
386  if (!targ->takedamage)
387  return;
388 
389  // friendly fire avoidance
390  // if enabled you can't hurt teammates (but you can hurt yourself)
391  // knockback still occurs
392  if ((targ != attacker) && ((deathmatch->value && ((int)(dmflags->value) & (DF_MODELTEAMS | DF_SKINTEAMS))) || coop->value))
393  {
394  if (OnSameTeam (targ, attacker))
395  {
396  if ((int)(dmflags->value) & DF_NO_FRIENDLY_FIRE)
397  damage = 0;
398  else
399  mod |= MOD_FRIENDLY_FIRE;
400  }
401  }
402  meansOfDeath = mod;
403 
404  // easy mode takes half damage
405  if (skill->value == 0 && deathmatch->value == 0 && targ->client)
406  {
407  damage *= 0.5;
408  if (!damage)
409  damage = 1;
410  }
411 
412  client = targ->client;
413 
414  if (dflags & DAMAGE_BULLET)
415  te_sparks = TE_BULLET_SPARKS;
416  else
417  te_sparks = TE_SPARKS;
418 
419  VectorNormalize(dir);
420 
421 // bonus damage for suprising a monster
422  if (!(dflags & DAMAGE_RADIUS) && (targ->svflags & SVF_MONSTER) && (attacker->client) && (!targ->enemy) && (targ->health > 0))
423  damage *= 2;
424 
425  if (targ->flags & FL_NO_KNOCKBACK)
426  knockback = 0;
427 
428 // figure momentum add
429  if (!(dflags & DAMAGE_NO_KNOCKBACK))
430  {
431  if ((knockback) && (targ->movetype != MOVETYPE_NONE) && (targ->movetype != MOVETYPE_BOUNCE) && (targ->movetype != MOVETYPE_PUSH) && (targ->movetype != MOVETYPE_STOP))
432  {
433  vec3_t kvel;
434  float mass;
435 
436  if (targ->mass < 50)
437  mass = 50;
438  else
439  mass = targ->mass;
440 
441  if (targ->client && attacker == targ)
442  VectorScale (dir, 1600.0 * (float)knockback / mass, kvel); // the rocket jump hack...
443  else
444  VectorScale (dir, 500.0 * (float)knockback / mass, kvel);
445 
446  VectorAdd (targ->velocity, kvel, targ->velocity);
447  }
448  }
449 
450  take = damage;
451  save = 0;
452 
453  // check for godmode
454  if ( (targ->flags & FL_GODMODE) && !(dflags & DAMAGE_NO_PROTECTION) )
455  {
456  take = 0;
457  save = damage;
458  SpawnDamage (te_sparks, point, normal, save);
459  }
460 
461  // check for invincibility
462  if ((client && client->invincible_framenum > level.framenum ) && !(dflags & DAMAGE_NO_PROTECTION))
463  {
464  if (targ->pain_debounce_time < level.time)
465  {
466  gi.sound(targ, CHAN_ITEM, gi.soundindex("items/protect4.wav"), 1, ATTN_NORM, 0);
467  targ->pain_debounce_time = level.time + 2;
468  }
469  take = 0;
470  save = damage;
471  }
472 
473  psave = CheckPowerArmor (targ, point, normal, take, dflags);
474  take -= psave;
475 
476  asave = CheckArmor (targ, point, normal, take, te_sparks, dflags);
477  take -= asave;
478 
479  //treat cheat/powerup savings the same as armor
480  asave += save;
481 
482  // team damage avoidance
483  if (!(dflags & DAMAGE_NO_PROTECTION) && CheckTeamDamage (targ, attacker))
484  return;
485 
486 // do the damage
487  if (take)
488  {
489  if ((targ->svflags & SVF_MONSTER) || (client))
490  SpawnDamage (TE_BLOOD, point, normal, take);
491  else
492  SpawnDamage (te_sparks, point, normal, take);
493 
494 
495  targ->health = targ->health - take;
496 
497  if (targ->health <= 0)
498  {
499  if ((targ->svflags & SVF_MONSTER) || (client))
500  targ->flags |= FL_NO_KNOCKBACK;
501  Killed (targ, inflictor, attacker, take, point);
502  return;
503  }
504  }
505 
506  if (targ->svflags & SVF_MONSTER)
507  {
508  M_ReactToDamage (targ, attacker);
509  if (!(targ->monsterinfo.aiflags & AI_DUCKED) && (take))
510  {
511  targ->pain (targ, attacker, knockback, take);
512  // nightmare mode monsters don't go into pain frames often
513  if (skill->value == 3)
514  targ->pain_debounce_time = level.time + 5;
515  }
516  }
517  else if (client)
518  {
519  if (!(targ->flags & FL_GODMODE) && (take))
520  targ->pain (targ, attacker, knockback, take);
521  }
522  else if (take)
523  {
524  if (targ->pain)
525  targ->pain (targ, attacker, knockback, take);
526  }
527 
528  // add to the damage inflicted on a player this frame
529  // the total will be turned into screen blends and view angle kicks
530  // at the end of the frame
531  if (client)
532  {
533  client->damage_parmor += psave;
534  client->damage_armor += asave;
535  client->damage_blood += take;
536  client->damage_knockback += knockback;
537  VectorCopy (point, client->damage_from);
538  }
539 }

Referenced by bfg_explode(), bfg_think(), bfg_touch(), blaster_touch(), door_blocked(), door_secret_blocked(), fire_hit(), fire_lead(), fire_rail(), floater_zap(), func_object_touch(), Grenade_Explode(), hurt_touch(), KillBox(), M_WorldEffects(), mutant_jump_touch(), P_FallingDamage(), P_WorldEffects(), parasite_drain_attack(), plat_blocked(), rocket_touch(), rotating_blocked(), rotating_touch(), T_RadiusDamage(), target_laser_think(), train_blocked(), turret_blocked(), and use_target_changelevel().

◆ T_RadiusDamage()

void T_RadiusDamage ( edict_t inflictor,
edict_t attacker,
float  damage,
edict_t ignore,
float  radius,
int  mod 
)

Definition at line 547 of file g_combat.c.

548 {
549  float points;
550  edict_t *ent = NULL;
551  vec3_t v;
552  vec3_t dir;
553 
554  while ((ent = findradius(ent, inflictor->s.origin, radius)) != NULL)
555  {
556  if (ent == ignore)
557  continue;
558  if (!ent->takedamage)
559  continue;
560 
561  VectorAdd (ent->mins, ent->maxs, v);
562  VectorMA (ent->s.origin, 0.5, v, v);
563  VectorSubtract (inflictor->s.origin, v, v);
564  points = damage - 0.5 * VectorLength (v);
565  if (ent == attacker)
566  points = points * 0.5;
567  if (points > 0)
568  {
569  if (CanDamage (ent, inflictor))
570  {
571  VectorSubtract (ent->s.origin, inflictor->s.origin, dir);
572  T_Damage (ent, inflictor, attacker, dir, inflictor->s.origin, vec3_origin, (int)points, (int)points, DAMAGE_RADIUS, mod);
573  }
574  }
575  }
576 }

Referenced by barrel_explode(), bfg_touch(), func_explosive_explode(), Grenade_Explode(), misc_viper_bomb_touch(), rocket_touch(), target_explosion_explode(), and use_target_splash().

◆ Think_Weapon()

void Think_Weapon ( edict_t ent)

Definition at line 282 of file p_weapon.c.

283 {
284  // if just died, put the weapon away
285  if (ent->health < 1)
286  {
287  ent->client->newweapon = NULL;
288  ChangeWeapon (ent);
289  }
290 
291  // call active weapon think routine
292  if (ent->client->pers.weapon && ent->client->pers.weapon->weaponthink)
293  {
294  is_quad = (ent->client->quad_framenum > level.framenum);
295  if (ent->client->silencer_shots)
297  else
298  is_silenced = 0;
299  ent->client->pers.weapon->weaponthink (ent);
300  }
301 }

Referenced by ClientBeginServerFrame(), and ClientThink().

◆ ThrowClientHead()

void ThrowClientHead ( edict_t self,
int  damage 
)

Definition at line 229 of file g_misc.c.

230 {
231  vec3_t vd;
232  char *gibname;
233 
234  if (rand()&1)
235  {
236  gibname = "models/objects/gibs/head2/tris.md2";
237  self->s.skinnum = 1; // second skin is player
238  }
239  else
240  {
241  gibname = "models/objects/gibs/skull/tris.md2";
242  self->s.skinnum = 0;
243  }
244 
245  self->s.origin[2] += 32;
246  self->s.frame = 0;
247  gi.setmodel (self, gibname);
248  VectorSet (self->mins, -16, -16, 0);
249  VectorSet (self->maxs, 16, 16, 16);
250 
251  self->takedamage = DAMAGE_NO;
252  self->solid = SOLID_NOT;
253  self->s.effects = EF_GIB;
254  self->s.sound = 0;
255  self->flags |= FL_NO_KNOCKBACK;
256 
257  self->movetype = MOVETYPE_BOUNCE;
258  VelocityForDamage (damage, vd);
259  VectorAdd (self->velocity, vd, self->velocity);
260 
261  if (self->client) // bodies in the queue don't have a client anymore
262  {
263  self->client->anim_priority = ANIM_DEATH;
264  self->client->anim_end = self->s.frame;
265  }
266  else
267  {
268  self->think = NULL;
269  self->nextthink = 0;
270  }
271 
272  gi.linkentity (self);
273 }

Referenced by body_die(), and player_die().

◆ ThrowDebris()

void ThrowDebris ( edict_t self,
char *  modelname,
float  speed,
vec3_t  origin 
)

Definition at line 286 of file g_misc.c.

287 {
288  edict_t *chunk;
289  vec3_t v;
290 
291  chunk = G_Spawn();
292  VectorCopy (origin, chunk->s.origin);
293  gi.setmodel (chunk, modelname);
294  v[0] = 100 * crandom();
295  v[1] = 100 * crandom();
296  v[2] = 100 + 100 * crandom();
297  VectorMA (self->velocity, speed, v, chunk->velocity);
298  chunk->movetype = MOVETYPE_BOUNCE;
299  chunk->solid = SOLID_NOT;
300  chunk->avelocity[0] = random()*600;
301  chunk->avelocity[1] = random()*600;
302  chunk->avelocity[2] = random()*600;
303  chunk->think = G_FreeEdict;
304  chunk->nextthink = level.time + 5 + random()*5;
305  chunk->s.frame = 0;
306  chunk->flags = 0;
307  chunk->classname = "debris";
308  chunk->takedamage = DAMAGE_YES;
309  chunk->die = debris_die;
310  gi.linkentity (chunk);
311 }

Referenced by barrel_explode(), func_explosive_explode(), and rocket_touch().

◆ ThrowGib()

void ThrowGib ( edict_t self,
char *  gibname,
int  damage,
int  type 
)

Definition at line 135 of file g_misc.c.

136 {
137  edict_t *gib;
138  vec3_t vd;
139  vec3_t origin;
140  vec3_t size;
141  float vscale;
142 
143  gib = G_Spawn();
144 
145  VectorScale (self->size, 0.5, size);
146  VectorAdd (self->absmin, size, origin);
147  gib->s.origin[0] = origin[0] + crandom() * size[0];
148  gib->s.origin[1] = origin[1] + crandom() * size[1];
149  gib->s.origin[2] = origin[2] + crandom() * size[2];
150 
151  gi.setmodel (gib, gibname);
152  gib->solid = SOLID_NOT;
153  gib->s.effects |= EF_GIB;
154  gib->flags |= FL_NO_KNOCKBACK;
155  gib->takedamage = DAMAGE_YES;
156  gib->die = gib_die;
157 
158  if (type == GIB_ORGANIC)
159  {
160  gib->movetype = MOVETYPE_TOSS;
161  gib->touch = gib_touch;
162  vscale = 0.5;
163  }
164  else
165  {
166  gib->movetype = MOVETYPE_BOUNCE;
167  vscale = 1.0;
168  }
169 
170  VelocityForDamage (damage, vd);
171  VectorMA (self->velocity, vscale, vd, gib->velocity);
172  ClipGibVelocity (gib);
173  gib->avelocity[0] = random()*600;
174  gib->avelocity[1] = random()*600;
175  gib->avelocity[2] = random()*600;
176 
177  gib->think = G_FreeEdict;
178  gib->nextthink = level.time + 10 + random()*10;
179 
180  gi.linkentity (gib);
181 }

Referenced by actor_die(), berserk_die(), body_die(), boss2_die(), BossExplode(), brain_die(), chick_die(), flipper_die(), gladiator_die(), gunner_die(), hover_die(), infantry_die(), insane_die(), makron_die(), medic_die(), misc_deadsoldier_die(), mutant_die(), parasite_die(), player_die(), soldier_die(), and tank_die().

◆ ThrowHead()

void ThrowHead ( edict_t self,
char *  gibname,
int  damage,
int  type 
)

Definition at line 183 of file g_misc.c.

184 {
185  vec3_t vd;
186  float vscale;
187 
188  self->s.skinnum = 0;
189  self->s.frame = 0;
190  VectorClear (self->mins);
191  VectorClear (self->maxs);
192 
193  self->s.modelindex2 = 0;
194  gi.setmodel (self, gibname);
195  self->solid = SOLID_NOT;
196  self->s.effects |= EF_GIB;
197  self->s.effects &= ~EF_FLIES;
198  self->s.sound = 0;
199  self->flags |= FL_NO_KNOCKBACK;
200  self->svflags &= ~SVF_MONSTER;
201  self->takedamage = DAMAGE_YES;
202  self->die = gib_die;
203 
204  if (type == GIB_ORGANIC)
205  {
206  self->movetype = MOVETYPE_TOSS;
207  self->touch = gib_touch;
208  vscale = 0.5;
209  }
210  else
211  {
212  self->movetype = MOVETYPE_BOUNCE;
213  vscale = 1.0;
214  }
215 
216  VelocityForDamage (damage, vd);
217  VectorMA (self->velocity, vscale, vd, self->velocity);
218  ClipGibVelocity (self);
219 
220  self->avelocity[YAW] = crandom()*600;
221 
222  self->think = G_FreeEdict;
223  self->nextthink = level.time + 10 + random()*10;
224 
225  gi.linkentity (self);
226 }

Referenced by actor_die(), berserk_die(), boss2_die(), BossExplode(), brain_die(), chick_die(), flipper_die(), gladiator_die(), gunner_die(), hover_die(), infantry_die(), insane_die(), makron_die(), medic_die(), misc_deadsoldier_die(), mutant_die(), parasite_die(), soldier_die(), and tank_die().

◆ Touch_Item()

void Touch_Item ( edict_t ent,
edict_t other,
cplane_t plane,
csurface_t surf 
)

Definition at line 761 of file g_items.c.

762 {
763  qboolean taken;
764 
765  if (!other->client)
766  return;
767  if (other->health < 1)
768  return; // dead people can't pickup
769  if (!ent->item->pickup)
770  return; // not a grabbable item?
771 
772  taken = ent->item->pickup(ent, other);
773 
774  if (taken)
775  {
776  // flash the screen
777  other->client->bonus_alpha = 0.25;
778 
779  // show icon and name on status bar
780  other->client->ps.stats[STAT_PICKUP_ICON] = gi.imageindex(ent->item->icon);
782  other->client->pickup_msg_time = level.time + 3.0;
783 
784  // change selected item
785  if (ent->item->use)
787 
788  if (ent->item->pickup == Pickup_Health)
789  {
790  if (ent->count == 2)
791  gi.sound(other, CHAN_ITEM, gi.soundindex("items/s_health.wav"), 1, ATTN_NORM, 0);
792  else if (ent->count == 10)
793  gi.sound(other, CHAN_ITEM, gi.soundindex("items/n_health.wav"), 1, ATTN_NORM, 0);
794  else if (ent->count == 25)
795  gi.sound(other, CHAN_ITEM, gi.soundindex("items/l_health.wav"), 1, ATTN_NORM, 0);
796  else // (ent->count == 100)
797  gi.sound(other, CHAN_ITEM, gi.soundindex("items/m_health.wav"), 1, ATTN_NORM, 0);
798  }
799  else if (ent->item->pickup_sound)
800  {
801  gi.sound(other, CHAN_ITEM, gi.soundindex(ent->item->pickup_sound), 1, ATTN_NORM, 0);
802  }
803  }
804 
805  if (!(ent->spawnflags & ITEM_TARGETS_USED))
806  {
807  G_UseTargets (ent, other);
809  }
810 
811  if (!taken)
812  return;
813 
814  if (!((coop->value) && (ent->item->flags & IT_STAY_COOP)) || (ent->spawnflags & (DROPPED_ITEM | DROPPED_PLAYER_ITEM)))
815  {
816  if (ent->flags & FL_RESPAWN)
817  ent->flags &= ~FL_RESPAWN;
818  else
819  G_FreeEdict (ent);
820  }
821 }

◆ tv()

float* tv ( float  x,
float  y,
float  z 
)

Definition at line 266 of file g_utils.c.

267 {
268  static int index;
269  static vec3_t vecs[8];
270  float *v;
271 
272  // use an array so that multiple tempvectors won't collide
273  // for a while
274  v = vecs[index];
275  index = (index + 1)&7;
276 
277  v[0] = x;
278  v[1] = y;
279  v[2] = z;
280 
281  return v;
282 }

Referenced by droptofloor().

◆ UpdateChaseCam()

void UpdateChaseCam ( edict_t ent)

Definition at line 22 of file g_chase.c.

23 {
24  vec3_t o, ownerv, goal;
25  edict_t *targ;
27  trace_t trace;
28  int i;
29  vec3_t oldgoal;
30  vec3_t angles;
31 
32  // is our chase target gone?
33  if (!ent->client->chase_target->inuse
35  edict_t *old = ent->client->chase_target;
36  ChaseNext(ent);
37  if (ent->client->chase_target == old) {
38  ent->client->chase_target = NULL;
40  return;
41  }
42  }
43 
44  targ = ent->client->chase_target;
45 
46  VectorCopy(targ->s.origin, ownerv);
47  VectorCopy(ent->s.origin, oldgoal);
48 
49  ownerv[2] += targ->viewheight;
50 
51  VectorCopy(targ->client->v_angle, angles);
52  if (angles[PITCH] > 56)
53  angles[PITCH] = 56;
54  AngleVectors (angles, forward, right, NULL);
56  VectorMA(ownerv, -30, forward, o);
57 
58  if (o[2] < targ->s.origin[2] + 20)
59  o[2] = targ->s.origin[2] + 20;
60 
61  // jump animation lifts
62  if (!targ->groundentity)
63  o[2] += 16;
64 
65  trace = gi.trace(ownerv, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
66 
67  VectorCopy(trace.endpos, goal);
68 
69  VectorMA(goal, 2, forward, goal);
70 
71  // pad for floors and ceilings
72  VectorCopy(goal, o);
73  o[2] += 6;
74  trace = gi.trace(goal, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
75  if (trace.fraction < 1) {
76  VectorCopy(trace.endpos, goal);
77  goal[2] -= 6;
78  }
79 
80  VectorCopy(goal, o);
81  o[2] -= 6;
82  trace = gi.trace(goal, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
83  if (trace.fraction < 1) {
84  VectorCopy(trace.endpos, goal);
85  goal[2] += 6;
86  }
87 
88  if (targ->deadflag)
89  ent->client->ps.pmove.pm_type = PM_DEAD;
90  else
92 
93  VectorCopy(goal, ent->s.origin);
94  for (i=0 ; i<3 ; i++)
96 
97  if (targ->deadflag) {
98  ent->client->ps.viewangles[ROLL] = 40;
99  ent->client->ps.viewangles[PITCH] = -15;
100  ent->client->ps.viewangles[YAW] = targ->client->killer_yaw;
101  } else {
102  VectorCopy(targ->client->v_angle, ent->client->ps.viewangles);
103  VectorCopy(targ->client->v_angle, ent->client->v_angle);
104  }
105 
106  ent->viewheight = 0;
108  gi.linkentity(ent);
109 }

Referenced by ClientThink(), and GetChaseTarget().

◆ ValidateSelectedItem()

void ValidateSelectedItem ( edict_t ent)

Definition at line 130 of file g_cmds.c.

131 {
132  gclient_t *cl;
133 
134  cl = ent->client;
135 
136  if (cl->pers.inventory[cl->pers.selected_item])
137  return; // valid
138 
139  SelectNextItem (ent, -1);
140 }

Referenced by Cmd_InvDrop_f(), Cmd_InvUse_f(), Drop_Ammo(), Drop_General(), Use_Breather(), Use_Envirosuit(), Use_Invulnerability(), Use_Quad(), and Use_Silencer().

◆ vectoangles()

void vectoangles ( vec3_t  vec,
vec3_t  angles 
)

Definition at line 356 of file g_utils.c.

357 {
358  float forward;
359  float yaw, pitch;
360 
361  if (value1[1] == 0 && value1[0] == 0)
362  {
363  yaw = 0;
364  if (value1[2] > 0)
365  pitch = 90;
366  else
367  pitch = 270;
368  }
369  else
370  {
371  if (value1[0])
372  yaw = (int) (atan2(value1[1], value1[0]) * 180 / M_PI);
373  else if (value1[1] > 0)
374  yaw = 90;
375  else
376  yaw = -90;
377  if (yaw < 0)
378  yaw += 360;
379 
380  forward = sqrt (value1[0]*value1[0] + value1[1]*value1[1]);
381  pitch = (int) (atan2(value1[2], forward) * 180 / M_PI);
382  if (pitch < 0)
383  pitch += 360;
384  }
385 
386  angles[PITCH] = -pitch;
387  angles[YAW] = yaw;
388  angles[ROLL] = 0;
389 }

Referenced by fire_bfg(), fire_blaster(), fire_grenade(), fire_grenade2(), fire_lead(), fire_rocket(), gib_touch(), MakronHyperblaster(), medic_cable_attack(), misc_viper_bomb_prethink(), parasite_drain_attack_ok(), soldier_fire(), TankMachineGun(), turret_driver_link(), and turret_driver_think().

◆ vectoyaw()

float vectoyaw ( vec3_t  vec)

Definition at line 333 of file g_utils.c.

334 {
335  float yaw;
336 
337  if (/*vec[YAW] == 0 &&*/ vec[PITCH] == 0)
338  {
339  yaw = 0;
340  if (vec[YAW] > 0)
341  yaw = 90;
342  else if (vec[YAW] < 0)
343  yaw = -90;
344  }
345  else
346  {
347  yaw = (int) (atan2(vec[YAW], vec[PITCH]) * 180 / M_PI);
348  if (yaw < 0)
349  yaw += 360;
350  }
351 
352  return yaw;
353 }

Referenced by actor_pain(), actor_use(), ai_charge(), ai_checkattack(), ai_run(), ai_stand(), barrel_touch(), Boss2_CheckAttack(), FindTarget(), HuntTarget(), Jorg_CheckAttack(), Makron_CheckAttack(), MakronSpawn(), monster_start_go(), path_corner_touch(), PlayerTrail_Add(), and target_actor_touch().

◆ visible()

qboolean visible ( edict_t self,
edict_t other 
)

Definition at line 287 of file g_ai.c.

288 {
289  vec3_t spot1;
290  vec3_t spot2;
291  trace_t trace;
292 
293  VectorCopy (self->s.origin, spot1);
294  spot1[2] += self->viewheight;
295  VectorCopy (other->s.origin, spot2);
296  spot2[2] += other->viewheight;
297  trace = gi.trace (spot1, vec3_origin, vec3_origin, spot2, self, MASK_OPAQUE);
298 
299  if (trace.fraction == 1.0)
300  return true;
301  return false;
302 }

◆ vtos()

char* vtos ( vec3_t  v)

Definition at line 293 of file g_utils.c.

294 {
295  static int index;
296  static char str[8][32];
297  char *s;
298 
299  // use an array so that multiple vtos won't collide
300  s = str[index];
301  index = (index + 1)&7;
302 
303  Com_sprintf (s, 32, "(%i %i %i)", (int)v[0], (int)v[1], (int)v[2]);
304 
305  return s;
306 }

Referenced by actor_use(), droptofloor(), flymonster_start_go(), FoundTarget(), monster_start(), monster_start_go(), point_combat_touch(), SP_func_clock(), SP_func_door_rotating(), SP_func_timer(), SP_func_train(), SP_misc_actor(), SP_misc_strogg_ship(), SP_misc_viper(), SP_path_corner(), SP_target_actor(), SP_target_changelevel(), SP_target_earthquake(), SP_target_help(), SP_target_lightramp(), SP_target_speaker(), SP_trigger_gravity(), SP_trigger_key(), SP_trigger_once(), SP_turret_driver(), SpawnItem(), target_laser_start(), target_lightramp_use(), train_next(), turret_breach_finish_init(), and walkmonster_start_go().

◆ walkmonster_start()

Variable Documentation

◆ bob_pitch

cvar_t* bob_pitch

Definition at line 64 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ bob_roll

cvar_t* bob_roll

Definition at line 65 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ bob_up

cvar_t* bob_up

Definition at line 63 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ body_armor_index

int body_armor_index

Definition at line 45 of file g_items.c.

Referenced by ArmorIndex(), and SetItemNames().

◆ combat_armor_index

int combat_armor_index

Definition at line 44 of file g_items.c.

Referenced by ArmorIndex(), Pickup_Armor(), and SetItemNames().

◆ coop

◆ deathmatch

cvar_t* deathmatch

Definition at line 35 of file g_main.c.

Referenced by BeginIntermission(), bfg_think(), Chaingun_Fire(), CheckDMRules(), ClientBegin(), ClientBeginServerFrame(), ClientConnect(), ClientObituary(), ClientUserinfoChanged(), Cmd_Give_f(), Cmd_God_f(), Cmd_Help_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), Cmd_Score_f(), drop_make_touchable(), G_SetStats(), InitGame(), Machinegun_Fire(), MegaHealth_think(), monster_start(), MoveClientToIntermission(), P_FallingDamage(), Pickup_Adrenaline(), Pickup_Ammo(), Pickup_AncientHead(), Pickup_Armor(), Pickup_Bandolier(), Pickup_Health(), Pickup_Pack(), Pickup_PowerArmor(), Pickup_Powerup(), Pickup_Weapon(), player_die(), PlayerNoise(), PlayerTrail_Init(), PutClientInServer(), respawn(), rocket_touch(), SelectSpawnPoint(), SP_func_door(), SP_func_explosive(), SP_info_player_deathmatch(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_light(), SP_misc_actor(), SP_misc_deadsoldier(), SP_misc_explobox(), SP_misc_insane(), SP_monster_berserk(), SP_monster_boss2(), SP_monster_boss3_stand(), SP_monster_brain(), SP_monster_chick(), SP_monster_flipper(), SP_monster_floater(), SP_monster_flyer(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_hover(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier(), SP_monster_soldier_light(), SP_monster_soldier_ss(), SP_monster_supertank(), SP_monster_tank(), SP_point_combat(), SP_target_goal(), SP_target_help(), SP_target_lightramp(), SP_target_secret(), SP_turret_driver(), SP_worldspawn(), SpawnEntities(), SpawnItem(), T_Damage(), TossClientWeapon(), use_target_changelevel(), weapon_bfg_fire(), Weapon_Blaster_Fire(), Weapon_HyperBlaster_Fire(), weapon_railgun_fire(), and weapon_shotgun_fire().

◆ dedicated

◆ dmflags

◆ fields

field_t fields[]

Definition at line 28 of file g_save.c.

Referenced by ED_ParseField(), ReadEdict(), and WriteEdict().

◆ filterban

cvar_t* filterban

Definition at line 50 of file g_main.c.

Referenced by InitGame(), SV_FilterPacket(), and SVCmd_WriteIP_f().

◆ flood_msgs

cvar_t* flood_msgs

Definition at line 69 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ flood_persecond

cvar_t* flood_persecond

Definition at line 70 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ flood_waitdelay

cvar_t* flood_waitdelay

Definition at line 71 of file g_main.c.

Referenced by Cmd_Say_f(), and InitGame().

◆ fraglimit

cvar_t* fraglimit

Definition at line 39 of file g_main.c.

Referenced by CheckDMRules(), InitGame(), and StartServerActionFunc().

◆ g_edicts

◆ g_select_empty

cvar_t* g_select_empty

Definition at line 47 of file g_main.c.

Referenced by InitGame(), and Use_Weapon().

◆ game

◆ gi

Definition at line 25 of file g_main.c.

Referenced by actor_dead(), actor_pain(), actor_use(), ai_run(), BecomeExplosion1(), BecomeExplosion2(), berserk_dead(), berserk_die(), berserk_fidget(), berserk_pain(), berserk_search(), berserk_sight(), berserk_swing(), bfg_explode(), bfg_think(), bfg_touch(), Blaster_Fire(), blaster_touch(), body_die(), Boss2_CheckAttack(), boss2_dead(), boss2_die(), boss2_pain(), boss2_search(), BossExplode(), brain_chest_open(), brain_dead(), brain_die(), brain_duck_down(), brain_duck_up(), brain_hit_left(), brain_hit_right(), brain_idle(), brain_pain(), brain_search(), brain_sight(), brain_swing_left(), brain_swing_right(), brain_tentacle_attack(), button_fire(), CanDamage(), Chaingun_Fire(), ChangeWeapon(), check_dodge(), CheckDMRules(), CheckNeedPass(), chick_dead(), chick_die(), chick_duck_down(), chick_duck_up(), chick_pain(), Chick_PreAttack1(), chick_sight(), ChickMoan(), ChickReload(), ChickSlash(), ClientBegin(), ClientBeginDeathmatch(), ClientCommand(), ClientConnect(), ClientDisconnect(), ClientEndServerFrame(), ClientObituary(), ClientThink(), ClientUserinfoChanged(), Cmd_Drop_f(), Cmd_Give_f(), Cmd_God_f(), Cmd_InvDrop_f(), Cmd_Inven_f(), Cmd_InvUse_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), Cmd_PlayerList_f(), Cmd_Players_f(), Cmd_Say_f(), Cmd_Use_f(), Cmd_Wave_f(), Com_Printf(), commander_body_think(), commander_body_use(), CopyToBodyQue(), DeathmatchScoreboard(), DeathmatchScoreboardMessage(), door_go_down(), door_go_up(), door_hit_bottom(), door_hit_top(), door_touch(), door_use_areaportals(), DoRespawn(), Drop_Ammo(), Drop_Item(), Drop_Weapon(), droptofloor(), ED_CallSpawn(), ED_NewString(), ED_ParseEdict(), ED_ParseField(), ExitLevel(), FindTarget(), fire_bfg(), fire_blaster(), fire_grenade(), fire_grenade2(), fire_hit(), fire_lead(), fire_rail(), fire_rocket(), flipper_dead(), flipper_die(), flipper_pain(), flipper_preattack(), flipper_sight(), floater_dead(), floater_die(), floater_idle(), floater_pain(), floater_sight(), floater_wham(), floater_zap(), flyer_die(), flyer_idle(), flyer_pain(), flyer_pop_blades(), flyer_sight(), flyer_slash_left(), flyer_slash_right(), flymonster_start_go(), FoundTarget(), func_explosive_spawn(), func_train_find(), func_wall_use(), G_CopyString(), G_FindTeams(), G_FreeEdict(), G_PickTarget(), G_RunEntity(), G_SetClientSound(), G_SetStats(), G_Spawn(), G_TouchSolids(), G_TouchTriggers(), G_UseTargets(), GaldiatorMelee(), GetChaseTarget(), GetGameAPI(), gib_touch(), gladiator_attack(), gladiator_cleaver_swing(), gladiator_dead(), gladiator_die(), gladiator_idle(), gladiator_pain(), gladiator_search(), gladiator_sight(), Grenade_Explode(), Grenade_Touch(), gunner_dead(), gunner_die(), gunner_duck_down(), gunner_duck_up(), gunner_idlesound(), gunner_opengun(), gunner_pain(), gunner_search(), gunner_sight(), HelpComputer(), hover_dead(), hover_die(), hover_pain(), hover_search(), hover_sight(), hurt_touch(), hurt_use(), infantry_cock_gun(), infantry_dead(), infantry_die(), infantry_duck_down(), infantry_duck_up(), infantry_fidget(), infantry_pain(), infantry_sight(), infantry_smack(), infantry_swing(), InitGame(), InitTrigger(), insane_dead(), insane_die(), insane_fist(), insane_moan(), insane_pain(), insane_scream(), insane_shake(), jorg_attack(), Jorg_CheckAttack(), jorg_dead(), jorg_death_hit(), jorg_die(), jorg_idle(), jorg_pain(), jorg_search(), jorg_step_left(), jorg_step_right(), jorgBFG(), KillBox(), light_use(), M_CatagorizePosition(), M_CheckAttack(), M_CheckBottom(), M_CheckGround(), M_droptofloor(), M_FliesOn(), M_WorldEffects(), Machinegun_Fire(), makron_brainsplorch(), Makron_CheckAttack(), makron_dead(), makron_die(), makron_hit(), makron_pain(), makron_popup(), makron_prerailgun(), makron_step_left(), makron_step_right(), makron_taunt(), makron_torso(), makronBFG(), MakronPrecache(), medic_cable_attack(), medic_dead(), medic_die(), medic_duck_down(), medic_duck_up(), medic_hook_launch(), medic_hook_retract(), medic_idle(), medic_pain(), medic_search(), medic_sight(), misc_deadsoldier_die(), monster_fire_bfg(), monster_fire_blaster(), monster_fire_bullet(), monster_fire_grenade(), monster_fire_railgun(), monster_fire_rocket(), monster_fire_shotgun(), monster_start(), monster_start_go(), monster_triggered_spawn(), MoveClientToIntermission(), mutant_check_landing(), mutant_dead(), mutant_die(), mutant_hit_left(), mutant_hit_right(), mutant_idle(), mutant_jump_takeoff(), mutant_pain(), mutant_search(), mutant_sight(), mutant_step(), mutant_swing(), P_DamageFeedback(), P_WorldEffects(), parasite_dead(), parasite_die(), parasite_drain_attack(), parasite_launch(), parasite_pain(), parasite_reel_in(), parasite_scratch(), parasite_search(), parasite_sight(), parasite_tap(), plat_go_down(), plat_go_up(), plat_hit_bottom(), plat_hit_top(), plat_spawn_inside_trigger(), player_die(), PlayerNoise(), PM_trace(), point_combat_touch(), PrecacheItem(), PutClientInServer(), ReadField(), ReadGame(), ReadLevel(), respawn(), rocket_touch(), SelectSpawnPoint(), ServerCommand(), SetItemNames(), SetRespawn(), ShutdownGame(), soldier_cock(), soldier_dead(), soldier_die(), soldier_duck_down(), soldier_duck_up(), soldier_idle(), soldier_pain(), soldier_sight(), SP_func_button(), SP_func_clock(), SP_func_conveyor(), SP_func_door(), SP_func_door_rotating(), SP_func_door_secret(), SP_func_explosive(), SP_func_killbox(), SP_func_object(), SP_func_plat(), SP_func_rotating(), SP_func_timer(), SP_func_train(), SP_func_wall(), SP_func_water(), SP_item_health(), SP_item_health_large(), SP_item_health_mega(), SP_item_health_small(), SP_light(), SP_light_mine1(), SP_light_mine2(), SP_misc_actor(), SP_misc_banner(), SP_misc_bigviper(), SP_misc_blackhole(), SP_misc_deadsoldier(), SP_misc_easterchick(), SP_misc_easterchick2(), SP_misc_eastertank(), SP_misc_explobox(), SP_misc_gib_arm(), SP_misc_gib_head(), SP_misc_gib_leg(), SP_misc_insane(), SP_misc_satellite_dish(), SP_misc_strogg_ship(), SP_misc_teleporter(), SP_misc_teleporter_dest(), SP_misc_viper(), SP_misc_viper_bomb(), SP_monster_berserk(), SP_monster_boss2(), SP_monster_boss3_stand(), SP_monster_brain(), SP_monster_chick(), SP_monster_commander_body(), SP_monster_flipper(), SP_monster_floater(), SP_monster_flyer(), SP_monster_gladiator(), SP_monster_gunner(), SP_monster_hover(), SP_monster_infantry(), SP_monster_jorg(), SP_monster_makron(), SP_monster_medic(), SP_monster_mutant(), SP_monster_parasite(), SP_monster_soldier(), SP_monster_soldier_light(), SP_monster_soldier_ss(), SP_monster_soldier_x(), SP_monster_supertank(), SP_monster_tank(), SP_path_corner(), SP_point_combat(), SP_target_actor(), SP_target_blaster(), SP_target_changelevel(), SP_target_character(), SP_target_earthquake(), SP_target_goal(), SP_target_help(), SP_target_lightramp(), SP_target_secret(), SP_target_speaker(), SP_trigger_gravity(), SP_trigger_hurt(), SP_trigger_key(), SP_trigger_multiple(), SP_trigger_once(), SP_trigger_push(), SP_turret_base(), SP_turret_breach(), SP_turret_driver(), SP_viewthing(), SP_worldspawn(), SpawnDamage(), SpawnEntities(), SpawnItem(), spectator_respawn(), StringToFilter(), supertank_dead(), supertank_die(), supertank_pain(), supertank_search(), SV_CalcBlend(), SV_FlyMove(), SV_movestep(), SV_Physics_Noclip(), SV_Physics_Pusher(), SV_Physics_Step(), SV_Physics_Toss(), SV_Push(), SV_PushEntity(), SV_RunThink(), SV_StepDirection(), SV_TestEntityPosition(), SVCmd_AddIP_f(), SVCmd_ListIP_f(), SVCmd_RemoveIP_f(), Svcmd_Test_f(), SVCmd_WriteIP_f(), Sys_Error(), T_Damage(), tank_dead(), tank_die(), tank_footstep(), tank_idle(), tank_pain(), tank_sight(), tank_thud(), tank_windup(), TankStrike(), target_actor_touch(), target_earthquake_think(), target_explosion_explode(), target_laser_start(), target_laser_think(), target_lightramp_think(), target_lightramp_use(), teleporter_touch(), Think_SpawnDoorTrigger(), ThrowClientHead(), ThrowDebris(), ThrowGib(), ThrowHead(), Touch_Item(), train_next(), train_wait(), TreadSound(), trigger_counter_use(), trigger_elevator_init(), trigger_elevator_use(), trigger_enable(), trigger_key_use(), trigger_push_touch(), turret_breach_finish_init(), turret_breach_fire(), UpdateChaseCam(), Use_Areaportal(), Use_Boss3(), Use_Invulnerability(), Use_Item(), Use_PowerArmor(), Use_Quad(), use_target_blaster(), use_target_changelevel(), use_target_goal(), use_target_secret(), use_target_spawner(), Use_Target_Speaker(), use_target_splash(), Use_Target_Tent(), Use_Weapon(), visible(), walkmonster_start_go(), weapon_bfg_fire(), Weapon_Generic(), Weapon_Grenade(), weapon_grenadelauncher_fire(), Weapon_HyperBlaster_Fire(), weapon_railgun_fire(), Weapon_RocketLauncher_Fire(), weapon_shotgun_fire(), weapon_supershotgun_fire(), WriteField1(), WriteGame(), and WriteLevel().

◆ globals

◆ gun_x

cvar_t* gun_x

Definition at line 57 of file g_main.c.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ gun_y

cvar_t * gun_y

Definition at line 536 of file g_local.h.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ gun_z

cvar_t * gun_z

Definition at line 536 of file g_local.h.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ itemlist

◆ jacket_armor_index

int jacket_armor_index

Definition at line 43 of file g_items.c.

Referenced by ArmorIndex(), Pickup_Armor(), and SetItemNames().

◆ level

Definition at line 116 of file qgl_win.c.

Referenced by actor_attack(), actor_fire(), actor_pain(), actor_run(), actor_stand(), ai_checkattack(), ai_run(), AI_SetSightClient(), ai_stand(), ai_walk(), AngleMove_Begin(), AngleMove_Calc(), AngleMove_Final(), AttackFinished(), barrel_delay(), BeginIntermission(), berserk_pain(), bfg_explode(), bfg_think(), bfg_touch(), Boss2_CheckAttack(), boss2_pain(), BossExplode(), brain_dodge(), brain_duck_hold(), brain_pain(), button_wait(), Chaingun_Fire(), ChangeWeapon(), CheckDMRules(), CheckPowerArmor(), chick_duck_down(), chick_duck_hold(), chick_pain(), ClientBegin(), ClientBeginDeathmatch(), ClientBeginServerFrame(), ClientCommand(), ClientEndServerFrame(), ClientThink(), Cmd_Kill_f(), Cmd_PlayerList_f(), Cmd_Say_f(), commander_body_think(), commander_body_use(), CopyToBodyQue(), CreateTargetChangeLevel(), DeathmatchScoreboardMessage(), door_go_up(), door_hit_top(), door_secret_blocked(), door_secret_move1(), door_secret_move3(), door_secret_move5(), door_touch(), Drop_Item(), drop_make_touchable(), droptofloor(), EndDMLevel(), ExitLevel(), FindTarget(), fire_bfg(), fire_blaster(), fire_grenade(), fire_grenade2(), fire_rocket(), flipper_pain(), floater_pain(), flyer_pain(), FoundTarget(), func_clock_think(), func_timer_think(), func_timer_use(), func_train_find(), G_FreeEdict(), G_RunFrame(), G_SetClientEffects(), G_SetClientSound(), G_SetSpectatorStats(), G_SetStats(), G_Spawn(), G_UseTargets(), gib_think(), gib_touch(), gladiator_pain(), gunner_duck_down(), gunner_duck_hold(), gunner_pain(), HelpComputer(), hover_dead(), hover_deadthink(), hover_pain(), hurt_touch(), infantry_cock_gun(), infantry_duck_down(), infantry_duck_hold(), infantry_fire(), infantry_pain(), InitBodyQue(), InitClientResp(), insane_pain(), Jorg_CheckAttack(), jorg_pain(), Killed(), logCopyTexImage1D(), logCopyTexImage2D(), logCopyTexSubImage1D(), logCopyTexSubImage2D(), logGetTexImage(), logGetTexLevelParameterfv(), logGetTexLevelParameteriv(), logTexImage1D(), logTexImage2D(), logTexSubImage1D(), logTexSubImage2D(), M_CheckAttack(), M_FliesOn(), M_FlyCheck(), M_MoveFrame(), M_SetEffects(), M_WorldEffects(), Machinegun_Fire(), Makron_CheckAttack(), makron_pain(), makron_torso(), makron_torso_think(), MakronSpawn(), MakronToss(), medic_cable_attack(), medic_duck_down(), medic_duck_hold(), medic_pain(), MegaHealth_think(), misc_banner_think(), misc_blackhole_think(), misc_easterchick2_think(), misc_easterchick_think(), misc_eastertank_think(), misc_satellite_dish_think(), misc_satellite_dish_use(), misc_viper_bomb_prethink(), misc_viper_bomb_use(), monster_start(), monster_start_go(), monster_triggered_spawn(), monster_triggered_spawn_use(), Move_Begin(), Move_Calc(), Move_Final(), MoveClientToIntermission(), multi_trigger(), mutant_check_landing(), mutant_jump_takeoff(), mutant_pain(), P_DamageFeedback(), P_FallingDamage(), P_WorldEffects(), parasite_pain(), path_corner_touch(), PF_cprintf(), Pickup_Health(), Pickup_Powerup(), plat_hit_top(), player_die(), PlayerNoise(), PlayerTrail_Add(), point_combat_touch(), PutClientInServer(), QVk_CreateCommandBuffer(), R_DrawParticle(), ReadLevel(), ReadLevelLocals(), respawn(), SetRespawn(), soldier_attack3_refire(), soldier_dodge(), soldier_duck_down(), soldier_duck_hold(), soldier_fire(), soldier_pain(), SP_CreateCoopSpots(), SP_func_clock(), SP_func_door(), SP_func_door_rotating(), SP_func_object(), SP_func_timer(), SP_func_train(), SP_info_player_coop(), SP_info_player_start(), SP_misc_banner(), SP_misc_blackhole(), SP_misc_easterchick(), SP_misc_easterchick2(), SP_misc_eastertank(), SP_misc_explobox(), SP_misc_gib_arm(), SP_misc_gib_head(), SP_misc_gib_leg(), SP_misc_strogg_ship(), SP_misc_viper(), SP_monster_boss3_stand(), SP_monster_commander_body(), SP_monster_flyer(), SP_target_changelevel(), SP_target_crosslevel_target(), SP_target_goal(), SP_target_laser(), SP_target_secret(), SP_trigger_elevator(), SP_turret_breach(), SP_turret_driver(), SP_viewthing(), SP_worldspawn(), SpawnEntities(), SpawnItem(), spectator_respawn(), supertank_pain(), SV_BroadcastPrintf(), SV_CalcBlend(), SV_CalcViewOffset(), SV_ClientPrintf(), SV_Map(), SV_RunThink(), T_Damage(), tank_attack(), tank_pain(), target_actor_touch(), target_earthquake_think(), target_earthquake_use(), target_laser_think(), target_lightramp_think(), target_lightramp_use(), TH_viewthing(), Think_AccelMove(), Think_Boss3Stand(), Think_Weapon(), ThrowDebris(), ThrowGib(), ThrowHead(), TossClientWeapon(), Touch_DoorTrigger(), Touch_Item(), Touch_Plat_Center(), train_blocked(), train_wait(), trigger_key_use(), trigger_push_touch(), turret_breach_think(), turret_driver_link(), turret_driver_think(), Use_Breather(), Use_Envirosuit(), Use_Invulnerability(), Use_Quad(), use_target_changelevel(), use_target_explosion(), use_target_goal(), use_target_secret(), walkmonster_start_go(), weapon_bfg_fire(), Weapon_Generic(), Weapon_Grenade(), weapon_grenade_fire(), Weapon_HyperBlaster_Fire(), and WriteLevelLocals().

◆ maxclients

cvar_t* maxclients

Definition at line 44 of file g_main.c.

◆ maxentities

cvar_t* maxentities

Definition at line 46 of file g_main.c.

Referenced by InitGame().

◆ maxspectators

cvar_t* maxspectators

Definition at line 45 of file g_main.c.

Referenced by ClientConnect(), InitGame(), and spectator_respawn().

◆ meansOfDeath

int meansOfDeath

Definition at line 31 of file g_main.c.

Referenced by ClientObituary(), Cmd_Kill_f(), and T_Damage().

◆ needpass

cvar_t* needpass

Definition at line 43 of file g_main.c.

Referenced by InitGame().

◆ password

cvar_t* password

Definition at line 41 of file g_main.c.

Referenced by CheckNeedPass(), ClientConnect(), InitGame(), and spectator_respawn().

◆ run_pitch

cvar_t* run_pitch

Definition at line 61 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ run_roll

cvar_t* run_roll

Definition at line 62 of file g_main.c.

Referenced by InitGame(), and SV_CalcViewOffset().

◆ skill

◆ sm_meat_index

int sm_meat_index

Definition at line 29 of file g_main.c.

Referenced by gib_touch(), and SP_worldspawn().

◆ snd_fry

int snd_fry

Definition at line 30 of file g_main.c.

Referenced by G_SetClientSound(), and SP_worldspawn().

◆ spectator_password

cvar_t* spectator_password

Definition at line 42 of file g_main.c.

Referenced by CheckNeedPass(), ClientConnect(), InitGame(), and spectator_respawn().

◆ st

◆ sv_cheats

cvar_t* sv_cheats

Definition at line 67 of file g_main.c.

Referenced by Cmd_Give_f(), Cmd_God_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), and InitGame().

◆ sv_gravity

cvar_t* sv_gravity

Definition at line 53 of file g_main.c.

Referenced by ClientThink(), InitGame(), SV_AddGravity(), and SV_Physics_Step().

◆ sv_maplist

cvar_t* sv_maplist

Definition at line 73 of file g_main.c.

Referenced by EndDMLevel(), and InitGame().

◆ sv_maxvelocity

cvar_t* sv_maxvelocity

Definition at line 52 of file g_main.c.

Referenced by InitGame(), and SV_CheckVelocity().

◆ sv_rollangle

cvar_t* sv_rollangle

Definition at line 56 of file g_main.c.

Referenced by InitGame(), and SV_CalcRoll().

◆ sv_rollspeed

cvar_t* sv_rollspeed

Definition at line 55 of file g_main.c.

Referenced by InitGame(), and SV_CalcRoll().

◆ timelimit

cvar_t* timelimit

Definition at line 40 of file g_main.c.

Referenced by CheckDMRules(), InitGame(), and StartServerActionFunc().

FindItem
gitem_t * FindItem(char *pickup_name)
Definition: g_items.c:100
edict_s::mynoise2
edict_t * mynoise2
Definition: g_local.h:1085
entity_state_s::old_origin
vec3_t old_origin
Definition: q_shared.h:1151
gi
game_import_t gi
Definition: g_main.c:25
trace_t::contents
int contents
Definition: q_shared.h:461
UpdateChaseCam
void UpdateChaseCam(edict_t *ent)
Definition: g_chase.c:22
Cmd_Score_f
void Cmd_Score_f(edict_t *ent)
Definition: p_hud.c:277
IT_AMMO
#define IT_AMMO
Definition: g_local.h:217
SV_CloseEnough
qboolean SV_CloseEnough(edict_t *ent, edict_t *goal, float dist)
Definition: m_move.c:495
G_ProjectSource
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
Definition: g_utils.c:25
edict_s::ideal_yaw
float ideal_yaw
Definition: g_local.h:1040
game_import_t::dprintf
void(* dprintf)(char *fmt,...)
Definition: game.h:106
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:86
cplane_s::normal
vec3_t normal
Definition: q_shared.h:415
edict_s::s
entity_state_t s
Definition: g_local.h:970
spectator_respawn
void spectator_respawn(edict_t *ent)
Definition: p_client.c:1010
gclient_s::damage_from
vec3_t damage_from
Definition: g_local.h:915
G_SetSpectatorStats
void G_SetSpectatorStats(edict_t *ent)
Definition: p_hud.c:550
RANGE_NEAR
#define RANGE_NEAR
Definition: g_local.h:120
edict_s::groundentity
edict_t * groundentity
Definition: g_local.h:1079
FRAME_death201
#define FRAME_death201
Definition: m_actor.h:35
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
F_FUNCTION
@ F_FUNCTION
Definition: g_local.h:584
edict_s::timestamp
float timestamp
Definition: g_local.h:1014
client_persistant_t::spectator
qboolean spectator
Definition: g_local.h:867
client_persistant_t::selected_item
int selected_item
Definition: g_local.h:847
client_persistant_t::max_grenades
int max_grenades
Definition: g_local.h:854
gclient_s::oldviewangles
vec3_t oldviewangles
Definition: g_local.h:929
Pickup_Armor
qboolean Pickup_Armor(edict_t *ent, edict_t *other)
Definition: g_items.c:607
CONTENTS_MONSTER
#define CONTENTS_MONSTER
Definition: qfiles.h:359
YAW
#define YAW
Definition: q_shared.h:73
player_state_t::gunframe
int gunframe
Definition: q_shared.h:1188
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:115
AMMO_ROCKETS
@ AMMO_ROCKETS
Definition: g_local.h:105
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:80
AI_COMBAT_POINT
#define AI_COMBAT_POINT
Definition: g_local.h:141
MASK_MONSTERSOLID
#define MASK_MONSTERSOLID
Definition: q_shared.h:398
gclient_s::v_angle
vec3_t v_angle
Definition: g_local.h:927
STAT_HEALTH
#define STAT_HEALTH
Definition: q_shared.h:1002
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:104
game_import_t::trace
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
Definition: game.h:128
edict_s::model
char * model
Definition: g_local.h:1004
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:420
c_no
int c_no
Definition: m_move.c:35
G_Find
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
Definition: g_utils.c:45
trace_t::fraction
float fraction
Definition: q_shared.h:457
MZ_SILENCED
#define MZ_SILENCED
Definition: q_shared.h:652
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
TE_SHOTGUN
@ TE_SHOTGUN
Definition: q_shared.h:915
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:163
CHAN_ITEM
#define CHAN_ITEM
Definition: q_shared.h:986
AI_TEMP_STAND_GROUND
#define AI_TEMP_STAND_GROUND
Definition: g_local.h:130
FRAME_crpain1
#define FRAME_crpain1
Definition: m_player.h:193
gclient_s::kick_origin
vec3_t kick_origin
Definition: g_local.h:921
entity_state_s::frame
int frame
Definition: q_shared.h:1154
ANIM_DEATH
#define ANIM_DEATH
Definition: g_local.h:828
edict_s::absmax
vec3_t absmax
Definition: g_local.h:991
F_IGNORE
@ F_IGNORE
Definition: g_local.h:586
TE_EXPLOSION1
@ TE_EXPLOSION1
Definition: q_shared.h:916
STAT_HEALTH_ICON
#define STAT_HEALTH_ICON
Definition: q_shared.h:1001
gclient_s::update_chase
qboolean update_chase
Definition: g_local.h:964
EV_PLAYER_TELEPORT
@ EV_PLAYER_TELEPORT
Definition: q_shared.h:1137
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:137
game_import_t::WritePosition
void(* WritePosition)(vec3_t pos)
Definition: game.h:152
trace_t::plane
cplane_t plane
Definition: q_shared.h:459
PlayerTrail_PickNext
edict_t * PlayerTrail_PickNext(edict_t *self)
Definition: p_trail.c:124
WEAPON_DROPPING
@ WEAPON_DROPPING
Definition: g_local.h:97
game_import_t::multicast
void(* multicast)(vec3_t origin, multicast_t to)
Definition: game.h:144
Think_Delay
void Think_Delay(edict_t *ent)
Definition: g_utils.c:151
maxclients
cvar_t * maxclients
Definition: g_main.c:44
edict_s::count
int count
Definition: g_local.h:1073
AMMO_BULLETS
@ AMMO_BULLETS
Definition: g_local.h:103
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
gitem_s::precaches
char * precaches
Definition: g_local.h:262
STAT_HELPICON
#define STAT_HELPICON
Definition: q_shared.h:1012
bottom
GLdouble GLdouble bottom
Definition: qgl_win.c:159
client_persistant_t::connected
qboolean connected
Definition: g_local.h:839
BODY_QUEUE_SIZE
#define BODY_QUEUE_SIZE
Definition: g_local.h:84
monster_start
qboolean monster_start(edict_t *self)
Definition: g_monster.c:534
PNOISE_WEAPON
#define PNOISE_WEAPON
Definition: g_local.h:183
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
edict_s::movetarget
edict_t * movetarget
Definition: g_local.h:1038
client_persistant_t::helpchanged
int helpchanged
Definition: g_local.h:865
TE_BLOOD
@ TE_BLOOD
Definition: q_shared.h:912
gclient_s::anim_end
int anim_end
Definition: g_local.h:939
DeathmatchScoreboard
void DeathmatchScoreboard(edict_t *ent)
Definition: p_hud.c:263
WEAPON_READY
@ WEAPON_READY
Definition: g_local.h:95
ITEM_TARGETS_USED
#define ITEM_TARGETS_USED
Definition: g_local.h:565
PMF_NO_PREDICTION
#define PMF_NO_PREDICTION
Definition: q_shared.h:487
monsterinfo_t::attack
void(* attack)(edict_t *self)
Definition: g_local.h:431
entity_state_s::renderfx
int renderfx
Definition: q_shared.h:1157
PM_FREEZE
@ PM_FREEZE
Definition: q_shared.h:477
AMMO_SHELLS
@ AMMO_SHELLS
Definition: g_local.h:104
v
GLdouble v
Definition: qgl_win.c:143
fire_rail
void fire_rail(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick)
Definition: g_weapon.c:658
F_VECTOR
@ F_VECTOR
Definition: g_local.h:579
M_SetEffects
void M_SetEffects(edict_t *ent)
Definition: g_monster.c:332
bobfracsin
float bobfracsin
Definition: p_view.c:34
PowerArmorType
int PowerArmorType(edict_t *ent)
Definition: g_items.c:688
M_walkmove
qboolean M_walkmove(edict_t *ent, float yaw, float dist)
Definition: m_move.c:542
EF_FLIES
#define EF_FLIES
Definition: q_shared.h:575
ai_checkattack
qboolean ai_checkattack(edict_t *self, float dist)
Definition: g_ai.c:771
MOVETYPE_NOCLIP
@ MOVETYPE_NOCLIP
Definition: g_local.h:191
MOVETYPE_STOP
@ MOVETYPE_STOP
Definition: g_local.h:193
FRAME_crdeath5
#define FRAME_crdeath5
Definition: m_player.h:201
combat_armor_index
int combat_armor_index
Definition: g_items.c:44
ipfilter_t::compare
unsigned compare
Definition: g_svcmds.c:63
MOVEDIR_UP
vec3_t MOVEDIR_UP
Definition: g_utils.c:310
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
game_locals_t::helpchanged
int helpchanged
Definition: g_local.h:276
client_respawn_t::coop_respawn
client_persistant_t coop_respawn
Definition: g_local.h:873
edict_s::linkcount
int linkcount
Definition: g_local.h:977
SVF_NOCLIENT
#define SVF_NOCLIENT
Definition: game.h:27
monsterinfo_t::search
void(* search)(edict_t *self)
Definition: g_local.h:427
CS_ITEMS
#define CS_ITEMS
Definition: q_shared.h:1116
G_SetClientSound
void G_SetClientSound(edict_t *ent)
Definition: p_view.c:815
AI_LOST_SIGHT
#define AI_LOST_SIGHT
Definition: g_local.h:132
fire_rocket
void fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
Definition: g_weapon.c:620
edict_s::map
char * map
Definition: g_local.h:1065
TE_RAILTRAIL
@ TE_RAILTRAIL
Definition: q_shared.h:914
edict_s::air_finished
float air_finished
Definition: g_local.h:1033
gitem_s::pickup
qboolean(* pickup)(struct edict_s *ent, struct edict_s *other)
Definition: g_local.h:239
FRAME_pain304
#define FRAME_pain304
Definition: m_boss31.h:114
gclient_s::showhelp
qboolean showhelp
Definition: g_local.h:896
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:28
monsterinfo_t::last_sighting
vec3_t last_sighting
Definition: g_local.h:442
ITEM_INDEX
#define ITEM_INDEX(x)
Definition: g_local.h:616
MASK_WATER
#define MASK_WATER
Definition: q_shared.h:399
FL_POWER_ARMOR
#define FL_POWER_ARMOR
Definition: g_local.h:71
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:129
weapon_grenade_fire
void weapon_grenade_fire(edict_t *ent, qboolean held)
Definition: p_weapon.c:546
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
gitem_s::world_model_flags
int world_model_flags
Definition: g_local.h:245
qboolean
qboolean
Definition: q_shared.h:63
x
GLint GLenum GLint x
Definition: qgl_win.c:116
SV_Physics_Noclip
void SV_Physics_Noclip(edict_t *ent)
Definition: g_phys.c:643
edict_s::inuse
qboolean inuse
Definition: g_local.h:976
DAMAGE_RADIUS
#define DAMAGE_RADIUS
Definition: g_local.h:663
trace_t
Definition: q_shared.h:453
z
GLdouble GLdouble z
Definition: qgl_win.c:283
fire_bfg
void fire_bfg(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
Definition: g_weapon.c:884
VectorClear
#define VectorClear(a)
Definition: q_shared.h:166
i
int i
Definition: q_shared.c:305
walkmonster_start_go
void walkmonster_start_go(edict_t *self)
Definition: g_monster.c:671
check_dodge
static void check_dodge(edict_t *self, vec3_t start, vec3_t dir, int speed)
Definition: g_weapon.c:32
MOVETYPE_PUSH
@ MOVETYPE_PUSH
Definition: g_local.h:192
MOVETYPE_FLYMISSILE
@ MOVETYPE_FLYMISSILE
Definition: g_local.h:199
MOD_RAILGUN
#define MOD_RAILGUN
Definition: g_local.h:480
DF_INFINITE_AMMO
#define DF_INFINITE_AMMO
Definition: q_shared.h:1037
MOD_TELEFRAG
#define MOD_TELEFRAG
Definition: g_local.h:490
edict_s::max_health
int max_health
Definition: g_local.h:1058
G_Find
edict_t * G_Find(edict_t *from, int fieldofs, char *match)
Definition: g_utils.c:45
PlayerTrail_Add
void PlayerTrail_Add(vec3_t spot)
Definition: p_trail.c:67
Pickup_Health
qboolean Pickup_Health(edict_t *ent, edict_t *other)
Definition: g_items.c:556
SOLID_TRIGGER
@ SOLID_TRIGGER
Definition: game.h:36
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:89
EF_BFG
#define EF_BFG
Definition: q_shared.h:568
edict_s::client
struct gclient_s * client
Definition: g_local.h:971
gclient_s::kick_angles
vec3_t kick_angles
Definition: g_local.h:920
game_import_t::sound
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
Definition: game.h:109
PITCH
#define PITCH
Definition: q_shared.h:72
Think_Weapon
void Think_Weapon(edict_t *ent)
Definition: p_weapon.c:282
FOFS
#define FOFS(x)
Definition: g_local.h:510
ClientUserinfoChanged
void ClientUserinfoChanged(edict_t *ent, char *userinfo)
Definition: p_client.c:1371
M_CheckGround
void M_CheckGround(edict_t *ent)
Definition: g_monster.c:141
client_respawn_t::spectator
qboolean spectator
Definition: g_local.h:878
edict_s::movedir
vec3_t movedir
Definition: g_local.h:1027
MASK_SHOT
#define MASK_SHOT
Definition: q_shared.h:401
DoRespawn
void DoRespawn(edict_t *ent)
Definition: g_items.c:119
gclient_s::grenade_time
float grenade_time
Definition: g_local.h:951
FL_NO_KNOCKBACK
#define FL_NO_KNOCKBACK
Definition: g_local.h:70
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:333
Pickup_PowerArmor
qboolean Pickup_PowerArmor(edict_t *ent, edict_t *other)
Definition: g_items.c:727
TAG_LEVEL
#define TAG_LEVEL
Definition: g_local.h:79
fire_grenade
void fire_grenade(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius)
Definition: g_weapon.c:486
WEAPON_ACTIVATING
@ WEAPON_ACTIVATING
Definition: g_local.h:96
client_persistant_t::userinfo
char userinfo[MAX_INFO_STRING]
Definition: g_local.h:835
AI_PURSUE_TEMP
#define AI_PURSUE_TEMP
Definition: g_local.h:135
bfg_touch
void bfg_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_weapon.c:767
F_ITEM
@ F_ITEM
Definition: g_local.h:582
flymonster_start_go
void flymonster_start_go(edict_t *self)
Definition: g_monster.c:699
CONTENTS_SOLID
#define CONTENTS_SOLID
Definition: qfiles.h:333
SV_Physics_Pusher
void SV_Physics_Pusher(edict_t *ent)
Definition: g_phys.c:562
edict_s::mins
vec3_t mins
Definition: g_local.h:990
DF_NO_ITEMS
#define DF_NO_ITEMS
Definition: q_shared.h:1025
meansOfDeath
int meansOfDeath
Definition: g_main.c:31
edict_s::prethink
void(* prethink)(edict_t *ent)
Definition: g_local.h:1043
range
GLsizei range
Definition: qgl_win.c:121
pmove_state_t::velocity
short velocity[3]
Definition: q_shared.h:499
ammo_t
ammo_t
Definition: g_local.h:101
client_persistant_t::max_slugs
int max_slugs
Definition: g_local.h:856
player_state_t::fov
float fov
Definition: q_shared.h:1192
body_armor_index
int body_armor_index
Definition: g_items.c:45
gclient_s::pickup_msg_time
float pickup_msg_time
Definition: g_local.h:955
ArmorIndex
int ArmorIndex(edict_t *ent)
Definition: g_items.c:590
STAT_SELECTED_ITEM
#define STAT_SELECTED_ITEM
Definition: q_shared.h:1013
M_PI
#define M_PI
Definition: q_shared.h:142
gclient_s::bobtime
float bobtime
Definition: g_local.h:928
monsterinfo_t::attack_state
int attack_state
Definition: g_local.h:443
gclient_s::oldvelocity
vec3_t oldvelocity
Definition: g_local.h:930
FRAME_death301
#define FRAME_death301
Definition: m_actor.h:48
type
GLenum type
Definition: qgl_win.c:72
g_edicts
edict_t * g_edicts
Definition: g_main.c:33
rocket_touch
void rocket_touch(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_weapon.c:569
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
F_EDICT
@ F_EDICT
Definition: g_local.h:581
STAT_PICKUP_ICON
#define STAT_PICKUP_ICON
Definition: q_shared.h:1008
client_persistant_t::max_bullets
int max_bullets
Definition: g_local.h:851
T_Damage
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)
Definition: g_combat.c:377
edict_s::groundentity_linkcount
int groundentity_linkcount
Definition: g_local.h:1080
TossClientWeapon
void TossClientWeapon(edict_t *self)
Definition: p_client.c:410
weaponstate_t
weaponstate_t
Definition: g_local.h:93
DF_FORCE_RESPAWN
#define DF_FORCE_RESPAWN
Definition: q_shared.h:1034
itemlist
gitem_t itemlist[]
Definition: g_items.c:1134
DF_FIXED_FOV
#define DF_FIXED_FOV
Definition: q_shared.h:1039
PrecacheItem
void PrecacheItem(gitem_t *it)
Definition: g_items.c:993
anglemod
float anglemod(float a)
Definition: q_shared.c:293
BUTTON_ATTACK
#define BUTTON_ATTACK
Definition: q_shared.h:511
gclient_s::bonus_alpha
float bonus_alpha
Definition: g_local.h:925
edict_s::movetype
int movetype
Definition: g_local.h:1001
client_persistant_t::inventory
int inventory[MAX_ITEMS]
Definition: g_local.h:848
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:196
STAT_FRAGS
#define STAT_FRAGS
Definition: q_shared.h:1015
MAX_INFO_STRING
#define MAX_INFO_STRING
Definition: q_shared.h:259
entity_state_s::effects
unsigned int effects
Definition: q_shared.h:1156
DAMAGE_NO_KNOCKBACK
#define DAMAGE_NO_KNOCKBACK
Definition: g_local.h:666
CopyToBodyQue
void CopyToBodyQue(edict_t *ent)
Definition: p_client.c:946
drop_temp_touch
static void drop_temp_touch(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_items.c:825
gitem_s::icon
char * icon
Definition: g_local.h:249
HuntTarget
void HuntTarget(edict_t *self)
Definition: g_ai.c:331
game_import_t::imageindex
int(* imageindex)(char *name)
Definition: game.h:123
FL_SWIM
#define FL_SWIM
Definition: g_local.h:60
j
GLint j
Definition: qgl_win.c:150
F_FLOAT
@ F_FLOAT
Definition: g_local.h:576
IT_KEY
#define IT_KEY
Definition: g_local.h:220
STAT_AMMO_ICON
#define STAT_AMMO_ICON
Definition: q_shared.h:1003
EF_GRENADE
#define EF_GRENADE
Definition: q_shared.h:566
entity_state_s::sound
int sound
Definition: q_shared.h:1161
gclient_s::enviro_framenum
float enviro_framenum
Definition: g_local.h:948
MoveClientToIntermission
void MoveClientToIntermission(edict_t *ent)
Definition: p_hud.c:33
STAT_ARMOR_ICON
#define STAT_ARMOR_ICON
Definition: q_shared.h:1005
gclient_s::pers
client_persistant_t pers
Definition: g_local.h:890
va
char * va(char *format,...)
Definition: q_shared.c:1050
SVCmd_ListIP_f
void SVCmd_ListIP_f(void)
Definition: g_svcmds.c:220
debris_die
void debris_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:281
ANIM_PAIN
#define ANIM_PAIN
Definition: g_local.h:826
client_persistant_t::max_shells
int max_shells
Definition: g_local.h:852
SV_CalcGunOffset
void SV_CalcGunOffset(edict_t *ent)
Definition: p_view.c:345
MASK_SOLID
#define MASK_SOLID
Definition: q_shared.h:395
client_respawn_t::score
int score
Definition: g_local.h:875
gitem_s::use
void(* use)(struct edict_s *ent, struct gitem_s *item)
Definition: g_local.h:240
G_SetStats
void G_SetStats(edict_t *ent)
Definition: p_hud.c:378
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
gclient_s::newweapon
gitem_t * newweapon
Definition: g_local.h:907
edict_s::message
char * message
Definition: g_local.h:1010
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:983
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
Grenade_Touch
static void Grenade_Touch(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_weapon.c:455
MULTICAST_PHS
@ MULTICAST_PHS
Definition: q_shared.h:117
DF_NO_HEALTH
#define DF_NO_HEALTH
Definition: q_shared.h:1024
jacket_armor_index
int jacket_armor_index
Definition: g_items.c:43
POWER_ARMOR_SHIELD
#define POWER_ARMOR_SHIELD
Definition: g_local.h:161
trace_t::allsolid
qboolean allsolid
Definition: q_shared.h:455
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:160
edict_s::svflags
int svflags
Definition: g_local.h:989
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
DAMAGE_BULLET
#define DAMAGE_BULLET
Definition: g_local.h:667
PMF_TIME_TELEPORT
#define PMF_TIME_TELEPORT
Definition: q_shared.h:486
edict_s::item
gitem_t * item
Definition: g_local.h:1110
Pickup_Adrenaline
qboolean Pickup_Adrenaline(edict_t *ent, edict_t *other)
Definition: g_items.c:197
DAMAGE_NO_PROTECTION
#define DAMAGE_NO_PROTECTION
Definition: g_local.h:668
vectoangles
void vectoangles(vec3_t vec, vec3_t angles)
Definition: g_utils.c:356
gclient_s::damage_armor
int damage_armor
Definition: g_local.h:911
gclient_s::weapon_thunk
qboolean weapon_thunk
Definition: g_local.h:905
gib_touch
void gib_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_misc.c:104
edict_s::classname
char * classname
Definition: g_local.h:1011
edict_s
Definition: g_local.h:968
G_SetClientEffects
void G_SetClientEffects(edict_t *ent)
Definition: p_view.c:745
edict_s::mass
int mass
Definition: g_local.h:1032
VEC_DOWN
vec3_t VEC_DOWN
Definition: g_utils.c:311
gitem_s::world_model
char * world_model
Definition: g_local.h:244
findradius
edict_t * findradius(edict_t *from, vec3_t org, float rad)
Definition: g_utils.c:78
FL_RESPAWN
#define FL_RESPAWN
Definition: g_local.h:72
EF_ROCKET
#define EF_ROCKET
Definition: q_shared.h:565
xyspeed
float xyspeed
Definition: p_view.c:30
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
M_MoveFrame
void M_MoveFrame(edict_t *self)
Definition: g_monster.c:361
monsterinfo_t::pausetime
float pausetime
Definition: g_local.h:436
SV_CalcRoll
float SV_CalcRoll(vec3_t angles, vec3_t velocity)
Definition: p_view.c:42
pmove_state_t::pm_type
pmtype_t pm_type
Definition: q_shared.h:496
monsterinfo_t::search_time
float search_time
Definition: g_local.h:440
movetype_t
movetype_t
Definition: g_local.h:188
client_persistant_t::weapon
gitem_t * weapon
Definition: g_local.h:858
MOVETYPE_NONE
@ MOVETYPE_NONE
Definition: g_local.h:190
F_CLIENT
@ F_CLIENT
Definition: g_local.h:583
M_FliesOn
static void M_FliesOn(edict_t *self)
Definition: g_monster.c:113
edict_s::mynoise
edict_t * mynoise
Definition: g_local.h:1084
AS_SLIDING
#define AS_SLIDING
Definition: g_local.h:147
gitem_s::ammo
char * ammo
Definition: g_local.h:254
SV_Physics_None
void SV_Physics_None(edict_t *ent)
Definition: g_phys.c:630
edict_s::viewheight
int viewheight
Definition: g_local.h:1067
fieldtype_t
fieldtype_t
Definition: g_local.h:574
droptofloor
void droptofloor(edict_t *ent)
Definition: g_items.c:918
ROLL
#define ROLL
Definition: q_shared.h:74
DF_SKINTEAMS
#define DF_SKINTEAMS
Definition: q_shared.h:1030
DROPPED_PLAYER_ITEM
#define DROPPED_PLAYER_ITEM
Definition: g_local.h:564
game_locals_t::num_items
int num_items
Definition: g_local.h:293
client_persistant_t
Definition: g_local.h:833
MOD_HIT
#define MOD_HIT
Definition: g_local.h:501
M_MoveToGoal
void M_MoveToGoal(edict_t *ent, float dist)
Definition: m_move.c:515
game_import_t::configstring
void(* configstring)(int num, char *string)
Definition: game.h:116
player_state_t::viewangles
vec3_t viewangles
Definition: q_shared.h:1180
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
forward
static vec3_t forward
Definition: p_view.c:29
monsterinfo_t::saved_goal
vec3_t saved_goal
Definition: g_local.h:439
TRAIL_LENGTH
#define TRAIL_LENGTH
Definition: p_trail.c:39
edict_s::clipmask
int clipmask
Definition: g_local.h:993
edict_s::spawnflags
int spawnflags
Definition: g_local.h:1012
Svcmd_Test_f
void Svcmd_Test_f(void)
Definition: g_svcmds.c:24
gclient_s::damage_knockback
int damage_knockback
Definition: g_local.h:914
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
crandom
#define crandom()
Definition: g_local.h:516
player_state_t::pmove
pmove_state_t pmove
Definition: q_shared.h:1176
SV_CalcViewOffset
void SV_CalcViewOffset(edict_t *ent)
Definition: p_view.c:222
game_import_t::pointcontents
int(* pointcontents)(vec3_t point)
Definition: game.h:129
FL_GODMODE
#define FL_GODMODE
Definition: g_local.h:63
FindTarget
qboolean FindTarget(edict_t *self)
Definition: g_ai.c:407
MOVEDIR_DOWN
vec3_t MOVEDIR_DOWN
Definition: g_utils.c:312
t
GLdouble t
Definition: qgl_win.c:328
edict_s::owner
edict_t * owner
Definition: g_local.h:994
AREA_TRIGGERS
#define AREA_TRIGGERS
Definition: q_shared.h:408
STAT_TIMER
#define STAT_TIMER
Definition: q_shared.h:1011
Info_ValueForKey
char * Info_ValueForKey(char *s, char *key)
Definition: q_shared.c:1253
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:149
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
TE_SPARKS
@ TE_SPARKS
Definition: q_shared.h:920
player_state_t::blend
float blend[4]
Definition: q_shared.h:1190
ClientTeam
char * ClientTeam(edict_t *ent)
Definition: g_cmds.c:24
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1117
EF_GIB
#define EF_GIB
Definition: q_shared.h:563
M_CatagorizePosition
void M_CatagorizePosition(edict_t *ent)
Definition: g_monster.c:183
PlayerTrail_LastSpot
edict_t * PlayerTrail_LastSpot(void)
Definition: p_trail.c:143
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
client_persistant_t::savedFlags
int savedFlags
Definition: g_local.h:845
M_WorldEffects
void M_WorldEffects(edict_t *ent)
Definition: g_monster.c:218
damage_t
damage_t
Definition: g_local.h:86
client_respawn_t::cmd_angles
vec3_t cmd_angles
Definition: g_local.h:876
player_pain
void player_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: p_client.c:179
respawn
void respawn(edict_t *self)
Definition: p_client.c:980
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:162
game_locals_t::clients
gclient_t * clients
Definition: g_local.h:279
edict_s::dmg_radius
float dmg_radius
Definition: g_local.h:1071
OnSameTeam
qboolean OnSameTeam(edict_t *ent1, edict_t *ent2)
Definition: g_cmds.c:49
edict_s::nextthink
float nextthink
Definition: g_local.h:1042
client_respawn_t
Definition: g_local.h:871
gclient_s::killer_yaw
float killer_yaw
Definition: g_local.h:917
cvar_s::value
float value
Definition: q_shared.h:331
vtos
char * vtos(vec3_t v)
Definition: g_utils.c:293
AI_PURSUIT_LAST_SEEN
#define AI_PURSUIT_LAST_SEEN
Definition: g_local.h:133
game
game_locals_t game
Definition: g_main.c:23
FRAME_death106
#define FRAME_death106
Definition: m_actor.h:33
DeathmatchScoreboardMessage
void DeathmatchScoreboardMessage(edict_t *client, edict_t *killer)
Definition: p_hud.c:165
edict_s::think
void(* think)(edict_t *self)
Definition: g_local.h:1044
monsterinfo_t::linkcount
int linkcount
Definition: g_local.h:446
PRINT_HIGH
#define PRINT_HIGH
Definition: q_shared.h:99
random
#define random()
Definition: g_local.h:515
WEAPON_FIRING
@ WEAPON_FIRING
Definition: g_local.h:98
pmove_state_t::delta_angles
short delta_angles[3]
Definition: q_shared.h:503
bobcycle
int bobcycle
Definition: p_view.c:33
DAMAGE_NO
@ DAMAGE_NO
Definition: g_local.h:88
CheckTeamDamage
qboolean CheckTeamDamage(edict_t *targ, edict_t *attacker)
Definition: g_combat.c:370
FL_NOTARGET
#define FL_NOTARGET
Definition: g_local.h:64
FRAME_death206
#define FRAME_death206
Definition: m_actor.h:40
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
gitem_s::pickup_name
char * pickup_name
Definition: g_local.h:250
EF_ANIM_ALLFAST
#define EF_ANIM_ALLFAST
Definition: q_shared.h:574
gclient_s::ps
player_state_t ps
Definition: g_local.h:886
G_InitEdict
void G_InitEdict(edict_t *e)
Definition: g_utils.c:401
edict_s::watertype
int watertype
Definition: g_local.h:1099
edict_s::noise_index
int noise_index
Definition: g_local.h:1087
entity_state_s::number
int number
Definition: q_shared.h:1147
NULL
#define NULL
Definition: q_shared.h:67
globals
game_export_t globals
Definition: g_main.c:26
filterban
cvar_t * filterban
Definition: g_main.c:50
edict_s::solid
solid_t solid
Definition: g_local.h:992
G_FreeEdict
void G_FreeEdict(edict_t *ed)
Definition: g_utils.c:452
game_import_t::TagMalloc
void *(* TagMalloc)(int size, int tag)
Definition: game.h:157
CheckArmor
static int CheckArmor(edict_t *ent, vec3_t point, vec3_t normal, int damage, int te_sparks, int dflags)
Definition: g_combat.c:255
gclient_s::weaponstate
weaponstate_t weaponstate
Definition: g_local.h:919
AMMO_GRENADES
@ AMMO_GRENADES
Definition: g_local.h:106
respawn
void respawn(edict_t *ent)
Definition: p_client.c:980
F_MMOVE
@ F_MMOVE
Definition: g_local.h:585
STAT_ARMOR
#define STAT_ARMOR
Definition: q_shared.h:1006
RF_GLOW
#define RF_GLOW
Definition: q_shared.h:608
svc_layout
@ svc_layout
Definition: qcommon.h:228
player_die
void player_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: p_client.c:501
MAX_ITEMS
#define MAX_ITEMS
Definition: q_shared.h:92
PNOISE_IMPACT
#define PNOISE_IMPACT
Definition: g_local.h:184
G_SetClientEvent
void G_SetClientEvent(edict_t *ent)
Definition: p_view.c:798
current
static int current
Definition: cl_scrn.c:129
MOVETYPE_WALK
@ MOVETYPE_WALK
Definition: g_local.h:195
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:421
is_silenced
static byte is_silenced
Definition: p_weapon.c:27
PM_DEAD
@ PM_DEAD
Definition: q_shared.h:475
trail
edict_t * trail[TRAIL_LENGTH]
Definition: p_trail.c:41
CanDamage
qboolean CanDamage(edict_t *targ, edict_t *inflictor)
Definition: g_combat.c:32
gclient_s::machinegun_shots
int machinegun_shots
Definition: g_local.h:936
edict_s::goalentity
edict_t * goalentity
Definition: g_local.h:1037
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
game_import_t::centerprintf
void(* centerprintf)(edict_t *ent, char *fmt,...)
Definition: game.h:108
P_WorldEffects
void P_WorldEffects(void)
Definition: p_view.c:579
SVCmd_AddIP_f
void SVCmd_AddIP_f(void)
Definition: g_svcmds.c:158
skill
cvar_t * skill
Definition: g_main.c:38
SOLID_NOT
@ SOLID_NOT
Definition: game.h:35
edict_s::dmg
int dmg
Definition: g_local.h:1069
edict_s::pain
void(* pain)(edict_t *self, edict_t *other, float kick, int damage)
Definition: g_local.h:1048
STAT_SPECTATOR
#define STAT_SPECTATOR
Definition: q_shared.h:1018
MASK_OPAQUE
#define MASK_OPAQUE
Definition: q_shared.h:400
client_respawn_t::enterframe
int enterframe
Definition: g_local.h:874
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:87
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1030
HelpComputer
void HelpComputer(edict_t *ent)
Definition: p_hud.c:303
gclient_s::breather_framenum
float breather_framenum
Definition: g_local.h:947
game_import_t::setmodel
void(* setmodel)(edict_t *ent, char *name)
Definition: game.h:125
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:164
ClientObituary
void ClientObituary(edict_t *self, edict_t *inflictor, edict_t *attacker)
Definition: p_client.c:211
game_import_t::unlinkentity
void(* unlinkentity)(edict_t *ent)
Definition: game.h:139
s
static fixed16_t s
Definition: r_scan.c:30
game_locals_t::autosaved
qboolean autosaved
Definition: g_local.h:295
PREV
#define PREV(n)
Definition: p_trail.c:46
CONTENTS_SLIME
#define CONTENTS_SLIME
Definition: qfiles.h:337
DEAD_NO
#define DEAD_NO
Definition: g_local.h:113
y
GLint y
Definition: qgl_win.c:115
current_client
static gclient_t * current_client
Definition: p_view.c:27
game_import_t::WriteShort
void(* WriteShort)(int c)
Definition: game.h:148
FetchClientEntData
void FetchClientEntData(edict_t *ent)
Definition: p_client.c:668
gclient_s::quad_framenum
float quad_framenum
Definition: g_local.h:945
fire_bullet
void fire_bullet(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int mod)
Definition: g_weapon.c:277
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:227
Cmd_Help_f
void Cmd_Help_f(edict_t *ent)
Definition: p_hud.c:347
RDF_UNDERWATER
#define RDF_UNDERWATER
Definition: q_shared.h:621
game_import_t::error
void(* error)(char *fmt,...)
Definition: game.h:118
entity_state_s::skinnum
int skinnum
Definition: q_shared.h:1155
edict_s::radius_dmg
int radius_dmg
Definition: g_local.h:1070
DROPPED_ITEM
#define DROPPED_ITEM
Definition: g_local.h:563
gclient_s::showscores
qboolean showscores
Definition: g_local.h:894
ClipGibVelocity
void ClipGibVelocity(edict_t *ent)
Definition: g_misc.c:70
VEC_UP
vec3_t VEC_UP
Definition: g_utils.c:309
gitem_s::pickup_sound
char * pickup_sound
Definition: g_local.h:243
edict_s::yaw_speed
float yaw_speed
Definition: g_local.h:1039
PlayerTrail_PickFirst
edict_t * PlayerTrail_PickFirst(edict_t *self)
Definition: p_trail.c:95
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
coop
cvar_t * coop
Definition: g_main.c:36
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1052
client_persistant_t::lastweapon
gitem_t * lastweapon
Definition: g_local.h:859
AI_SOUND_TARGET
#define AI_SOUND_TARGET
Definition: g_local.h:131
G_SetSpectatorStats
void G_SetSpectatorStats(edict_t *ent)
Definition: p_hud.c:550
FRAME_crdeath1
#define FRAME_crdeath1
Definition: m_player.h:197
game_import_t::AddCommandString
void(* AddCommandString)(char *text)
Definition: game.h:173
game_import_t::cprintf
void(* cprintf)(edict_t *ent, int printlevel, char *fmt,...)
Definition: game.h:107
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1114
game_import_t::unicast
void(* unicast)(edict_t *ent, qboolean reliable)
Definition: game.h:145
client_persistant_t::max_rockets
int max_rockets
Definition: g_local.h:853
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:287
ThrowClientHead
void ThrowClientHead(edict_t *self, int damage)
Definition: g_misc.c:229
trace_t::endpos
vec3_t endpos
Definition: q_shared.h:458
power_screen_index
int power_screen_index
Definition: g_items.c:46
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
STAT_PICKUP_STRING
#define STAT_PICKUP_STRING
Definition: q_shared.h:1009
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:420
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:119
M_ReactToDamage
void M_ReactToDamage(edict_t *targ, edict_t *attacker)
Definition: g_combat.c:295
SVCmd_RemoveIP_f
void SVCmd_RemoveIP_f(void)
Definition: g_svcmds.c:189
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:90
gib_die
void gib_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_misc.c:130
AREA_SOLID
#define AREA_SOLID
Definition: q_shared.h:407
up
static vec3_t up
Definition: p_view.c:29
PNOISE_SELF
#define PNOISE_SELF
Definition: g_local.h:182
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:984
bobmove
float bobmove
Definition: p_view.c:32
game_import_t::WriteByte
void(* WriteByte)(int c)
Definition: game.h:147
edict_s::takedamage
int takedamage
Definition: g_local.h:1068
gitem_s::weapmodel
int weapmodel
Definition: g_local.h:257
level
GLint level
Definition: qgl_win.c:116
SV_movestep
qboolean SV_movestep(edict_t *ent, vec3_t move, qboolean relink)
Definition: m_move.c:112
c_yes
int c_yes
Definition: m_move.c:35
right
static vec3_t right
Definition: p_view.c:29
monsterinfo_t::idle_time
float idle_time
Definition: g_local.h:445
gitem_s::weaponthink
void(* weaponthink)(struct edict_s *ent)
Definition: g_local.h:242
Killed
void Killed(edict_t *targ, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_combat.c:92
SV_NewChaseDir
void SV_NewChaseDir(edict_t *actor, edict_t *enemy, float dist)
Definition: m_move.c:403
SpawnDamage
void SpawnDamage(int type, vec3_t origin, vec3_t normal, int damage)
Definition: g_combat.c:134
ChangeWeapon
void ChangeWeapon(edict_t *ent)
Definition: p_weapon.c:174
trail_head
int trail_head
Definition: p_trail.c:42
G_UseTargets
void G_UseTargets(edict_t *ent, edict_t *activator)
Definition: g_utils.c:173
edict_s::flags
int flags
Definition: g_local.h:1002
IT_STAY_COOP
#define IT_STAY_COOP
Definition: g_local.h:219
CENTER_HANDED
#define CENTER_HANDED
Definition: g_local.h:166
enemy_range
int enemy_range
Definition: g_ai.c:31
Drop_Item
edict_t * Drop_Item(edict_t *ent, gitem_t *item)
Definition: g_items.c:843
enemy_vis
qboolean enemy_vis
Definition: g_ai.c:29
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:125
client_persistant_t::game_helpchanged
int game_helpchanged
Definition: g_local.h:864
gclient_s::showinventory
qboolean showinventory
Definition: g_local.h:895
NEXT
#define NEXT(n)
Definition: p_trail.c:45
gclient_s::invincible_framenum
float invincible_framenum
Definition: g_local.h:946
gitem_s::drop
void(* drop)(struct edict_s *ent, struct gitem_s *item)
Definition: g_local.h:241
MAXCHOICES
#define MAXCHOICES
Definition: g_utils.c:116
sqrt
double sqrt(double x)
client_state_t::inventory
int inventory[MAX_ITEMS]
Definition: client.h:139
FRAME_crpain4
#define FRAME_crpain4
Definition: m_player.h:196
ChaseNext
void ChaseNext(edict_t *ent)
Definition: g_chase.c:111
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
LookAtKiller
void LookAtKiller(edict_t *self, edict_t *inflictor, edict_t *attacker)
Definition: p_client.c:463
STAT_TIMER_ICON
#define STAT_TIMER_ICON
Definition: q_shared.h:1010
edict_s::teleport_time
float teleport_time
Definition: g_local.h:1097
CONTENTS_LAVA
#define CONTENTS_LAVA
Definition: qfiles.h:336
ipfilters
ipfilter_t ipfilters[MAX_IPFILTERS]
Definition: g_svcmds.c:68
edict_s::maxs
vec3_t maxs
Definition: g_local.h:990
gclient_s::ammo_index
int ammo_index
Definition: g_local.h:899
GetItemByIndex
gitem_t * GetItemByIndex(int index)
Definition: g_items.c:62
edict_s::avelocity
vec3_t avelocity
Definition: g_local.h:1031
trace_t::startsolid
qboolean startsolid
Definition: q_shared.h:456
fire_lead
static void fire_lead(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int te_impact, int hspread, int vspread, int mod)
Definition: g_weapon.c:134
PlayerNoise
void PlayerNoise(edict_t *who, vec3_t where, int type)
Definition: p_weapon.c:58
PMF_DUCKED
#define PMF_DUCKED
Definition: q_shared.h:481
RANGE_MID
#define RANGE_MID
Definition: g_local.h:121
SelectSpawnPoint
void SelectSpawnPoint(edict_t *ent, vec3_t origin, vec3_t angles)
Definition: p_client.c:875
monsterinfo_t::idle
void(* idle)(edict_t *self)
Definition: g_local.h:426
edict_s::teammaster
edict_t * teammaster
Definition: g_local.h:1082
entity_state_s::modelindex
int modelindex
Definition: q_shared.h:1152
entity_state_s::modelindex2
int modelindex2
Definition: q_shared.h:1153
TE_GUNSHOT
@ TE_GUNSHOT
Definition: q_shared.h:911
MOD_UNKNOWN
#define MOD_UNKNOWN
Definition: g_local.h:469
swimmonster_start_go
void swimmonster_start_go(edict_t *self)
Definition: g_monster.c:723
edict_s::gravity
float gravity
Definition: g_local.h:1034
trace_t::ent
struct edict_s * ent
Definition: q_shared.h:462
SV_StepDirection
qboolean SV_StepDirection(edict_t *ent, float yaw, float dist)
Definition: m_move.c:353
FL_FLY
#define FL_FLY
Definition: g_local.h:59
is_quad
static qboolean is_quad
Definition: p_weapon.c:26
G_SetStats
void G_SetStats(edict_t *ent)
Definition: p_hud.c:378
KillBox
qboolean KillBox(edict_t *ent)
Definition: g_utils.c:549
SVF_MONSTER
#define SVF_MONSTER
Definition: game.h:29
edict_s::touch
void(* touch)(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_local.h:1046
STAT_AMMO
#define STAT_AMMO
Definition: q_shared.h:1004
ai_run_slide
void ai_run_slide(edict_t *self, float distance)
Definition: g_ai.c:743
MOVETYPE_BOUNCE
@ MOVETYPE_BOUNCE
Definition: g_local.h:200
PutClientInServer
void PutClientInServer(edict_t *ent)
Definition: p_client.c:1097
numipfilters
int numipfilters
Definition: g_svcmds.c:69
DF_MODELTEAMS
#define DF_MODELTEAMS
Definition: q_shared.h:1031
SelectNextItem
void SelectNextItem(edict_t *ent, int itflags)
Definition: g_cmds.c:66
gclient_s::chase_target
edict_t * chase_target
Definition: g_local.h:963
edict_s::combattarget
char * combattarget
Definition: g_local.h:1023
gclient_s::damage_parmor
int damage_parmor
Definition: g_local.h:912
pmove_state_t::origin
short origin[3]
Definition: q_shared.h:498
monsterinfo_t::attack_finished
float attack_finished
Definition: g_local.h:437
fire_blaster
void fire_blaster(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect, qboolean hyper)
Definition: g_weapon.c:345
STEPSIZE
#define STEPSIZE
Definition: m_move.c:24
P_DamageFeedback
void P_DamageFeedback(edict_t *player)
Definition: p_view.c:71
SV_Physics_Toss
void SV_Physics_Toss(edict_t *ent)
Definition: g_phys.c:670
gclient_s::respawn_time
float respawn_time
Definition: g_local.h:961
AI_PURSUE_NEXT
#define AI_PURSUE_NEXT
Definition: g_local.h:134
FRAME_death308
#define FRAME_death308
Definition: m_actor.h:55
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:198
G_CheckChaseStats
void G_CheckChaseStats(edict_t *ent)
Definition: p_hud.c:531
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:168
ChangeWeapon
void ChangeWeapon(edict_t *ent)
Definition: p_weapon.c:174
right
GLdouble right
Definition: qgl_win.c:159
CONTENTS_WINDOW
#define CONTENTS_WINDOW
Definition: qfiles.h:334
ANGLE2SHORT
#define ANGLE2SHORT(x)
Definition: q_shared.h:1092
edict_s::killtarget
char * killtarget
Definition: g_local.h:1019
STAT_LAYOUTS
#define STAT_LAYOUTS
Definition: q_shared.h:1014
dmflags
cvar_t * dmflags
Definition: g_main.c:37
edict_s::waterlevel
int waterlevel
Definition: g_local.h:1100
F_LSTRING
@ F_LSTRING
Definition: g_local.h:577
edict_s::delay
float delay
Definition: g_local.h:1094
client_persistant_t::hand
int hand
Definition: g_local.h:837
power_shield_index
int power_shield_index
Definition: g_items.c:47
monsterinfo_t::melee
void(* melee)(edict_t *self)
Definition: g_local.h:432
STAT_CHASE
#define STAT_CHASE
Definition: q_shared.h:1017
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:987
Grenade_Explode
static void Grenade_Explode(edict_t *ent)
Definition: g_weapon.c:398
current_player
static edict_t * current_player
Definition: p_view.c:26
M_ChangeYaw
void M_ChangeYaw(edict_t *ent)
Definition: m_move.c:304
CheckPowerArmor
static int CheckPowerArmor(edict_t *ent, vec3_t point, vec3_t normal, int damage, int dflags)
Definition: g_combat.c:171
client_persistant_t::max_cells
int max_cells
Definition: g_local.h:855
VectorCompare
int VectorCompare(vec3_t v1, vec3_t v2)
Definition: q_shared.c:672
client_persistant_t::max_health
int max_health
Definition: g_local.h:844
bfg_think
void bfg_think(edict_t *self)
Definition: g_weapon.c:806
game_locals_t::maxentities
int maxentities
Definition: g_local.h:287
trail_active
qboolean trail_active
Definition: p_trail.c:43
gitem_s::view_model
char * view_model
Definition: g_local.h:246
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:226
fire_shotgun
void fire_shotgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int mod)
Definition: g_weapon.c:290
G_SetClientFrame
void G_SetClientFrame(edict_t *ent)
Definition: p_view.c:855
VelocityForDamage
void VelocityForDamage(int damage, vec3_t v)
Definition: g_misc.c:58
points
GLdouble GLdouble GLint GLint const GLdouble * points
Definition: qgl_win.c:225
mask
GLint GLuint mask
Definition: qgl_win.c:317
Pickup_AncientHead
qboolean Pickup_AncientHead(edict_t *ent, edict_t *other)
Definition: g_items.c:211
gclient_s
Definition: g_local.h:883
P_FallingDamage
void P_FallingDamage(edict_t *ent)
Definition: p_view.c:501
G_PickTarget
edict_t * G_PickTarget(char *targetname)
Definition: g_utils.c:118
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1076
edict_s::teamchain
edict_t * teamchain
Definition: g_local.h:1081
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:140
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
edict_s::size
vec3_t size
Definition: g_local.h:991
MASK_PLAYERSOLID
#define MASK_PLAYERSOLID
Definition: q_shared.h:396
PlayerTrail_Add
void PlayerTrail_Add(vec3_t spot)
Definition: p_trail.c:67
player_state_t::gunindex
int gunindex
Definition: q_shared.h:1187
gclient_s::latched_buttons
int latched_buttons
Definition: g_local.h:903
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1150
DeathmatchScoreboardMessage
void DeathmatchScoreboardMessage(edict_t *ent, edict_t *killer)
Definition: p_hud.c:165
cl
client_state_t cl
Definition: cl_main.c:91
PlayerTrail_Init
void PlayerTrail_Init(void)
Definition: p_trail.c:49
AS_MELEE
#define AS_MELEE
Definition: g_local.h:148
RANGE_FAR
#define RANGE_FAR
Definition: g_local.h:122
pmove_state_t::pm_flags
byte pm_flags
Definition: q_shared.h:500
F_INT
@ F_INT
Definition: g_local.h:575
client_persistant_t::score
int score
Definition: g_local.h:862
game_import_t::WriteString
void(* WriteString)(char *s)
Definition: game.h:151
gclient_s::weapon_sound
int weapon_sound
Definition: g_local.h:953
gitem_s::flags
int flags
Definition: g_local.h:255
edict_s::die
void(* die)(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_local.h:1049
gclient_s::anim_priority
int anim_priority
Definition: g_local.h:940
DF_NO_ARMOR
#define DF_NO_ARMOR
Definition: q_shared.h:1035
max
#define max(a, b)
Definition: vk_local.h:75
MULTICAST_PVS
@ MULTICAST_PVS
Definition: q_shared.h:118
SV_Physics_Step
void SV_Physics_Step(edict_t *ent)
Definition: g_phys.c:815
edict_s::deathtarget
char * deathtarget
Definition: g_local.h:1022
TE_BULLET_SPARKS
@ TE_BULLET_SPARKS
Definition: q_shared.h:925
F_ANGLEHACK
@ F_ANGLEHACK
Definition: g_local.h:580
game_import_t::BoxEdicts
int(* BoxEdicts)(vec3_t mins, vec3_t maxs, edict_t **list, int maxcount, int areatype)
Definition: game.h:140
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
edict_s::absmin
vec3_t absmin
Definition: g_local.h:991
MOVETYPE_FLY
@ MOVETYPE_FLY
Definition: g_local.h:197
POWER_ARMOR_NONE
#define POWER_ARMOR_NONE
Definition: g_local.h:159
gitem_s::tag
int tag
Definition: g_local.h:260
InitClientPersistant
void InitClientPersistant(gclient_t *client)
Definition: p_client.c:607
Pickup_Powerup
qboolean Pickup_Powerup(edict_t *ent, edict_t *other)
Definition: g_items.c:159
edict_s::target
char * target
Definition: g_local.h:1017
F_GSTRING
@ F_GSTRING
Definition: g_local.h:578
MOD_FRIENDLY_FIRE
#define MOD_FRIENDLY_FIRE
Definition: g_local.h:503
game_export_t::num_edicts
int num_edicts
Definition: game.h:231
player_state_t::stats
short stats[MAX_STATS]
Definition: q_shared.h:1196
SV_CalcBlend
void SV_CalcBlend(edict_t *ent)
Definition: p_view.c:418
client_persistant_t::health
int health
Definition: g_local.h:843
blaster_touch
void blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_weapon.c:306
count
GLint GLsizei count
Definition: qgl_win.c:128
DF_NO_FRIENDLY_FIRE
#define DF_NO_FRIENDLY_FIRE
Definition: q_shared.h:1032
SVCmd_WriteIP_f
void SVCmd_WriteIP_f(void)
Definition: g_svcmds.c:238
edict_s::freetime
float freetime
Definition: g_local.h:1005
gclient_s::resp
client_respawn_t resp
Definition: g_local.h:891
gclient_s::damage_blood
int damage_blood
Definition: g_local.h:913
AS_STRAIGHT
#define AS_STRAIGHT
Definition: g_local.h:146
game_import_t::argv
char *(* argv)(int n)
Definition: game.h:168
AMMO_CELLS
@ AMMO_CELLS
Definition: g_local.h:107
STAT_SELECTED_ICON
#define STAT_SELECTED_ICON
Definition: q_shared.h:1007
gitem_s::classname
char * classname
Definition: g_local.h:238
edict_s::health
int health
Definition: g_local.h:1057
gclient_s::silencer_shots
int silencer_shots
Definition: g_local.h:952
drop_make_touchable
static void drop_make_touchable(edict_t *ent)
Definition: g_items.c:833
gitem_s
Definition: g_local.h:236
AMMO_SLUGS
@ AMMO_SLUGS
Definition: g_local.h:108
game_locals_t::maxclients
int maxclients
Definition: g_local.h:286