Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
ammo.qh File Reference
Include dependency graph for ammo.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ammo
class  Bullets
class  Cells
class  Fuel
class  Rockets
class  Shells

Functions

void ammo_bullets_init (Pickup this, entity item)
void ammo_cells_init (Pickup this, entity item)
void ammo_fuel_init (Pickup this, entity item)
void ammo_rockets_init (Pickup this, entity item)
void ammo_shells_init (Pickup this, entity item)
 MODEL (Bullets_ITEM, Item_Model("a_bullets.mdl"))
 MODEL (Cells_ITEM, Item_Model("a_cells.md3"))
 MODEL (Fuel_ITEM, Item_Model("g_fuel.md3"))
 MODEL (Rockets_ITEM, Item_Model("a_rockets.md3"))
 MODEL (Shells_ITEM, Item_Model("a_shells.md3"))
 REGISTER_ITEM (Bullets, NEW(Bullets))
 REGISTER_ITEM (Cells, NEW(Cells))
 REGISTER_ITEM (Fuel, NEW(Fuel))
 REGISTER_ITEM (Rockets, NEW(Rockets))
 REGISTER_ITEM (Shells, NEW(Shells))

Variables

bool autocvar_g_pickup_ammo_anyway
int autocvar_g_pickup_cells
int autocvar_g_pickup_cells_max
int autocvar_g_pickup_fuel
int autocvar_g_pickup_fuel_max
int autocvar_g_pickup_nails
int autocvar_g_pickup_nails_max
float autocvar_g_pickup_respawntime_ammo
float autocvar_g_pickup_respawntimejitter_ammo
int autocvar_g_pickup_rockets
int autocvar_g_pickup_rockets_max
int autocvar_g_pickup_shells
int autocvar_g_pickup_shells_max
int spawnflags

Function Documentation

◆ ammo_bullets_init()

void ammo_bullets_init ( Pickup this,
entity item )

Definition at line 81 of file ammo.qh.

82{
83 if(!GetResource(item, RES_BULLETS))
85}
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
int autocvar_g_pickup_nails
Definition ammo.qh:79

References autocvar_g_pickup_nails, entity(), GetResource(), and SetResourceExplicit().

Referenced by Bullets::void().

◆ ammo_cells_init()

void ammo_cells_init ( Pickup this,
entity item )

Definition at line 153 of file ammo.qh.

154{
155 if(!GetResource(item, RES_CELLS))
157}
int autocvar_g_pickup_cells
Definition ammo.qh:151

References autocvar_g_pickup_cells, entity(), GetResource(), and SetResourceExplicit().

Referenced by Cells::void().

◆ ammo_fuel_init()

void ammo_fuel_init ( Pickup this,
entity item )

Definition at line 189 of file ammo.qh.

190{
191 if(!GetResource(item, RES_FUEL))
193}
int autocvar_g_pickup_fuel
Definition ammo.qh:187

References autocvar_g_pickup_fuel, entity(), GetResource(), and SetResourceExplicit().

Referenced by Fuel::void().

◆ ammo_rockets_init()

void ammo_rockets_init ( Pickup this,
entity item )

Definition at line 117 of file ammo.qh.

118{
119 if(!GetResource(item, RES_ROCKETS))
121}
int autocvar_g_pickup_rockets
Definition ammo.qh:115

References autocvar_g_pickup_rockets, entity(), GetResource(), and SetResourceExplicit().

Referenced by Rockets::void().

◆ ammo_shells_init()

void ammo_shells_init ( Pickup this,
entity item )

Definition at line 45 of file ammo.qh.

46{
47 if(!GetResource(item, RES_SHELLS))
49}
int autocvar_g_pickup_shells
Definition ammo.qh:43

References autocvar_g_pickup_shells, entity(), GetResource(), and SetResourceExplicit().

Referenced by Shells::void().

◆ MODEL() [1/5]

MODEL ( Bullets_ITEM ,
Item_Model("a_bullets.mdl")  )

◆ MODEL() [2/5]

MODEL ( Cells_ITEM ,
Item_Model("a_cells.md3")  )

◆ MODEL() [3/5]

MODEL ( Fuel_ITEM ,
Item_Model("g_fuel.md3")  )

◆ MODEL() [4/5]

MODEL ( Rockets_ITEM ,
Item_Model("a_rockets.md3")  )

◆ MODEL() [5/5]

MODEL ( Shells_ITEM ,
Item_Model("a_shells.md3")  )

◆ REGISTER_ITEM() [1/5]

REGISTER_ITEM ( Bullets ,
NEW(Bullets)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_ITEM() [2/5]

REGISTER_ITEM ( Cells ,
NEW(Cells)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_ITEM() [3/5]

REGISTER_ITEM ( Fuel ,
NEW(Fuel)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_ITEM() [4/5]

REGISTER_ITEM ( Rockets ,
NEW(Rockets)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_ITEM() [5/5]

REGISTER_ITEM ( Shells ,
NEW(Shells)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

Variable Documentation

◆ autocvar_g_pickup_ammo_anyway

bool autocvar_g_pickup_ammo_anyway

Definition at line 19 of file ammo.qh.

◆ autocvar_g_pickup_cells

int autocvar_g_pickup_cells

Definition at line 151 of file ammo.qh.

Referenced by ammo_cells_init().

◆ autocvar_g_pickup_cells_max

int autocvar_g_pickup_cells_max

◆ autocvar_g_pickup_fuel

int autocvar_g_pickup_fuel

Definition at line 187 of file ammo.qh.

Referenced by ammo_fuel_init().

◆ autocvar_g_pickup_fuel_max

int autocvar_g_pickup_fuel_max

Definition at line 188 of file ammo.qh.

Referenced by Item_GiveTo(), and NIX_GiveCurrentWeapon().

◆ autocvar_g_pickup_nails

int autocvar_g_pickup_nails

Definition at line 79 of file ammo.qh.

Referenced by ammo_bullets_init().

◆ autocvar_g_pickup_nails_max

int autocvar_g_pickup_nails_max

◆ autocvar_g_pickup_respawntime_ammo

float autocvar_g_pickup_respawntime_ammo

Definition at line 20 of file ammo.qh.

◆ autocvar_g_pickup_respawntimejitter_ammo

float autocvar_g_pickup_respawntimejitter_ammo

Definition at line 21 of file ammo.qh.

◆ autocvar_g_pickup_rockets

int autocvar_g_pickup_rockets

Definition at line 115 of file ammo.qh.

Referenced by ammo_rockets_init().

◆ autocvar_g_pickup_rockets_max

int autocvar_g_pickup_rockets_max

◆ autocvar_g_pickup_shells

int autocvar_g_pickup_shells

Definition at line 43 of file ammo.qh.

Referenced by ammo_shells_init().

◆ autocvar_g_pickup_shells_max

int autocvar_g_pickup_shells_max

◆ spawnflags

int spawnflags

Definition at line 15 of file ammo.qh.

Referenced by buff_Init(), buff_Reset(), buff_Think(), button_damage(), checkpoint_passed(), counter_use(), door_blocked(), door_damage(), door_generic_plat_blocked(), door_hit_top(), door_init_keys(), door_init_shared(), door_rotating_hit_top(), door_send(), door_use(), fd_secret_done(), fd_secret_move3(), fd_secret_use(), follow_init(), fragsfilter_use(), func_breakable_behave_destroyed(), func_breakable_behave_restore(), func_breakable_colormod(), func_breakable_damage(), func_breakable_reset(), func_breakable_setup(), func_rotating_reset(), func_train_find(), g_model_dropbyspawnflags(), generic_netlinked_reset(), GoalTouch(), HUD_Weapons(), Item_CopyFields(), jumppad_push(), laser_SendEntity(), LinkDoors(), misc_laser_aim(), misc_laser_think(), Monster_Appear_Check(), Monster_Attack_Check(), Monster_Damage(), Monster_Dead(), Monster_Dead_Fade(), monster_dropitem(), Monster_Miniboss_Setup(), Monster_Move(), Monster_Reset(), Monster_Respawn_Check(), Monster_Spawn(), Monster_Spawn_Setup(), Monster_ValidTarget(), Monster_WanderTarget(), multi_eventdamage(), multi_reset(), multi_touch(), multi_trigger(), multivibrator_reset(), plat_crush(), plat_send(), plat_spawn_inside_trigger(), PlayerDamage(), pointparticles_SendEntity(), secret_reset(), spawn_item_key(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spritelookupblinkvalue(), StartItem(), target_changelevel_use(), target_checkpoint_setup(), target_init_use(), target_print_use(), target_spawn_spawnfirst(), target_speaker_reset(), target_speaker_use_on(), target_speed_calculatevelocity(), target_speed_send(), Teleport_Active(), train_next(), train_send(), train_wait(), trigger_gravity_touch(), trigger_heal_touch(), trigger_hurt_touch(), trigger_impulse_send(), trigger_impulse_touch_directional(), trigger_music_reset(), trigger_push_send(), trigger_push_touch(), trigger_push_velocity_calculatevelocity(), trigger_push_velocity_send(), trigger_relay_if_use(), trigger_relay_teamcheck_use(), trigger_teleport_send(), trigger_viewloc_send(), turret_draw2d(), turret_initialize(), turret_think(), WarpZone_InitStep_FinalizeTransform(), and WarpZoneCamera_InitStep_FindTarget().