icculus quake2 doxygen  1.0 dev
g_local.h File Reference
#include "q_shared.h"
#include "game.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)   (int)&(((edict_t *)0)->x)
 
#define STOFS(x)   (int)&(((spawn_temp_t *)0)->x)
 
#define LLOFS(x)   (int)&(((level_locals_t *)0)->x)
 
#define CLOFS(x)   (int)&(((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 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 136 of file g_local.h.

◆ AI_COMBAT_POINT

#define AI_COMBAT_POINT   0x00001000

Definition at line 139 of file g_local.h.

◆ AI_DUCKED

#define AI_DUCKED   0x00000800

Definition at line 138 of file g_local.h.

◆ AI_GOOD_GUY

#define AI_GOOD_GUY   0x00000100

Definition at line 135 of file g_local.h.

◆ AI_HOLD_FRAME

#define AI_HOLD_FRAME   0x00000080

Definition at line 134 of file g_local.h.

◆ AI_LOST_SIGHT

#define AI_LOST_SIGHT   0x00000008

Definition at line 130 of file g_local.h.

◆ AI_MEDIC

#define AI_MEDIC   0x00002000

Definition at line 140 of file g_local.h.

◆ AI_NOSTEP

#define AI_NOSTEP   0x00000400

Definition at line 137 of file g_local.h.

◆ AI_PURSUE_NEXT

#define AI_PURSUE_NEXT   0x00000020

Definition at line 132 of file g_local.h.

◆ AI_PURSUE_TEMP

#define AI_PURSUE_TEMP   0x00000040

Definition at line 133 of file g_local.h.

◆ AI_PURSUIT_LAST_SEEN

#define AI_PURSUIT_LAST_SEEN   0x00000010

Definition at line 131 of file g_local.h.

◆ AI_RESURRECTING

#define AI_RESURRECTING   0x00004000

Definition at line 141 of file g_local.h.

◆ AI_SOUND_TARGET

#define AI_SOUND_TARGET   0x00000004

Definition at line 129 of file g_local.h.

◆ AI_STAND_GROUND

#define AI_STAND_GROUND   0x00000001

Definition at line 127 of file g_local.h.

◆ AI_TEMP_STAND_GROUND

#define AI_TEMP_STAND_GROUND   0x00000002

Definition at line 128 of file g_local.h.

◆ ANIM_ATTACK

#define ANIM_ATTACK   4

Definition at line 821 of file g_local.h.

◆ ANIM_BASIC

#define ANIM_BASIC   0

Definition at line 817 of file g_local.h.

◆ ANIM_DEATH

#define ANIM_DEATH   5

Definition at line 822 of file g_local.h.

◆ ANIM_JUMP

#define ANIM_JUMP   2

Definition at line 819 of file g_local.h.

◆ ANIM_PAIN

#define ANIM_PAIN   3

Definition at line 820 of file g_local.h.

◆ ANIM_REVERSE

#define ANIM_REVERSE   6

Definition at line 823 of file g_local.h.

◆ ANIM_WAVE

#define ANIM_WAVE   1

Definition at line 818 of file g_local.h.

◆ ARMOR_BODY

#define ARMOR_BODY   3

Definition at line 153 of file g_local.h.

◆ ARMOR_COMBAT

#define ARMOR_COMBAT   2

Definition at line 152 of file g_local.h.

◆ ARMOR_JACKET

#define ARMOR_JACKET   1

Definition at line 151 of file g_local.h.

◆ ARMOR_NONE

#define ARMOR_NONE   0

Definition at line 150 of file g_local.h.

◆ ARMOR_SHARD

#define ARMOR_SHARD   4

Definition at line 154 of file g_local.h.

◆ AS_MELEE

#define AS_MELEE   3

Definition at line 146 of file g_local.h.

◆ AS_MISSILE

#define AS_MISSILE   4

Definition at line 147 of file g_local.h.

◆ AS_SLIDING

#define AS_SLIDING   2

Definition at line 145 of file g_local.h.

◆ AS_STRAIGHT

#define AS_STRAIGHT   1

Definition at line 144 of file g_local.h.

◆ BODY_QUEUE_SIZE

#define BODY_QUEUE_SIZE   8

Definition at line 82 of file g_local.h.

◆ CENTER_HANDED

#define CENTER_HANDED   2

Definition at line 164 of file g_local.h.

◆ CLOFS

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

Definition at line 507 of file g_local.h.

◆ crandom

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

Definition at line 510 of file g_local.h.

◆ DAMAGE_BULLET

#define DAMAGE_BULLET   0x00000010

Definition at line 661 of file g_local.h.

◆ DAMAGE_ENERGY

#define DAMAGE_ENERGY   0x00000004

Definition at line 659 of file g_local.h.

◆ DAMAGE_NO_ARMOR

#define DAMAGE_NO_ARMOR   0x00000002

Definition at line 658 of file g_local.h.

◆ DAMAGE_NO_KNOCKBACK

#define DAMAGE_NO_KNOCKBACK   0x00000008

Definition at line 660 of file g_local.h.

◆ DAMAGE_NO_PROTECTION

#define DAMAGE_NO_PROTECTION   0x00000020

Definition at line 662 of file g_local.h.

◆ DAMAGE_RADIUS

#define DAMAGE_RADIUS   0x00000001

Definition at line 657 of file g_local.h.

◆ DAMAGE_TIME

#define DAMAGE_TIME   0.5

Definition at line 44 of file g_local.h.

◆ DEAD_DEAD

#define DEAD_DEAD   2

Definition at line 113 of file g_local.h.

◆ DEAD_DYING

#define DEAD_DYING   1

Definition at line 112 of file g_local.h.

◆ DEAD_NO

#define DEAD_NO   0

Definition at line 111 of file g_local.h.

◆ DEAD_RESPAWNABLE

#define DEAD_RESPAWNABLE   3

Definition at line 114 of file g_local.h.

◆ DEFAULT_BULLET_HSPREAD

#define DEFAULT_BULLET_HSPREAD   300

Definition at line 664 of file g_local.h.

◆ DEFAULT_BULLET_VSPREAD

#define DEFAULT_BULLET_VSPREAD   500

Definition at line 665 of file g_local.h.

◆ DEFAULT_DEATHMATCH_SHOTGUN_COUNT

#define DEFAULT_DEATHMATCH_SHOTGUN_COUNT   12

Definition at line 668 of file g_local.h.

◆ DEFAULT_SHOTGUN_COUNT

#define DEFAULT_SHOTGUN_COUNT   12

Definition at line 669 of file g_local.h.

◆ DEFAULT_SHOTGUN_HSPREAD

#define DEFAULT_SHOTGUN_HSPREAD   1000

Definition at line 666 of file g_local.h.

◆ DEFAULT_SHOTGUN_VSPREAD

#define DEFAULT_SHOTGUN_VSPREAD   500

Definition at line 667 of file g_local.h.

◆ DEFAULT_SSHOTGUN_COUNT

#define DEFAULT_SSHOTGUN_COUNT   20

Definition at line 670 of file g_local.h.

◆ DROPPED_ITEM

#define DROPPED_ITEM   0x00010000

Definition at line 557 of file g_local.h.

◆ DROPPED_PLAYER_ITEM

#define DROPPED_PLAYER_ITEM   0x00020000

Definition at line 558 of file g_local.h.

◆ FALL_TIME

#define FALL_TIME   0.3

Definition at line 45 of file g_local.h.

◆ FFL_NOSPAWN

#define FFL_NOSPAWN   2

Definition at line 566 of file g_local.h.

◆ FFL_SPAWNTEMP

#define FFL_SPAWNTEMP   1

Definition at line 565 of file g_local.h.

◆ FL_FLY

#define FL_FLY   0x00000001

Definition at line 57 of file g_local.h.

◆ FL_GODMODE

#define FL_GODMODE   0x00000010

Definition at line 61 of file g_local.h.

◆ FL_IMMUNE_LASER

#define FL_IMMUNE_LASER   0x00000004

Definition at line 59 of file g_local.h.

◆ FL_IMMUNE_LAVA

#define FL_IMMUNE_LAVA   0x00000080

Definition at line 64 of file g_local.h.

◆ FL_IMMUNE_SLIME

#define FL_IMMUNE_SLIME   0x00000040

Definition at line 63 of file g_local.h.

◆ FL_INWATER

#define FL_INWATER   0x00000008

Definition at line 60 of file g_local.h.

◆ FL_NO_KNOCKBACK

#define FL_NO_KNOCKBACK   0x00000800

Definition at line 68 of file g_local.h.

◆ FL_NOTARGET

#define FL_NOTARGET   0x00000020

Definition at line 62 of file g_local.h.

◆ FL_PARTIALGROUND

#define FL_PARTIALGROUND   0x00000100

Definition at line 65 of file g_local.h.

◆ FL_POWER_ARMOR

#define FL_POWER_ARMOR   0x00001000

Definition at line 69 of file g_local.h.

◆ FL_RESPAWN

#define FL_RESPAWN   0x80000000

Definition at line 70 of file g_local.h.

◆ FL_SWIM

#define FL_SWIM   0x00000002

Definition at line 58 of file g_local.h.

◆ FL_TEAMSLAVE

#define FL_TEAMSLAVE   0x00000400

Definition at line 67 of file g_local.h.

◆ FL_WATERJUMP

#define FL_WATERJUMP   0x00000200

Definition at line 66 of file g_local.h.

◆ FOFS

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

Definition at line 504 of file g_local.h.

◆ FRAMETIME

#define FRAMETIME   0.1

Definition at line 73 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 31 of file g_local.h.

◆ GIB_METALLIC

#define GIB_METALLIC   1

Definition at line 124 of file g_local.h.

◆ GIB_ORGANIC

#define GIB_ORGANIC   0

Definition at line 123 of file g_local.h.

◆ IT_AMMO

#define IT_AMMO   2

Definition at line 215 of file g_local.h.

◆ IT_ARMOR

#define IT_ARMOR   4

Definition at line 216 of file g_local.h.

◆ IT_KEY

#define IT_KEY   16

Definition at line 218 of file g_local.h.

◆ IT_POWERUP

#define IT_POWERUP   32

Definition at line 219 of file g_local.h.

◆ IT_STAY_COOP

#define IT_STAY_COOP   8

Definition at line 217 of file g_local.h.

◆ IT_WEAPON

#define IT_WEAPON   1

Definition at line 214 of file g_local.h.

◆ ITEM_INDEX

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

Definition at line 610 of file g_local.h.

◆ ITEM_NO_TOUCH

#define ITEM_NO_TOUCH   0x00000002

Definition at line 554 of file g_local.h.

◆ ITEM_TARGETS_USED

#define ITEM_TARGETS_USED   0x00040000

Definition at line 559 of file g_local.h.

◆ ITEM_TRIGGER_SPAWN

#define ITEM_TRIGGER_SPAWN   0x00000001

Definition at line 553 of file g_local.h.

◆ LEFT_HANDED

#define LEFT_HANDED   1

Definition at line 163 of file g_local.h.

◆ LLOFS

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

Definition at line 506 of file g_local.h.

◆ MELEE_DISTANCE

#define MELEE_DISTANCE   80

Definition at line 80 of file g_local.h.

◆ MOD_BARREL

#define MOD_BARREL   26

Definition at line 489 of file g_local.h.

◆ MOD_BFG_BLAST

#define MOD_BFG_BLAST   13

Definition at line 476 of file g_local.h.

◆ MOD_BFG_EFFECT

#define MOD_BFG_EFFECT   14

Definition at line 477 of file g_local.h.

◆ MOD_BFG_LASER

#define MOD_BFG_LASER   12

Definition at line 475 of file g_local.h.

◆ MOD_BLASTER

#define MOD_BLASTER   1

Definition at line 464 of file g_local.h.

◆ MOD_BOMB

#define MOD_BOMB   27

Definition at line 490 of file g_local.h.

◆ MOD_CHAINGUN

#define MOD_CHAINGUN   5

Definition at line 468 of file g_local.h.

◆ MOD_CRUSH

#define MOD_CRUSH   20

Definition at line 483 of file g_local.h.

◆ MOD_EXIT

#define MOD_EXIT   28

Definition at line 491 of file g_local.h.

◆ MOD_EXPLOSIVE

#define MOD_EXPLOSIVE   25

Definition at line 488 of file g_local.h.

◆ MOD_FALLING

#define MOD_FALLING   22

Definition at line 485 of file g_local.h.

◆ MOD_FRIENDLY_FIRE

#define MOD_FRIENDLY_FIRE   0x8000000

Definition at line 497 of file g_local.h.

◆ MOD_G_SPLASH

#define MOD_G_SPLASH   7

Definition at line 470 of file g_local.h.

◆ MOD_GRENADE

#define MOD_GRENADE   6

Definition at line 469 of file g_local.h.

◆ MOD_HANDGRENADE

#define MOD_HANDGRENADE   15

Definition at line 478 of file g_local.h.

◆ MOD_HELD_GRENADE

#define MOD_HELD_GRENADE   24

Definition at line 487 of file g_local.h.

◆ MOD_HG_SPLASH

#define MOD_HG_SPLASH   16

Definition at line 479 of file g_local.h.

◆ MOD_HIT

#define MOD_HIT   32

Definition at line 495 of file g_local.h.

◆ MOD_HYPERBLASTER

#define MOD_HYPERBLASTER   10

Definition at line 473 of file g_local.h.

◆ MOD_LAVA

#define MOD_LAVA   19

Definition at line 482 of file g_local.h.

◆ MOD_MACHINEGUN

#define MOD_MACHINEGUN   4

Definition at line 467 of file g_local.h.

◆ MOD_R_SPLASH

#define MOD_R_SPLASH   9

Definition at line 472 of file g_local.h.

◆ MOD_RAILGUN

#define MOD_RAILGUN   11

Definition at line 474 of file g_local.h.

◆ MOD_ROCKET

#define MOD_ROCKET   8

Definition at line 471 of file g_local.h.

◆ MOD_SHOTGUN

#define MOD_SHOTGUN   2

Definition at line 465 of file g_local.h.

◆ MOD_SLIME

#define MOD_SLIME   18

Definition at line 481 of file g_local.h.

◆ MOD_SPLASH

#define MOD_SPLASH   29

Definition at line 492 of file g_local.h.

◆ MOD_SSHOTGUN

#define MOD_SSHOTGUN   3

Definition at line 466 of file g_local.h.

◆ MOD_SUICIDE

#define MOD_SUICIDE   23

Definition at line 486 of file g_local.h.

◆ MOD_TARGET_BLASTER

#define MOD_TARGET_BLASTER   33

Definition at line 496 of file g_local.h.

◆ MOD_TARGET_LASER

#define MOD_TARGET_LASER   30

Definition at line 493 of file g_local.h.

◆ MOD_TELEFRAG

#define MOD_TELEFRAG   21

Definition at line 484 of file g_local.h.

◆ MOD_TRIGGER_HURT

#define MOD_TRIGGER_HURT   31

Definition at line 494 of file g_local.h.

◆ MOD_UNKNOWN

#define MOD_UNKNOWN   0

Definition at line 463 of file g_local.h.

◆ MOD_WATER

#define MOD_WATER   17

Definition at line 480 of file g_local.h.

◆ PNOISE_IMPACT

#define PNOISE_IMPACT   2

Definition at line 182 of file g_local.h.

◆ PNOISE_SELF

#define PNOISE_SELF   0

Definition at line 180 of file g_local.h.

◆ PNOISE_WEAPON

#define PNOISE_WEAPON   1

Definition at line 181 of file g_local.h.

◆ POWER_ARMOR_NONE

#define POWER_ARMOR_NONE   0

Definition at line 157 of file g_local.h.

◆ POWER_ARMOR_SCREEN

#define POWER_ARMOR_SCREEN   1

Definition at line 158 of file g_local.h.

◆ POWER_ARMOR_SHIELD

#define POWER_ARMOR_SHIELD   2

Definition at line 159 of file g_local.h.

◆ random

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

Definition at line 509 of file g_local.h.

◆ RANGE_FAR

#define RANGE_FAR   3

Definition at line 120 of file g_local.h.

◆ RANGE_MELEE

#define RANGE_MELEE   0

Definition at line 117 of file g_local.h.

◆ RANGE_MID

#define RANGE_MID   2

Definition at line 119 of file g_local.h.

◆ RANGE_NEAR

#define RANGE_NEAR   1

Definition at line 118 of file g_local.h.

◆ RIGHT_HANDED

#define RIGHT_HANDED   0

Definition at line 162 of file g_local.h.

◆ SFL_CROSS_TRIGGER_1

#define SFL_CROSS_TRIGGER_1   0x00000001

Definition at line 168 of file g_local.h.

◆ SFL_CROSS_TRIGGER_2

#define SFL_CROSS_TRIGGER_2   0x00000002

Definition at line 169 of file g_local.h.

◆ SFL_CROSS_TRIGGER_3

#define SFL_CROSS_TRIGGER_3   0x00000004

Definition at line 170 of file g_local.h.

◆ SFL_CROSS_TRIGGER_4

#define SFL_CROSS_TRIGGER_4   0x00000008

Definition at line 171 of file g_local.h.

◆ SFL_CROSS_TRIGGER_5

#define SFL_CROSS_TRIGGER_5   0x00000010

Definition at line 172 of file g_local.h.

◆ SFL_CROSS_TRIGGER_6

#define SFL_CROSS_TRIGGER_6   0x00000020

Definition at line 173 of file g_local.h.

◆ SFL_CROSS_TRIGGER_7

#define SFL_CROSS_TRIGGER_7   0x00000040

Definition at line 174 of file g_local.h.

◆ SFL_CROSS_TRIGGER_8

#define SFL_CROSS_TRIGGER_8   0x00000080

Definition at line 175 of file g_local.h.

◆ SFL_CROSS_TRIGGER_MASK

#define SFL_CROSS_TRIGGER_MASK   0x000000ff

Definition at line 176 of file g_local.h.

◆ SPAWNFLAG_NOT_COOP

#define SPAWNFLAG_NOT_COOP   0x00001000

Definition at line 54 of file g_local.h.

◆ SPAWNFLAG_NOT_DEATHMATCH

#define SPAWNFLAG_NOT_DEATHMATCH   0x00000800

Definition at line 53 of file g_local.h.

◆ SPAWNFLAG_NOT_EASY

#define SPAWNFLAG_NOT_EASY   0x00000100

Definition at line 50 of file g_local.h.

◆ SPAWNFLAG_NOT_HARD

#define SPAWNFLAG_NOT_HARD   0x00000400

Definition at line 52 of file g_local.h.

◆ SPAWNFLAG_NOT_MEDIUM

#define SPAWNFLAG_NOT_MEDIUM   0x00000200

Definition at line 51 of file g_local.h.

◆ STOFS

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

Definition at line 505 of file g_local.h.

◆ svc_inventory

#define svc_inventory   5

Definition at line 38 of file g_local.h.

◆ svc_layout

#define svc_layout   4

Definition at line 37 of file g_local.h.

◆ svc_muzzleflash

#define svc_muzzleflash   1

Definition at line 34 of file g_local.h.

◆ svc_muzzleflash2

#define svc_muzzleflash2   2

Definition at line 35 of file g_local.h.

◆ svc_stufftext

#define svc_stufftext   11

Definition at line 39 of file g_local.h.

◆ svc_temp_entity

#define svc_temp_entity   3

Definition at line 36 of file g_local.h.

◆ TAG_GAME

#define TAG_GAME   765

Definition at line 76 of file g_local.h.

◆ TAG_LEVEL

#define TAG_LEVEL   766

Definition at line 77 of file g_local.h.

◆ WEAP_BFG

#define WEAP_BFG   11

Definition at line 232 of file g_local.h.

◆ WEAP_BLASTER

#define WEAP_BLASTER   1

Definition at line 222 of file g_local.h.

◆ WEAP_CHAINGUN

#define WEAP_CHAINGUN   5

Definition at line 226 of file g_local.h.

◆ WEAP_GRENADELAUNCHER

#define WEAP_GRENADELAUNCHER   7

Definition at line 228 of file g_local.h.

◆ WEAP_GRENADES

#define WEAP_GRENADES   6

Definition at line 227 of file g_local.h.

◆ WEAP_HYPERBLASTER

#define WEAP_HYPERBLASTER   9

Definition at line 230 of file g_local.h.

◆ WEAP_MACHINEGUN

#define WEAP_MACHINEGUN   4

Definition at line 225 of file g_local.h.

◆ WEAP_RAILGUN

#define WEAP_RAILGUN   10

Definition at line 231 of file g_local.h.

◆ WEAP_ROCKETLAUNCHER

#define WEAP_ROCKETLAUNCHER   8

Definition at line 229 of file g_local.h.

◆ WEAP_SHOTGUN

#define WEAP_SHOTGUN   2

Definition at line 223 of file g_local.h.

◆ WEAP_SUPERSHOTGUN

#define WEAP_SUPERSHOTGUN   3

Definition at line 224 of file g_local.h.

◆ world

#define world   (&g_edicts[0])

Definition at line 550 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 99 of file g_local.h.

100 {
101  AMMO_BULLETS,
102  AMMO_SHELLS,
103  AMMO_ROCKETS,
105  AMMO_CELLS,
106  AMMO_SLUGS
107 } ammo_t;

◆ damage_t

enum damage_t
Enumerator
DAMAGE_NO 
DAMAGE_YES 
DAMAGE_AIM 

Definition at line 84 of file g_local.h.

85 {
86  DAMAGE_NO,
87  DAMAGE_YES, // will take damage if hit
88  DAMAGE_AIM // auto targeting recognizes this
89 } 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 568 of file g_local.h.

568  {
569  F_INT,
570  F_FLOAT,
571  F_LSTRING, // string on disk, pointer in memory, TAG_LEVEL
572  F_GSTRING, // string on disk, pointer in memory, TAG_GAME
573  F_VECTOR,
574  F_ANGLEHACK,
575  F_EDICT, // index on disk, pointer in memory
576  F_ITEM, // index on disk, pointer in memory
577  F_CLIENT, // index on disk, pointer in memory
578  F_FUNCTION,
579  F_MMOVE,
580  F_IGNORE
581 } 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 186 of file g_local.h.

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

◆ weaponstate_t

Enumerator
WEAPON_READY 
WEAPON_ACTIVATING 
WEAPON_DROPPING 
WEAPON_FIRING 

Definition at line 91 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 915 of file g_ai.c.

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

◆ 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 73 of file p_hud.c.

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

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 346 of file p_hud.c.

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

Referenced by ClientCommand(), and player_die().

◆ Cmd_Score_f()

void Cmd_Score_f ( edict_t ent)

Definition at line 276 of file p_hud.c.

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

Referenced by ClientCommand(), and Cmd_Help_f().

◆ DeathmatchScoreboardMessage()

void DeathmatchScoreboardMessage ( edict_t client,
edict_t killer 
)

Definition at line 164 of file p_hud.c.

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

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 883 of file g_weapon.c.

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

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  tr = gi.trace (from, NULL, NULL, end, ignore, mask);
674 
677  water = true;
678  }
679  else {
680  //ZOID--added so rail goes through SOLID_BBOX entities (gibs, etc)
681  if ((tr.ent->svflags & SVF_MONSTER) || (tr.ent->client) ||
682  (tr.ent->solid == SOLID_BBOX))
683  ignore = tr.ent;
684  else
685  ignore = NULL;
686 
687  if ((tr.ent != self) && (tr.ent->takedamage))
688  T_Damage (tr.ent, self, self, aimdir, tr.endpos, tr.plane.normal, damage, kick, 0, MOD_RAILGUN);
689  else
690  ignore = NULL;
691  }
692 
693  VectorCopy (tr.endpos, from);
694  }
695 
696  // send gun puff / flash
699  gi.WritePosition (start);
700  gi.WritePosition (tr.endpos);
701  gi.multicast (self->s.origin, MULTICAST_PHS);
702 // gi.multicast (start, MULTICAST_PHS);
703  if (water)
704  {
707  gi.WritePosition (start);
708  gi.WritePosition (tr.endpos);
710  }
711 
712  if (self->client)
713  PlayerNoise(self, tr.endpos, PNOISE_IMPACT);
714 }

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 532 of file p_hud.c.

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

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 (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 551 of file p_hud.c.

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

Referenced by ClientEndServerFrame(), and G_CheckChaseStats().

◆ G_SetStats()

void G_SetStats ( edict_t ent)

Definition at line 377 of file p_hud.c.

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

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 32 of file p_hud.c.

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

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 378 of file g_combat.c.

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

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 548 of file g_combat.c.

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

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().

◆ 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 27 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 530 of file g_local.h.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ gun_z

cvar_t * gun_z

Definition at line 530 of file g_local.h.

Referenced by InitGame(), and SV_CalcGunOffset().

◆ itemlist

◆ 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(), 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:1079
entity_state_s::old_origin
vec3_t old_origin
Definition: q_shared.h:1175
gi
game_import_t gi
Definition: g_main.c:25
trace_t::contents
int contents
Definition: q_shared.h:457
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:276
IT_AMMO
#define IT_AMMO
Definition: g_local.h:215
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:1034
game_import_t::dprintf
void(* dprintf)(char *fmt,...)
Definition: game.h:106
MAX_CLIENTS
#define MAX_CLIENTS
Definition: q_shared.h:79
cplane_s::normal
vec3_t normal
Definition: q_shared.h:411
edict_s::s
entity_state_t s
Definition: g_local.h:964
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:909
G_SetSpectatorStats
void G_SetSpectatorStats(edict_t *ent)
Definition: p_hud.c:551
RANGE_NEAR
#define RANGE_NEAR
Definition: g_local.h:118
edict_s::groundentity
edict_t * groundentity
Definition: g_local.h:1073
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:578
edict_s::timestamp
float timestamp
Definition: g_local.h:1008
client_persistant_t::spectator
qboolean spectator
Definition: g_local.h:861
client_persistant_t::selected_item
int selected_item
Definition: g_local.h:841
client_persistant_t::max_grenades
int max_grenades
Definition: g_local.h:848
gclient_s::oldviewangles
vec3_t oldviewangles
Definition: g_local.h:923
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:66
player_state_t::gunframe
int gunframe
Definition: q_shared.h:1212
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:113
AMMO_ROCKETS
@ AMMO_ROCKETS
Definition: g_local.h:103
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
AI_COMBAT_POINT
#define AI_COMBAT_POINT
Definition: g_local.h:139
MASK_MONSTERSOLID
#define MASK_MONSTERSOLID
Definition: q_shared.h:394
gclient_s::v_angle
vec3_t v_angle
Definition: g_local.h:921
STAT_HEALTH
#define STAT_HEALTH
Definition: q_shared.h:1026
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:998
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:453
MZ_SILENCED
#define MZ_SILENCED
Definition: q_shared.h:676
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:939
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:80
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
CHAN_ITEM
#define CHAN_ITEM
Definition: q_shared.h:1010
AI_TEMP_STAND_GROUND
#define AI_TEMP_STAND_GROUND
Definition: g_local.h:128
FRAME_crpain1
#define FRAME_crpain1
Definition: m_player.h:193
gclient_s::kick_origin
vec3_t kick_origin
Definition: g_local.h:915
entity_state_s::frame
int frame
Definition: q_shared.h:1178
ANIM_DEATH
#define ANIM_DEATH
Definition: g_local.h:822
edict_s::absmax
vec3_t absmax
Definition: g_local.h:985
F_IGNORE
@ F_IGNORE
Definition: g_local.h:580
TE_EXPLOSION1
@ TE_EXPLOSION1
Definition: q_shared.h:940
STAT_HEALTH_ICON
#define STAT_HEALTH_ICON
Definition: q_shared.h:1025
gclient_s::update_chase
qboolean update_chase
Definition: g_local.h:958
EV_PLAYER_TELEPORT
@ EV_PLAYER_TELEPORT
Definition: q_shared.h:1161
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:135
game_import_t::WritePosition
void(* WritePosition)(vec3_t pos)
Definition: game.h:152
trace_t::plane
cplane_t plane
Definition: q_shared.h:455
PlayerTrail_PickNext
edict_t * PlayerTrail_PickNext(edict_t *self)
Definition: p_trail.c:124
WEAPON_DROPPING
@ WEAPON_DROPPING
Definition: g_local.h:95
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:1067
AMMO_BULLETS
@ AMMO_BULLETS
Definition: g_local.h:101
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
gitem_s::precaches
char * precaches
Definition: g_local.h:260
STAT_HELPICON
#define STAT_HELPICON
Definition: q_shared.h:1036
bottom
GLdouble GLdouble bottom
Definition: qgl_win.c:159
client_persistant_t::connected
qboolean connected
Definition: g_local.h:833
BODY_QUEUE_SIZE
#define BODY_QUEUE_SIZE
Definition: g_local.h:82
monster_start
qboolean monster_start(edict_t *self)
Definition: g_monster.c:534
PNOISE_WEAPON
#define PNOISE_WEAPON
Definition: g_local.h:181
FRAMETIME
#define FRAMETIME
Definition: g_local.h:73
edict_s::movetarget
edict_t * movetarget
Definition: g_local.h:1032
client_persistant_t::helpchanged
int helpchanged
Definition: g_local.h:859
TE_BLOOD
@ TE_BLOOD
Definition: q_shared.h:936
gclient_s::anim_end
int anim_end
Definition: g_local.h:933
DeathmatchScoreboard
void DeathmatchScoreboard(edict_t *ent)
Definition: p_hud.c:262
WEAPON_READY
@ WEAPON_READY
Definition: g_local.h:93
ITEM_TARGETS_USED
#define ITEM_TARGETS_USED
Definition: g_local.h:559
PMF_NO_PREDICTION
#define PMF_NO_PREDICTION
Definition: q_shared.h:483
monsterinfo_t::attack
void(* attack)(edict_t *self)
Definition: g_local.h:429
entity_state_s::renderfx
int renderfx
Definition: q_shared.h:1181
PM_FREEZE
@ PM_FREEZE
Definition: q_shared.h:473
AMMO_SHELLS
@ AMMO_SHELLS
Definition: g_local.h:102
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:573
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:571
ai_checkattack
qboolean ai_checkattack(edict_t *self, float dist)
Definition: g_ai.c:771
MOVETYPE_NOCLIP
@ MOVETYPE_NOCLIP
Definition: g_local.h:189
MOVETYPE_STOP
@ MOVETYPE_STOP
Definition: g_local.h:191
FRAME_crdeath5
#define FRAME_crdeath5
Definition: m_player.h:201
combat_armor_index
static 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:1173
game_locals_t::helpchanged
int helpchanged
Definition: g_local.h:274
client_respawn_t::coop_respawn
client_persistant_t coop_respawn
Definition: g_local.h:867
edict_s::linkcount
int linkcount
Definition: g_local.h:971
SVF_NOCLIENT
#define SVF_NOCLIENT
Definition: game.h:27
monsterinfo_t::search
void(* search)(edict_t *self)
Definition: g_local.h:425
CS_ITEMS
#define CS_ITEMS
Definition: q_shared.h:1140
G_SetClientSound
void G_SetClientSound(edict_t *ent)
Definition: p_view.c:815
AI_LOST_SIGHT
#define AI_LOST_SIGHT
Definition: g_local.h:130
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:1059
TE_RAILTRAIL
@ TE_RAILTRAIL
Definition: q_shared.h:938
edict_s::air_finished
float air_finished
Definition: g_local.h:1027
gitem_s::pickup
qboolean(* pickup)(struct edict_s *ent, struct edict_s *other)
Definition: g_local.h:237
FRAME_pain304
#define FRAME_pain304
Definition: m_boss31.h:114
gclient_s::showhelp
qboolean showhelp
Definition: g_local.h:890
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:28
monsterinfo_t::last_sighting
vec3_t last_sighting
Definition: g_local.h:440
ITEM_INDEX
#define ITEM_INDEX(x)
Definition: g_local.h:610
MASK_WATER
#define MASK_WATER
Definition: q_shared.h:395
FL_POWER_ARMOR
#define FL_POWER_ARMOR
Definition: g_local.h:69
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:127
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:243
qboolean
qboolean
Definition: q_shared.h:56
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:970
DAMAGE_RADIUS
#define DAMAGE_RADIUS
Definition: g_local.h:657
trace_t
Definition: q_shared.h:449
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:883
VectorClear
#define VectorClear(a)
Definition: q_shared.h:159
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:190
MOVETYPE_FLYMISSILE
@ MOVETYPE_FLYMISSILE
Definition: g_local.h:197
MOD_RAILGUN
#define MOD_RAILGUN
Definition: g_local.h:474
DF_INFINITE_AMMO
#define DF_INFINITE_AMMO
Definition: q_shared.h:1061
MOD_TELEFRAG
#define MOD_TELEFRAG
Definition: g_local.h:484
edict_s::max_health
int max_health
Definition: g_local.h:1052
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:87
EF_BFG
#define EF_BFG
Definition: q_shared.h:564
edict_s::client
struct gclient_s * client
Definition: g_local.h:965
gclient_s::kick_angles
vec3_t kick_angles
Definition: g_local.h:914
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:65
Think_Weapon
void Think_Weapon(edict_t *ent)
Definition: p_weapon.c:282
FOFS
#define FOFS(x)
Definition: g_local.h:504
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:872
edict_s::movedir
vec3_t movedir
Definition: g_local.h:1021
MASK_SHOT
#define MASK_SHOT
Definition: q_shared.h:397
DoRespawn
void DoRespawn(edict_t *ent)
Definition: g_items.c:119
gclient_s::grenade_time
float grenade_time
Definition: g_local.h:945
FL_NO_KNOCKBACK
#define FL_NO_KNOCKBACK
Definition: g_local.h:68
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:77
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:94
client_persistant_t::userinfo
char userinfo[MAX_INFO_STRING]
Definition: g_local.h:829
AI_PURSUE_TEMP
#define AI_PURSUE_TEMP
Definition: g_local.h:133
bfg_touch
void bfg_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: g_weapon.c:766
F_ITEM
@ F_ITEM
Definition: g_local.h:576
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:984
DF_NO_ITEMS
#define DF_NO_ITEMS
Definition: q_shared.h:1049
meansOfDeath
int meansOfDeath
Definition: g_main.c:31
edict_s::prethink
void(* prethink)(edict_t *ent)
Definition: g_local.h:1037
range
GLsizei range
Definition: qgl_win.c:121
pmove_state_t::velocity
short velocity[3]
Definition: q_shared.h:495
ammo_t
ammo_t
Definition: g_local.h:99
client_persistant_t::max_slugs
int max_slugs
Definition: g_local.h:850
player_state_t::fov
float fov
Definition: q_shared.h:1216
body_armor_index
static int body_armor_index
Definition: g_items.c:45
gclient_s::pickup_msg_time
float pickup_msg_time
Definition: g_local.h:949
ArmorIndex
int ArmorIndex(edict_t *ent)
Definition: g_items.c:590
STAT_SELECTED_ITEM
#define STAT_SELECTED_ITEM
Definition: q_shared.h:1037
M_PI
#define M_PI
Definition: q_shared.h:135
gclient_s::bobtime
float bobtime
Definition: g_local.h:922
monsterinfo_t::attack_state
int attack_state
Definition: g_local.h:441
gclient_s::oldvelocity
vec3_t oldvelocity
Definition: g_local.h:924
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:1019
F_EDICT
@ F_EDICT
Definition: g_local.h:575
STAT_PICKUP_ICON
#define STAT_PICKUP_ICON
Definition: q_shared.h:1032
client_persistant_t::max_bullets
int max_bullets
Definition: g_local.h:845
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:378
edict_s::groundentity_linkcount
int groundentity_linkcount
Definition: g_local.h:1074
TossClientWeapon
void TossClientWeapon(edict_t *self)
Definition: p_client.c:410
weaponstate_t
weaponstate_t
Definition: g_local.h:91
DF_FORCE_RESPAWN
#define DF_FORCE_RESPAWN
Definition: q_shared.h:1058
itemlist
gitem_t itemlist[]
Definition: g_items.c:1134
DF_FIXED_FOV
#define DF_FIXED_FOV
Definition: q_shared.h:1063
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:507
gclient_s::bonus_alpha
float bonus_alpha
Definition: g_local.h:919
edict_s::movetype
int movetype
Definition: g_local.h:995
client_persistant_t::inventory
int inventory[MAX_ITEMS]
Definition: g_local.h:842
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:194
STAT_FRAGS
#define STAT_FRAGS
Definition: q_shared.h:1039
MAX_INFO_STRING
#define MAX_INFO_STRING
Definition: q_shared.h:252
entity_state_s::effects
unsigned int effects
Definition: q_shared.h:1180
DAMAGE_NO_KNOCKBACK
#define DAMAGE_NO_KNOCKBACK
Definition: g_local.h:660
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:247
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:58
j
GLint j
Definition: qgl_win.c:150
F_FLOAT
@ F_FLOAT
Definition: g_local.h:570
IT_KEY
#define IT_KEY
Definition: g_local.h:218
STAT_AMMO_ICON
#define STAT_AMMO_ICON
Definition: q_shared.h:1027
EF_GRENADE
#define EF_GRENADE
Definition: q_shared.h:562
entity_state_s::sound
int sound
Definition: q_shared.h:1185
gclient_s::enviro_framenum
float enviro_framenum
Definition: g_local.h:942
MoveClientToIntermission
void MoveClientToIntermission(edict_t *ent)
Definition: p_hud.c:32
STAT_ARMOR_ICON
#define STAT_ARMOR_ICON
Definition: q_shared.h:1029
gclient_s::pers
client_persistant_t pers
Definition: g_local.h:884
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:820
client_persistant_t::max_shells
int max_shells
Definition: g_local.h:846
SV_CalcGunOffset
void SV_CalcGunOffset(edict_t *ent)
Definition: p_view.c:345
MASK_SOLID
#define MASK_SOLID
Definition: q_shared.h:391
client_respawn_t::score
int score
Definition: g_local.h:869
gitem_s::use
void(* use)(struct edict_s *ent, struct gitem_s *item)
Definition: g_local.h:238
G_SetStats
void G_SetStats(edict_t *ent)
Definition: p_hud.c:377
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
gclient_s::newweapon
gitem_t * newweapon
Definition: g_local.h:901
edict_s::message
char * message
Definition: g_local.h:1004
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:1007
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:110
DF_NO_HEALTH
#define DF_NO_HEALTH
Definition: q_shared.h:1048
jacket_armor_index
static int jacket_armor_index
Definition: g_items.c:43
POWER_ARMOR_SHIELD
#define POWER_ARMOR_SHIELD
Definition: g_local.h:159
trace_t::allsolid
qboolean allsolid
Definition: q_shared.h:451
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:158
edict_s::svflags
int svflags
Definition: g_local.h:983
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:1009
DAMAGE_BULLET
#define DAMAGE_BULLET
Definition: g_local.h:661
PMF_TIME_TELEPORT
#define PMF_TIME_TELEPORT
Definition: q_shared.h:482
edict_s::item
gitem_t * item
Definition: g_local.h:1104
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:662
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:905
gclient_s::weapon_thunk
qboolean weapon_thunk
Definition: g_local.h:899
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:1005
edict_s
Definition: g_local.h:962
G_SetClientEffects
void G_SetClientEffects(edict_t *ent)
Definition: p_view.c:745
edict_s::mass
int mass
Definition: g_local.h:1026
VEC_DOWN
vec3_t VEC_DOWN
Definition: g_utils.c:311
gitem_s::world_model
char * world_model
Definition: g_local.h:242
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:70
EF_ROCKET
#define EF_ROCKET
Definition: q_shared.h:561
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:434
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:492
monsterinfo_t::search_time
float search_time
Definition: g_local.h:438
movetype_t
movetype_t
Definition: g_local.h:186
client_persistant_t::weapon
gitem_t * weapon
Definition: g_local.h:852
MOVETYPE_NONE
@ MOVETYPE_NONE
Definition: g_local.h:188
F_CLIENT
@ F_CLIENT
Definition: g_local.h:577
M_FliesOn
static void M_FliesOn(edict_t *self)
Definition: g_monster.c:113
edict_s::mynoise
edict_t * mynoise
Definition: g_local.h:1078
AS_SLIDING
#define AS_SLIDING
Definition: g_local.h:145
gitem_s::ammo
char * ammo
Definition: g_local.h:252
SV_Physics_None
void SV_Physics_None(edict_t *ent)
Definition: g_phys.c:630
edict_s::viewheight
int viewheight
Definition: g_local.h:1061
fieldtype_t
fieldtype_t
Definition: g_local.h:568
droptofloor
void droptofloor(edict_t *ent)
Definition: g_items.c:918
ROLL
#define ROLL
Definition: q_shared.h:67
DF_SKINTEAMS
#define DF_SKINTEAMS
Definition: q_shared.h:1054
DROPPED_PLAYER_ITEM
#define DROPPED_PLAYER_ITEM
Definition: g_local.h:558
game_locals_t::num_items
int num_items
Definition: g_local.h:291
client_persistant_t
Definition: g_local.h:827
MOD_HIT
#define MOD_HIT
Definition: g_local.h:495
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:1204
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:437
TRAIL_LENGTH
#define TRAIL_LENGTH
Definition: p_trail.c:39
edict_s::clipmask
int clipmask
Definition: g_local.h:987
edict_s::spawnflags
int spawnflags
Definition: g_local.h:1006
Svcmd_Test_f
void Svcmd_Test_f(void)
Definition: g_svcmds.c:24
gclient_s::damage_knockback
int damage_knockback
Definition: g_local.h:908
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
crandom
#define crandom()
Definition: g_local.h:510
player_state_t::pmove
pmove_state_t pmove
Definition: q_shared.h:1200
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:61
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:988
AREA_TRIGGERS
#define AREA_TRIGGERS
Definition: q_shared.h:404
STAT_TIMER
#define STAT_TIMER
Definition: q_shared.h:1035
Info_ValueForKey
char * Info_ValueForKey(char *s, char *key)
Definition: q_shared.c:1266
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:147
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
TE_SPARKS
@ TE_SPARKS
Definition: q_shared.h:944
player_state_t::blend
float blend[4]
Definition: q_shared.h:1214
ClientTeam
char * ClientTeam(edict_t *ent)
Definition: g_cmds.c:24
CS_PLAYERSKINS
#define CS_PLAYERSKINS
Definition: q_shared.h:1141
EF_GIB
#define EF_GIB
Definition: q_shared.h:559
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:1054
client_persistant_t::savedFlags
int savedFlags
Definition: g_local.h:839
M_WorldEffects
void M_WorldEffects(edict_t *ent)
Definition: g_monster.c:218
damage_t
damage_t
Definition: g_local.h:84
client_respawn_t::cmd_angles
vec3_t cmd_angles
Definition: g_local.h:870
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:155
game_locals_t::clients
gclient_t * clients
Definition: g_local.h:277
edict_s::dmg_radius
float dmg_radius
Definition: g_local.h:1065
OnSameTeam
qboolean OnSameTeam(edict_t *ent1, edict_t *ent2)
Definition: g_cmds.c:49
edict_s::nextthink
float nextthink
Definition: g_local.h:1036
client_respawn_t
Definition: g_local.h:865
gclient_s::killer_yaw
float killer_yaw
Definition: g_local.h:911
cvar_s::value
float value
Definition: q_shared.h:324
vtos
char * vtos(vec3_t v)
Definition: g_utils.c:293
AI_PURSUIT_LAST_SEEN
#define AI_PURSUIT_LAST_SEEN
Definition: g_local.h:131
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:164
edict_s::think
void(* think)(edict_t *self)
Definition: g_local.h:1038
monsterinfo_t::linkcount
int linkcount
Definition: g_local.h:444
PRINT_HIGH
#define PRINT_HIGH
Definition: q_shared.h:92
random
#define random()
Definition: g_local.h:509
WEAPON_FIRING
@ WEAPON_FIRING
Definition: g_local.h:96
pmove_state_t::delta_angles
short delta_angles[3]
Definition: q_shared.h:499
bobcycle
int bobcycle
Definition: p_view.c:33
DAMAGE_NO
@ DAMAGE_NO
Definition: g_local.h:86
CheckTeamDamage
qboolean CheckTeamDamage(edict_t *targ, edict_t *attacker)
Definition: g_combat.c:371
FL_NOTARGET
#define FL_NOTARGET
Definition: g_local.h:62
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:248
EF_ANIM_ALLFAST
#define EF_ANIM_ALLFAST
Definition: q_shared.h:570
gclient_s::ps
player_state_t ps
Definition: g_local.h:880
G_InitEdict
void G_InitEdict(edict_t *e)
Definition: g_utils.c:401
edict_s::watertype
int watertype
Definition: g_local.h:1093
edict_s::noise_index
int noise_index
Definition: g_local.h:1081
entity_state_s::number
int number
Definition: q_shared.h:1171
NULL
#define NULL
Definition: q_shared.h:60
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:986
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:256
gclient_s::weaponstate
weaponstate_t weaponstate
Definition: g_local.h:913
AMMO_GRENADES
@ AMMO_GRENADES
Definition: g_local.h:104
respawn
void respawn(edict_t *ent)
Definition: p_client.c:980
F_MMOVE
@ F_MMOVE
Definition: g_local.h:579
STAT_ARMOR
#define STAT_ARMOR
Definition: q_shared.h:1030
RF_GLOW
#define RF_GLOW
Definition: q_shared.h:622
svc_layout
@ svc_layout
Definition: qcommon.h:211
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:85
PNOISE_IMPACT
#define PNOISE_IMPACT
Definition: g_local.h:182
G_SetClientEvent
void G_SetClientEvent(edict_t *ent)
Definition: p_view.c:798
current
static int current
Definition: cl_scrn.c:131
MOVETYPE_WALK
@ MOVETYPE_WALK
Definition: g_local.h:193
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:419
is_silenced
static byte is_silenced
Definition: p_weapon.c:27
PM_DEAD
@ PM_DEAD
Definition: q_shared.h:471
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:930
edict_s::goalentity
edict_t * goalentity
Definition: g_local.h:1031
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1192
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:1063
edict_s::pain
void(* pain)(edict_t *self, edict_t *other, float kick, int damage)
Definition: g_local.h:1042
STAT_SPECTATOR
#define STAT_SPECTATOR
Definition: q_shared.h:1042
MASK_OPAQUE
#define MASK_OPAQUE
Definition: q_shared.h:396
client_respawn_t::enterframe
int enterframe
Definition: g_local.h:868
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1024
HelpComputer
void HelpComputer(edict_t *ent)
Definition: p_hud.c:302
gclient_s::breather_framenum
float breather_framenum
Definition: g_local.h:941
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:157
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
game_locals_t::autosaved
qboolean autosaved
Definition: g_local.h:293
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:111
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:939
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:210
Cmd_Help_f
void Cmd_Help_f(edict_t *ent)
Definition: p_hud.c:346
RDF_UNDERWATER
#define RDF_UNDERWATER
Definition: q_shared.h:645
game_import_t::error
void(* error)(char *fmt,...)
Definition: game.h:118
entity_state_s::skinnum
int skinnum
Definition: q_shared.h:1179
edict_s::radius_dmg
int radius_dmg
Definition: g_local.h:1064
DROPPED_ITEM
#define DROPPED_ITEM
Definition: g_local.h:557
gclient_s::showscores
qboolean showscores
Definition: g_local.h:888
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:241
edict_s::yaw_speed
float yaw_speed
Definition: g_local.h:1033
PlayerTrail_PickFirst
edict_t * PlayerTrail_PickFirst(edict_t *self)
Definition: p_trail.c:95
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
coop
cvar_t * coop
Definition: g_main.c:36
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1046
client_persistant_t::lastweapon
gitem_t * lastweapon
Definition: g_local.h:853
AI_SOUND_TARGET
#define AI_SOUND_TARGET
Definition: g_local.h:129
G_SetSpectatorStats
void G_SetSpectatorStats(edict_t *ent)
Definition: p_hud.c:551
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:1108
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:847
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:454
power_screen_index
static 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:1033
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:420
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:117
M_ReactToDamage
void M_ReactToDamage(edict_t *targ, edict_t *attacker)
Definition: g_combat.c:296
SVCmd_RemoveIP_f
void SVCmd_RemoveIP_f(void)
Definition: g_svcmds.c:189
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:88
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:403
up
static vec3_t up
Definition: p_view.c:29
PNOISE_SELF
#define PNOISE_SELF
Definition: g_local.h:180
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:1008
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:1062
gitem_s::weapmodel
int weapmodel
Definition: g_local.h:255
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:443
gitem_s::weaponthink
void(* weaponthink)(struct edict_s *ent)
Definition: g_local.h:240
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:996
IT_STAY_COOP
#define IT_STAY_COOP
Definition: g_local.h:217
CENTER_HANDED
#define CENTER_HANDED
Definition: g_local.h:164
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:123
client_persistant_t::game_helpchanged
int game_helpchanged
Definition: g_local.h:858
gclient_s::showinventory
qboolean showinventory
Definition: g_local.h:889
NEXT
#define NEXT(n)
Definition: p_trail.c:45
gclient_s::invincible_framenum
float invincible_framenum
Definition: g_local.h:940
gitem_s::drop
void(* drop)(struct edict_s *ent, struct gitem_s *item)
Definition: g_local.h:239
MAXCHOICES
#define MAXCHOICES
Definition: g_utils.c:116
sqrt
double sqrt(double x)
client_state_t::inventory
int inventory[MAX_ITEMS]
Definition: client.h:159
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:1034
edict_s::teleport_time
float teleport_time
Definition: g_local.h:1091
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:984
gclient_s::ammo_index
int ammo_index
Definition: g_local.h:893
GetItemByIndex
gitem_t * GetItemByIndex(int index)
Definition: g_items.c:62
edict_s::avelocity
vec3_t avelocity
Definition: g_local.h:1025
trace_t::startsolid
qboolean startsolid
Definition: q_shared.h:452
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:477
RANGE_MID
#define RANGE_MID
Definition: g_local.h:119
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:424
edict_s::teammaster
edict_t * teammaster
Definition: g_local.h:1076
entity_state_s::modelindex
int modelindex
Definition: q_shared.h:1176
entity_state_s::modelindex2
int modelindex2
Definition: q_shared.h:1177
TE_GUNSHOT
@ TE_GUNSHOT
Definition: q_shared.h:935
MOD_UNKNOWN
#define MOD_UNKNOWN
Definition: g_local.h:463
swimmonster_start_go
void swimmonster_start_go(edict_t *self)
Definition: g_monster.c:723
edict_s::gravity
float gravity
Definition: g_local.h:1028
trace_t::ent
struct edict_s * ent
Definition: q_shared.h:458
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:57
is_quad
static qboolean is_quad
Definition: p_weapon.c:26
G_SetStats
void G_SetStats(edict_t *ent)
Definition: p_hud.c:377
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:1040
STAT_AMMO
#define STAT_AMMO
Definition: q_shared.h:1028
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:198
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:1055
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:957
edict_s::combattarget
char * combattarget
Definition: g_local.h:1017
gclient_s::damage_parmor
int damage_parmor
Definition: g_local.h:906
pmove_state_t::origin
short origin[3]
Definition: q_shared.h:494
monsterinfo_t::attack_finished
float attack_finished
Definition: g_local.h:435
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:955
AI_PURSUE_NEXT
#define AI_PURSUE_NEXT
Definition: g_local.h:132
FRAME_death308
#define FRAME_death308
Definition: m_actor.h:55
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:196
G_CheckChaseStats
void G_CheckChaseStats(edict_t *ent)
Definition: p_hud.c:532
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:161
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:1116
edict_s::killtarget
char * killtarget
Definition: g_local.h:1013
STAT_LAYOUTS
#define STAT_LAYOUTS
Definition: q_shared.h:1038
dmflags
cvar_t * dmflags
Definition: g_main.c:37
edict_s::waterlevel
int waterlevel
Definition: g_local.h:1094
F_LSTRING
@ F_LSTRING
Definition: g_local.h:571
edict_s::delay
float delay
Definition: g_local.h:1088
client_persistant_t::hand
int hand
Definition: g_local.h:831
power_shield_index
static int power_shield_index
Definition: g_items.c:47
monsterinfo_t::melee
void(* melee)(edict_t *self)
Definition: g_local.h:430
STAT_CHASE
#define STAT_CHASE
Definition: q_shared.h:1041
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:1011
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:849
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:838
bfg_think
void bfg_think(edict_t *self)
Definition: g_weapon.c:805
game_locals_t::maxentities
int maxentities
Definition: g_local.h:285
trail_active
qboolean trail_active
Definition: p_trail.c:43
gitem_s::view_model
char * view_model
Definition: g_local.h:244
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:209
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:877
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:1070
edict_s::teamchain
edict_t * teamchain
Definition: g_local.h:1075
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:138
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
edict_s::size
vec3_t size
Definition: g_local.h:985
MASK_PLAYERSOLID
#define MASK_PLAYERSOLID
Definition: q_shared.h:392
PlayerTrail_Add
void PlayerTrail_Add(vec3_t spot)
Definition: p_trail.c:67
player_state_t::gunindex
int gunindex
Definition: q_shared.h:1211
gclient_s::latched_buttons
int latched_buttons
Definition: g_local.h:897
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
DeathmatchScoreboardMessage
void DeathmatchScoreboardMessage(edict_t *ent, edict_t *killer)
Definition: p_hud.c:164
cl
client_state_t cl
Definition: cl_main.c:106
PlayerTrail_Init
void PlayerTrail_Init(void)
Definition: p_trail.c:49
AS_MELEE
#define AS_MELEE
Definition: g_local.h:146
RANGE_FAR
#define RANGE_FAR
Definition: g_local.h:120
pmove_state_t::pm_flags
byte pm_flags
Definition: q_shared.h:496
F_INT
@ F_INT
Definition: g_local.h:569
client_persistant_t::score
int score
Definition: g_local.h:856
game_import_t::WriteString
void(* WriteString)(char *s)
Definition: game.h:151
gclient_s::weapon_sound
int weapon_sound
Definition: g_local.h:947
gitem_s::flags
int flags
Definition: g_local.h:253
edict_s::die
void(* die)(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: g_local.h:1043
gclient_s::anim_priority
int anim_priority
Definition: g_local.h:934
DF_NO_ARMOR
#define DF_NO_ARMOR
Definition: q_shared.h:1059
MULTICAST_PVS
@ MULTICAST_PVS
Definition: q_shared.h:111
SV_Physics_Step
void SV_Physics_Step(edict_t *ent)
Definition: g_phys.c:815
edict_s::deathtarget
char * deathtarget
Definition: g_local.h:1016
TE_BULLET_SPARKS
@ TE_BULLET_SPARKS
Definition: q_shared.h:949
F_ANGLEHACK
@ F_ANGLEHACK
Definition: g_local.h:574
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:127
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
edict_s::absmin
vec3_t absmin
Definition: g_local.h:985
MOVETYPE_FLY
@ MOVETYPE_FLY
Definition: g_local.h:195
POWER_ARMOR_NONE
#define POWER_ARMOR_NONE
Definition: g_local.h:157
gitem_s::tag
int tag
Definition: g_local.h:258
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:1011
F_GSTRING
@ F_GSTRING
Definition: g_local.h:572
MOD_FRIENDLY_FIRE
#define MOD_FRIENDLY_FIRE
Definition: g_local.h:497
game_export_t::num_edicts
int num_edicts
Definition: game.h:231
player_state_t::stats
short stats[MAX_STATS]
Definition: q_shared.h:1220
SV_CalcBlend
void SV_CalcBlend(edict_t *ent)
Definition: p_view.c:418
client_persistant_t::health
int health
Definition: g_local.h:837
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:1056
SVCmd_WriteIP_f
void SVCmd_WriteIP_f(void)
Definition: g_svcmds.c:238
edict_s::freetime
float freetime
Definition: g_local.h:999
gclient_s::resp
client_respawn_t resp
Definition: g_local.h:885
gclient_s::damage_blood
int damage_blood
Definition: g_local.h:907
AS_STRAIGHT
#define AS_STRAIGHT
Definition: g_local.h:144
game_import_t::argv
char *(* argv)(int n)
Definition: game.h:168
AMMO_CELLS
@ AMMO_CELLS
Definition: g_local.h:105
STAT_SELECTED_ICON
#define STAT_SELECTED_ICON
Definition: q_shared.h:1031
gitem_s::classname
char * classname
Definition: g_local.h:236
edict_s::health
int health
Definition: g_local.h:1051
gclient_s::silencer_shots
int silencer_shots
Definition: g_local.h:946
drop_make_touchable
static void drop_make_touchable(edict_t *ent)
Definition: g_items.c:833
gitem_s
Definition: g_local.h:234
AMMO_SLUGS
@ AMMO_SLUGS
Definition: g_local.h:106
game_locals_t::maxclients
int maxclients
Definition: g_local.h:284