Go to the documentation of this file.
49 #define HEALTH_IGNORE_MAX 1
50 #define HEALTH_TIMED 2
132 choice = rand() %
count;
426 if (strcmp(ent->
classname,
"key_power_cube") == 0)
502 if (weapon && !oldcount)
543 if (self->owner->health > self->owner->max_health)
545 self->nextthink =
level.time + 1;
546 self->owner->health -= 1;
624 if (!old_armor_index)
631 else if (!old_armor_index)
652 newcount = newinfo->
base_count + salvagecount;
792 else if (ent->
count == 10)
794 else if (ent->
count == 25)
827 if (other == ent->
owner)
852 dropped->
item = item;
862 dropped->
owner = ent;
1028 while (*
s && *
s !=
' ')
1034 memcpy (data, start, len);
1040 if (!strcmp(data+len-3,
"md2"))
1042 else if (!strcmp(data+len-3,
"sp2"))
1044 else if (!strcmp(data+len-3,
"wav"))
1046 if (!strcmp(data+len-3,
"pcx"))
1067 if (strcmp(ent->
classname,
"key_power_cube") != 0)
1114 level.power_cubes++;
1152 "misc/ar1_pkup.wav",
1153 "models/items/armor/body/tris.md2",
EF_ROTATE,
1170 "item_armor_combat",
1175 "misc/ar1_pkup.wav",
1176 "models/items/armor/combat/tris.md2",
EF_ROTATE,
1193 "item_armor_jacket",
1198 "misc/ar1_pkup.wav",
1199 "models/items/armor/jacket/tris.md2",
EF_ROTATE,
1221 "misc/ar2_pkup.wav",
1222 "models/items/armor/shard/tris.md2",
EF_ROTATE,
1240 "item_power_screen",
1245 "misc/ar3_pkup.wav",
1246 "models/items/armor/screen/tris.md2",
EF_ROTATE,
1263 "item_power_shield",
1268 "misc/ar3_pkup.wav",
1269 "models/items/armor/shield/tris.md2",
EF_ROTATE,
1280 "misc/power2.wav misc/power1.wav"
1299 "models/weapons/v_blast/tris.md2",
1309 "weapons/blastf1a.wav misc/lasfly.wav"
1321 "models/weapons/g_shotg/tris.md2",
EF_ROTATE,
1322 "models/weapons/v_shotg/tris.md2",
1332 "weapons/shotgf1b.wav weapons/shotgr1b.wav"
1338 "weapon_supershotgun",
1344 "models/weapons/g_shotg2/tris.md2",
EF_ROTATE,
1345 "models/weapons/v_shotg2/tris.md2",
1355 "weapons/sshotf1b.wav"
1361 "weapon_machinegun",
1367 "models/weapons/g_machn/tris.md2",
EF_ROTATE,
1368 "models/weapons/v_machn/tris.md2",
1378 "weapons/machgf1b.wav weapons/machgf2b.wav weapons/machgf3b.wav weapons/machgf4b.wav weapons/machgf5b.wav"
1390 "models/weapons/g_chain/tris.md2",
EF_ROTATE,
1391 "models/weapons/v_chain/tris.md2",
1401 "weapons/chngnu1a.wav weapons/chngnl1a.wav weapons/machgf3b.wav` weapons/chngnd1a.wav"
1413 "models/items/ammo/grenades/medium/tris.md2", 0,
1414 "models/weapons/v_handgr/tris.md2",
1424 "weapons/hgrent1a.wav weapons/hgrena1b.wav weapons/hgrenc1b.wav weapons/hgrenb1a.wav weapons/hgrenb2a.wav "
1430 "weapon_grenadelauncher",
1436 "models/weapons/g_launch/tris.md2",
EF_ROTATE,
1437 "models/weapons/v_launch/tris.md2",
1447 "models/objects/grenade/tris.md2 weapons/grenlf1a.wav weapons/grenlr1b.wav weapons/grenlb1b.wav"
1453 "weapon_rocketlauncher",
1459 "models/weapons/g_rocket/tris.md2",
EF_ROTATE,
1460 "models/weapons/v_rocket/tris.md2",
1470 "models/objects/rocket/tris.md2 weapons/rockfly.wav weapons/rocklf1a.wav weapons/rocklr1b.wav models/objects/debris2/tris.md2"
1476 "weapon_hyperblaster",
1482 "models/weapons/g_hyperb/tris.md2",
EF_ROTATE,
1483 "models/weapons/v_hyperb/tris.md2",
1493 "weapons/hyprbu1a.wav weapons/hyprbl1a.wav weapons/hyprbf1a.wav weapons/hyprbd1a.wav misc/lasfly.wav"
1505 "models/weapons/g_rail/tris.md2",
EF_ROTATE,
1506 "models/weapons/v_rail/tris.md2",
1516 "weapons/rg_hum.wav"
1528 "models/weapons/g_bfg/tris.md2",
EF_ROTATE,
1529 "models/weapons/v_bfg/tris.md2",
1539 "sprites/s_bfg1.sp2 sprites/s_bfg2.sp2 sprites/s_bfg3.sp2 weapons/bfg__f1y.wav weapons/bfg__l1a.wav weapons/bfg__x1b.wav weapons/bfg_hum.wav"
1555 "models/items/ammo/shells/medium/tris.md2", 0,
1578 "models/items/ammo/bullets/medium/tris.md2", 0,
1601 "models/items/ammo/cells/medium/tris.md2", 0,
1624 "models/items/ammo/rockets/medium/tris.md2", 0,
1647 "models/items/ammo/slugs/medium/tris.md2", 0,
1674 "models/items/quaddama/tris.md2",
EF_ROTATE,
1685 "items/damage.wav items/damage2.wav items/damage3.wav"
1691 "item_invulnerability",
1697 "models/items/invulner/tris.md2",
EF_ROTATE,
1699 "p_invulnerability",
1708 "items/protect.wav items/protect2.wav items/protect4.wav"
1720 "models/items/silencer/tris.md2",
EF_ROTATE,
1743 "models/items/breather/tris.md2",
EF_ROTATE,
1766 "models/items/enviro/tris.md2",
EF_ROTATE,
1784 "item_ancient_head",
1790 "models/items/c_head/tris.md2",
EF_ROTATE,
1814 "models/items/adrenal/tris.md2",
EF_ROTATE,
1837 "models/items/band/tris.md2",
EF_ROTATE,
1860 "models/items/pack/tris.md2",
EF_ROTATE,
1887 "models/items/keys/data_cd/tris.md2",
EF_ROTATE,
1911 "models/items/keys/power/tris.md2",
EF_ROTATE,
1935 "models/items/keys/pyramid/tris.md2",
EF_ROTATE,
1959 "models/items/keys/spinner/tris.md2",
EF_ROTATE,
1983 "models/items/keys/pass/tris.md2",
EF_ROTATE,
2007 "models/items/keys/key/tris.md2",
EF_ROTATE,
2031 "models/items/keys/red_key/tris.md2",
EF_ROTATE,
2049 "key_commander_head",
2055 "models/monsters/commandr/head/tris.md2",
EF_GIB,
2073 "key_airstrike_target",
2079 "models/items/keys/target/tris.md2",
EF_ROTATE,
2111 "items/s_health.wav items/n_health.wav items/l_health.wav items/m_health.wav"
2129 self->model =
"models/items/healing/medium/tris.md2";
2145 self->model =
"models/items/healing/stimpack/tris.md2";
2162 self->model =
"models/items/healing/large/tris.md2";
2178 self->model =
"models/items/mega_h/tris.md2";
gitem_t * FindItem(char *pickup_name)
void Weapon_RocketLauncher(edict_t *ent)
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
void(* dprintf)(char *fmt,...)
void SP_item_health(edict_t *self)
qboolean Pickup_Armor(edict_t *ent, edict_t *other)
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
void Weapon_Railgun(edict_t *ent)
void SP_item_health_mega(edict_t *self)
CONST PIXELFORMATDESCRIPTOR int
gitem_t * FindItemByClassname(char *classname)
#define WEAP_HYPERBLASTER
gitem_armor_t combatarmor_info
void Weapon_Shotgun(edict_t *ent)
#define ITEM_TARGETS_USED
qboolean Add_Ammo(edict_t *ent, gitem_t *item, int count)
void Use_PowerArmor(edict_t *ent, gitem_t *item)
int PowerArmorType(edict_t *ent)
void Weapon_GrenadeLauncher(edict_t *ent)
#define WEAP_SUPERSHOTGUN
qboolean(* pickup)(struct edict_s *ent, struct edict_s *other)
gitem_armor_t bodyarmor_info
void Weapon_Machinegun(edict_t *ent)
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
void SpawnItem(edict_t *ent, gitem_t *item)
void Weapon_SuperShotgun(edict_t *ent)
qboolean Pickup_Health(edict_t *ent, edict_t *other)
struct gclient_s * client
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
void DoRespawn(edict_t *ent)
qboolean Pickup_Weapon(edict_t *ent, edict_t *other)
qboolean Pickup_PowerArmor(edict_t *ent, edict_t *other)
float * tv(float x, float y, float z)
int ArmorIndex(edict_t *ent)
#define STAT_SELECTED_ITEM
void Use_Invulnerability(edict_t *ent, gitem_t *item)
void PrecacheItem(gitem_t *it)
void MegaHealth_think(edict_t *self)
static void drop_temp_touch(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
int(* imageindex)(char *name)
qboolean Pickup_Bandolier(edict_t *ent, edict_t *other)
void(* use)(struct edict_s *ent, struct gitem_s *item)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void SP_item_health_small(edict_t *self)
#define POWER_ARMOR_SHIELD
#define POWER_ARMOR_SCREEN
qboolean Pickup_Adrenaline(edict_t *ent, edict_t *other)
void Weapon_Blaster(edict_t *ent)
void G_FreeEdict(edict_t *e)
#define ITEM_TRIGGER_SPAWN
void Drop_PowerArmor(edict_t *ent, gitem_t *item)
void droptofloor(edict_t *ent)
#define DROPPED_PLAYER_ITEM
void(* configstring)(int num, char *string)
int(* soundindex)(char *name)
int(* modelindex)(char *name)
void Weapon_Grenade(edict_t *ent)
void Touch_Item(edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
void(* think)(edict_t *self)
void Weapon_BFG(edict_t *ent)
void Use_Quad(edict_t *ent, gitem_t *item)
void SetRespawn(edict_t *ent, float delay)
void Drop_Ammo(edict_t *ent, gitem_t *item)
void Use_Item(edict_t *ent, edict_t *other, edict_t *activator)
void Use_Weapon(edict_t *ent, gitem_t *inv)
int Q_stricmp(char *s1, char *s2)
#define WEAP_ROCKETLAUNCHER
void Drop_General(edict_t *ent, gitem_t *item)
void(* setmodel)(edict_t *ent, char *name)
#define VectorAdd(a, b, c)
void(* error)(char *fmt,...)
qboolean Pickup_Key(edict_t *ent, edict_t *other)
void Use_Breather(edict_t *ent, gitem_t *item)
void ValidateSelectedItem(edict_t *ent)
void(* use)(edict_t *self, edict_t *other, edict_t *activator)
void(* cprintf)(edict_t *ent, int printlevel, char *fmt,...)
#define HEALTH_IGNORE_MAX
#define STAT_PICKUP_STRING
void G_UseTargets(edict_t *ent, edict_t *activator)
void Drop_Weapon(edict_t *ent, gitem_t *inv)
edict_t * Drop_Item(edict_t *ent, gitem_t *item)
float invincible_framenum
void(* drop)(struct edict_s *ent, struct gitem_s *item)
void Weapon_HyperBlaster(edict_t *ent)
gitem_t * GetItemByIndex(int index)
static int quad_drop_timeout_hack
void(* touch)(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
qboolean Pickup_Pack(edict_t *ent, edict_t *other)
void Use_Silencer(edict_t *ent, gitem_t *item)
#define VectorSet(v, x, y, z)
void Use_Envirosuit(edict_t *ent, gitem_t *item)
qboolean Pickup_AncientHead(edict_t *ent, edict_t *other)
#define WEAP_GRENADELAUNCHER
void(* linkentity)(edict_t *ent)
qboolean Pickup_Ammo(edict_t *ent, edict_t *other)
void SP_item_health_large(edict_t *self)
void Weapon_Chaingun(edict_t *ent)
qboolean Pickup_Powerup(edict_t *ent, edict_t *other)
gitem_armor_t jacketarmor_info
static void drop_make_touchable(edict_t *ent)