Xonotic
|
Go to the source code of this file.
Macros | |
#define | autocvar_g_weapon_stay cvar("g_weapon_stay") |
#define | ITEM_DAMAGE_NEEDKILL(dt) (((dt) == DEATH_HURTTRIGGER.m_id) || ((dt) == DEATH_SLIME.m_id) || ((dt) == DEATH_LAVA.m_id) || ((dt) == DEATH_SWAMP.m_id)) |
#define | ITEM_TOUCH_NEEDKILL() (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) |
#define | POSTGIVE_BIT(e, f, b, snd_incr, snd_decr) GiveSound((e), save_##f & (b), (e).f & (b), 0, snd_incr, snd_decr) |
#define | POSTGIVE_RES_ROT(e, f, t, rotfield, rottime, regenfield, regentime, snd_incr, snd_decr) GiveRot((e),save_##f,GetResource((e),(f)),rotfield,rottime,regenfield,regentime);GiveSound((e),save_##f,GetResource((e),(f)),t,snd_incr,snd_decr) |
#define | POSTGIVE_RESOURCE(e, f, t, snd_incr, snd_decr) GiveSound((e), save_##f, GetResource((e), (f)), t, snd_incr, snd_decr) |
#define | POSTGIVE_STATUSEFFECT(e, f, snd_incr, snd_decr) GiveSound((e), save_##f, StatusEffects_active(f, (e)), 0, snd_incr, snd_decr) |
#define | POSTGIVE_VALUE(e, f, t, snd_incr, snd_decr) GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) |
#define | POSTGIVE_VALUE_ROT(e, f, t, rotfield, rottime, regenfield, regentime, snd_incr, snd_decr) GiveRot((e), save_##f, (e).f, rotfield, rottime, regenfield, regentime); GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) |
#define | POSTGIVE_WEAPON(e, b, snd_incr, snd_decr) GiveSound((e), !!(save_weapons & WepSet_FromWeapon(b)), !!(STAT(WEAPONS, e) & WepSet_FromWeapon(b)), 0, snd_incr, snd_decr) |
#define | PREGIVE(e, f) float save_##f; save_##f = (e).f |
#define | PREGIVE_RESOURCE(e, f) float save_##f = GetResource((e), (f)) |
#define | PREGIVE_STATUSEFFECT(e, f) bool save_##f = StatusEffects_active(f, (e)) |
#define | PREGIVE_WEAPONS(e) WepSet save_weapons; save_weapons = STAT(WEAPONS, e) |
#define ITEM_DAMAGE_NEEDKILL | ( | dt | ) | (((dt) == DEATH_HURTTRIGGER.m_id) || ((dt) == DEATH_SLIME.m_id) || ((dt) == DEATH_LAVA.m_id) || ((dt) == DEATH_SWAMP.m_id)) |
Definition at line 130 of file items.qh.
Referenced by ctf_FlagDamage(), Damage(), Item_Damage(), ka_DamageEvent(), kh_Key_Damage(), Monster_Damage(), MUTATOR_HOOKFUNCTION(), physical_item_damage(), and PlayerDamage().
#define ITEM_TOUCH_NEEDKILL | ( | ) | (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)) |
Definition at line 129 of file items.qh.
Referenced by buff_Touch(), ctf_FlagThink(), Item_Touch(), kh_Key_Touch(), and physical_item_touch().
#define POSTGIVE_BIT | ( | e, | |
f, | |||
b, | |||
snd_incr, | |||
snd_decr | |||
) | GiveSound((e), save_##f & (b), (e).f & (b), 0, snd_incr, snd_decr) |
Definition at line 117 of file items.qh.
Referenced by GiveItems().
#define POSTGIVE_RES_ROT | ( | e, | |
f, | |||
t, | |||
rotfield, | |||
rottime, | |||
regenfield, | |||
regentime, | |||
snd_incr, | |||
snd_decr | |||
) | GiveRot((e),save_##f,GetResource((e),(f)),rotfield,rottime,regenfield,regentime);GiveSound((e),save_##f,GetResource((e),(f)),t,snd_incr,snd_decr) |
Definition at line 120 of file items.qh.
Referenced by GiveItems().
#define POSTGIVE_RESOURCE | ( | e, | |
f, | |||
t, | |||
snd_incr, | |||
snd_decr | |||
) | GiveSound((e), save_##f, GetResource((e), (f)), t, snd_incr, snd_decr) |
Definition at line 119 of file items.qh.
Referenced by GiveItems().
#define POSTGIVE_STATUSEFFECT | ( | e, | |
f, | |||
snd_incr, | |||
snd_decr | |||
) | GiveSound((e), save_##f, StatusEffects_active(f, (e)), 0, snd_incr, snd_decr) |
Definition at line 118 of file items.qh.
Referenced by GiveItems().
#define POSTGIVE_VALUE | ( | e, | |
f, | |||
t, | |||
snd_incr, | |||
snd_decr | |||
) | GiveSound((e), save_##f, (e).f, t, snd_incr, snd_decr) |
#define POSTGIVE_WEAPON | ( | e, | |
b, | |||
snd_incr, | |||
snd_decr | |||
) | GiveSound((e), !!(save_weapons & WepSet_FromWeapon(b)), !!(STAT(WEAPONS, e) & WepSet_FromWeapon(b)), 0, snd_incr, snd_decr) |
Definition at line 116 of file items.qh.
Referenced by GiveItems().
#define PREGIVE | ( | e, | |
f | |||
) | float save_##f; save_##f = (e).f |
Definition at line 113 of file items.qh.
Referenced by GiveItems().
#define PREGIVE_RESOURCE | ( | e, | |
f | |||
) | float save_##f = GetResource((e), (f)) |
Definition at line 115 of file items.qh.
Referenced by GiveItems().
#define PREGIVE_STATUSEFFECT | ( | e, | |
f | |||
) | bool save_##f = StatusEffects_active(f, (e)) |
Definition at line 114 of file items.qh.
Referenced by GiveItems().
#define PREGIVE_WEAPONS | ( | e | ) | WepSet save_weapons; save_weapons = STAT(WEAPONS, e) |
Definition at line 112 of file items.qh.
Referenced by GiveItems().
void _StartItem | ( | entity | this, |
entity | def, | ||
float | defaultrespawntime, | ||
float | defaultrespawntimejitter | ||
) |
Definition at line 925 of file items.qc.
References angles, autocvar_g_items_dropped_lifetime, autocvar_g_items_maxdist, autocvar_g_items_mindist, autocvar_spawn_debug, bot_pickup, bot_pickupbasevalue, cnt, colormap, DAMAGE_YES, DPCONTENTS_NODROP, droptofloor, EF_NODRAW, effects, entity(), fade_end, fade_start, FL_ITEM, flags, float(), g_items, GetResource(), glowmod, gravity, have_pickup_item(), IL_PUSH(), InitializeEntity(), is_item, IT_KEY1, IT_KEY2, Item_Damage(), Item_FindTeam(), Item_IsExpiring(), Item_IsLoot(), Item_ItemsTime_SetTime(), item_model_ent, item_pickupsound, item_pickupsound_ent, Item_Reset(), Item_Touch(), item_use(), items, ItemSend(), max(), model, MOVE_NORMAL, MOVETYPE_NONE, MOVETYPE_TOSS, MUTATOR_CALLHOOK, netname, nextthink, noalign, origin, pickup_anyway, pos1, precache_sound(), REGISTRY_GET, RemoveItem(), RES_HEALTH, respawntime, respawntimejitter, set_movetype(), setItemGroup(), setmodel, setorigin(), setthink, skin, spawnflags, startitem_failed, state, strzone(), superweapons_finished, takedamage, target, targetname, team, time, trace_dpstartcontents, use, waypoint_spawnforitem(), weapon, and WepSet_FromWeapon.
Referenced by StartItem(), and weapon_defaultspawnfunc().
Definition at line 821 of file items.qc.
References ammo, entity(), FOREACH, g_pickup_cells_max, g_pickup_fuel_max, g_pickup_nails_max, g_pickup_plasma_max, g_pickup_rockets_max, g_pickup_shells_max, GetResource(), max(), min(), and NULL.
Referenced by weapon_pickupevalfunc().
Definition at line 797 of file items.qc.
Referenced by buff_Init().
Definition at line 1504 of file items.qc.
References argv(), autocvar_g_balance_pause_armor_rot, autocvar_g_balance_pause_fuel_regen, autocvar_g_balance_pause_fuel_rot, autocvar_g_balance_pause_health_regen, autocvar_g_balance_pause_health_rot, autocvar_g_balance_superweapons_time, BIT, buff_Available(), Buff_UndeprecateName(), cmd(), CS_CVAR, FOREACH, g_weaponarena, GiveBit(), GiveResourceValue(), GiveStatusEffect(), GiveWeapon(), items, GameItem::m_id, max(), MAX_WEAPONSLOTS, OP_MAX, OP_MIN, OP_MINUS, OP_PLUS, OP_SET, pauseregen_finished, pauserotarmor_finished, pauserotfuel_finished, pauserothealth_finished, POSTGIVE_BIT, POSTGIVE_RES_ROT, POSTGIVE_RESOURCE, POSTGIVE_STATUSEFFECT, POSTGIVE_WEAPON, PREGIVE, PREGIVE_RESOURCE, PREGIVE_STATUSEFFECT, PREGIVE_WEAPONS, RES_HEALTH, stof(), time, w_getbestweapon, W_SwitchWeapon_Force(), W_UndeprecateName(), weaponentities, WEP_FLAG_MUTATORBLOCKED, WEP_FLAG_SPECIALATTACK, WepSet_FromWeapon, and WEPSET_SUPERWEAPONS.
Referenced by CheatCommand(), and target_items_use().
void GiveRandomWeapons | ( | entity | receiver, |
int | num_weapons, | ||
string | weapon_names, | ||
entity | ammo_entity | ||
) |
Give several random weapons and ammo to the entity.
[in,out] | receiver | Entity to give weapons to. |
[in] | num_weapons | Number of weapons to give. |
[in] | weapon_names | Names of weapons to give separated by spaces. |
[in] | ammo | Entity containing the ammo amount for each possible weapon. |
Definition at line 406 of file items.qc.
References argv(), FOREACH, GetResource(), GiveResource(), NULL, RandomSelection_chosen_ent, RandomSelection_Init(), tokenize_console, and weapon.
Referenced by PutPlayerInServer().
void GiveRot | ( | entity | e, |
float | v0, | ||
float | v1, | ||
.float | rotfield, | ||
float | rottime, | ||
.float | regenfield, | ||
float | regentime | ||
) |
Definition at line 1431 of file items.qc.
References ATTEN_NORM, CH_TRIGGER, CH_TRIGGER_SINGLE, NULL, sound, and VOL_BASE.
Definition at line 1364 of file items.qc.
References OP_MAX, OP_MIN, OP_MINUS, OP_PLUS, OP_SET, REGISTRY_GET, and WepSet_FromWeapon.
Referenced by GiveItems().
Definition at line 98 of file items.qc.
References autocvar_g_pickup_items, autocvar_g_powerups, g_weaponarena, and itemdef.
Referenced by _StartItem().
Definition at line 889 of file items.qc.
References GetResource(), max(), min(), and RES_HEALTH.
Definition at line 749 of file items.qc.
References EF_NODRAW, effects, entity(), ftos(), g_items, IL_EACH, LOG_TRACE, RandomSelection_chosen_ent, RandomSelection_Init(), and team.
Referenced by _StartItem().
Definition at line 451 of file items.qc.
References g_weapon_stay, GetResource(), GiveResourceWithLimit(), min(), and TakeResourceWithLimit().
Referenced by Item_GiveTo().
Definition at line 479 of file items.qc.
References autocvar_g_powerups_stack, BIT, CS_CVAR, FOREACH, g_cts, g_pickup_cells_max, g_pickup_fuel_max, g_pickup_nails_max, g_pickup_plasma_max, g_pickup_rockets_max, g_pickup_shells_max, Item_GiveAmmoTo(), GameItem::m_id, max(), MAX_WEAPONSLOTS, REGISTRY_GET, RES_HEALTH, time, w_getbestweapon, W_GiveWeapon(), W_SwitchWeapon_Force(), weaponentities, and WepSet_FromWeapon.
Referenced by WeaponPickup::WeaponPickup ::WeaponPickup().
Definition at line 728 of file items.qc.
References Item_IsLoot(), Item_ScheduleInitialRespawn(), Item_Show(), Item_Think(), itemdef, nextthink, origin, setorigin(), setthink, state, time, and WEPSET_SUPERWEAPONS.
Referenced by _StartItem().
Definition at line 198 of file items.qc.
References ATTEN_NORM, CENTER_OR_VIEWOFS, CH_TRIGGER, Item_ItemsTime_Allow(), Item_ItemsTime_SetTime(), Item_ItemsTime_SetTimesForAllPlayers(), Item_ItemsTime_UpdateTime(), Item_Show(), Item_Think(), itemdef, nextthink, origin, setorigin(), setthink, sound, time, VOL_BASE, and WEPSET_SUPERWEAPONS.
Referenced by Item_RespawnCountdown(), and Item_RespawnThink().
Definition at line 218 of file items.qc.
References ATTEN_NORM, CH_TRIGGER, entity(), FOREACH_CLIENT, IS_REAL_CLIENT, Item_ItemsTime_SpectatorOnly(), Item_Respawn(), ITEM_RESPAWN_TICKS, Item_RespawnCountdown(), item_respawncounter, itemdef, msg_entity, MSG_ONE, MUTATOR_CALLHOOK, nextthink, NULL, REGISTRY_GET, SND, SPRITERULE_SPECTATOR, time, VOL_BASE, and weapon.
Referenced by Item_RespawnCountdown(), and Item_ScheduleRespawnIn().
Definition at line 371 of file items.qc.
References floor(), ITEM_RESPAWN_TICKS, Item_ScheduleRespawnIn(), Item_Show(), max(), random(), and time.
Referenced by Item_Reset().
Definition at line 351 of file items.qc.
References adjust_respawntime(), AUTOCVAR(), crandom, Item_ScheduleRespawnIn(), and Item_Show().
Referenced by Item_ScheduleRespawnIn(), Item_Touch(), and MUTATOR_HOOKFUNCTION().
Definition at line 286 of file items.qc.
References AUTOCVAR(), Item_ItemsTime_Allow(), Item_ItemsTime_SetTime(), Item_ItemsTime_SetTimesForAllPlayers(), Item_ItemsTime_UpdateTime(), ITEM_RESPAWN_TICKS, Item_RespawnCountdown(), Item_RespawnThink(), Item_ScheduleRespawn(), max(), MUTATOR_CALLHOOK, setthink, time, and WEPSET_SUPERWEAPONS.
Referenced by Item_ScheduleInitialRespawn(), and Item_ScheduleRespawn().
Definition at line 120 of file items.qc.
References autocvar_g_fullbrightitems, autocvar_g_nodepthtestitems, autocvar_sv_simple_items, EF_ADDITIVE, EF_FULLBRIGHT, EF_NODEPTHTEST, EF_STARDUST, entity(), g_weapon_stay, setorigin(), SOLID_NOT, SOLID_TRIGGER, string_null, and WEPSET_SUPERWEAPONS.
Referenced by Item_Reset(), Item_Respawn(), Item_ScheduleInitialRespawn(), Item_ScheduleRespawn(), and Item_Touch().
Definition at line 631 of file items.qc.
References _sound, ATTEN_NORM, CENTER_OR_VIEWOFS, CH_TRIGGER, CH_TRIGGER_SINGLE, entity(), g_items, IL_EACH, IS_DEAD, ITEM_HANDLE, Item_IsExpiring(), Item_IsLoot(), item_pickupsound_ent, Item_ScheduleRespawn(), Item_Show(), item_spawnshieldtime, ITEM_TOUCH_NEEDKILL, itemdef, LABEL, M_ARGV, max(), MUT_ITEMTOUCH_PICKUP, MUT_ITEMTOUCH_RETURN, MUTATOR_CALLHOOK, NULL, owner, RandomSelection_chosen_ent, RandomSelection_Init(), solid, SOLID_TRIGGER, Sound_fixpath, spawnshieldtime, SUB_UseTargets(), superweapons_finished, target, team, time, and VOL_BASE.
Referenced by _StartItem().
Definition at line 31 of file items.qc.
References angles, bound(), classname, colormap, fade_end, fade_start, glowmod, gravity, LOG_TRACE, origin, skin, velocity, WriteByte(), WriteShort(), and WriteString().
Referenced by _StartItem(), UpdateCSQCProjectile(), and UpdateItemAfterTeleport().
Definition at line 86 of file items.qc.
References oldorigin, and origin.
Referenced by Item_RespawnThink(), Item_Think(), UpdateCSQCProjectile(), and UpdateItemAfterTeleport().
Definition at line 1171 of file items.qc.
References IS_SMALL, Item_IsLoot(), itemdef, and origin.
Referenced by _StartItem().
void setItemGroupCount | ( | ) |
spawnfunc | ( | target_items | ) |
Definition at line 1242 of file items.qc.
References argv(), argv_end_index, argv_start_index, autocvar_g_balance_superweapons_time, error(), FOREACH, GetResource(), items, max(), netname, RES_HEALTH, spawnflags, string_null, strzone(), substring(), superweapons_finished, target_items_use(), tokenize_console, use, and W_UndeprecateName().
Definition at line 92 of file items.qc.
References getSendEntity, ItemSend(), and ItemUpdate().
Referenced by TeleportPlayer(), and WarpZone_PostTeleportPlayer_Callback().
Definition at line 799 of file items.qc.
References ammo_pickupevalfunc(), bound(), and FOREACH.
float autocvar_g_balance_superweapons_time |
Definition at line 6 of file items.qh.
Referenced by GiveItems(), PutPlayerInServer(), spawnfunc(), W_ThrowNewWeapon(), and weapon_defaultspawnfunc().
bool autocvar_g_fullbrightitems |
Definition at line 7 of file items.qh.
Referenced by Item_Show().
float autocvar_g_items_dropped_lifetime |
Definition at line 10 of file items.qh.
Referenced by _StartItem(), and powerups_DropItem().
float autocvar_g_items_maxdist |
Definition at line 9 of file items.qh.
Referenced by _StartItem().
float autocvar_g_items_mindist |
Definition at line 8 of file items.qh.
Referenced by _StartItem().
bool autocvar_g_nodepthtestitems |
Definition at line 12 of file items.qh.
Referenced by Item_Show().
int autocvar_g_pickup_items |
Definition at line 11 of file items.qh.
Referenced by have_pickup_item(), MUTATOR_HOOKFUNCTION(), spawnfunc(), and W_IsWeaponThrowable().
float autocvar_sv_simple_items |
Definition at line 19 of file items.qh.
Referenced by Item_Show().
IntrusiveList g_items |
Definition at line 126 of file items.qh.
Referenced by _StartItem(), botframe_deleteuselesswaypoints(), buff_Inferno_CalculateTime(), buff_Init(), ctf_FlagSetup(), dom_controlpoint_setup(), findnearest(), havocbot_goalrating_items(), havocbot_movetogoal(), havocbot_select_an_item_of_group(), Item_FindTeam(), Item_ItemsTime_Allow(), Item_Touch(), ka_SpawnBall(), kh_Key_Attach(), kh_Key_Detach(), MoveToRandomLocationWithinBounds(), setItemGroupCount(), target_give_init(), target_items_use(), waypoint_spawn_fromeditor(), waypoint_unreachable(), and Weapon_whereis().
bool is_item |
Definition at line 93 of file items.qh.
Referenced by _StartItem().
int item_group |
Definition at line 16 of file items.qh.
Referenced by havocbot_movetogoal().
entity item_model_ent |
Definition at line 29 of file items.qh.
Referenced by _StartItem().
string item_pickupsound |
Definition at line 27 of file items.qh.
Referenced by _StartItem().
entity item_pickupsound_ent |
Definition at line 28 of file items.qh.
Referenced by _StartItem(), and Item_Touch().
const float ITEM_RESPAWN_TICKS = 10 |
Definition at line 24 of file items.qh.
Referenced by Item_RespawnCountdown(), Item_ScheduleInitialRespawn(), and Item_ScheduleRespawnIn().
float item_respawncounter |
Definition at line 40 of file items.qh.
Referenced by Item_RespawnCountdown().
float item_spawnshieldtime |
Definition at line 47 of file items.qh.
Referenced by Item_Touch().
entity itemdef |
Definition at line 94 of file items.qh.
Referenced by have_pickup_item(), Item_Reset(), Item_Respawn(), Item_RespawnCountdown(), Item_Touch(), setItemGroup(), StartItem(), and weapon_defaultspawnfunc().
float max_armorvalue |
Definition at line 31 of file items.qh.
Referenced by PlayerDamage(), and PlayerPreThink().
float noalign |
Definition at line 42 of file items.qh.
Referenced by _StartItem(), buff_Init(), ctf_FlagThink(), Monster_Spawn(), and spawner_use().
float pickup_anyway |
Definition at line 32 of file items.qh.
Referenced by _StartItem(), and weapon_defaultspawnfunc().
float respawntime |
Definition at line 36 of file items.qh.
Referenced by _StartItem(), Monster_Dead_Fade(), Monster_Spawn_Setup(), vehicle_initialize(), and weapon_defaultspawnfunc().
float respawntimejitter |
Definition at line 37 of file items.qh.
Referenced by _StartItem(), and weapon_defaultspawnfunc().
float superweapons_finished |
Definition at line 44 of file items.qh.
Referenced by _StartItem(), Item_Touch(), spawnfunc(), and weapon_defaultspawnfunc().