|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Go to the source code of this file.
Macros | |
| #define | autocvar_g_weapon_stay cvar("g_weapon_stay") |
| #define | ITEM_DAMAGE_NEEDKILL(dt) |
| #define | ITEM_TOUCH_NEEDKILL() |
| #define | POSTGIVE_BIT(e, f, b, snd_incr, snd_decr) |
| #define | POSTGIVE_RES_ROT(e, f, t, rotfield, rottime, regenfield, regentime, snd_incr, snd_decr) |
| #define | POSTGIVE_RESOURCE(e, f, t, snd_incr, snd_decr) |
| #define | POSTGIVE_STATUSEFFECT(e, f, snd_incr, snd_decr) |
| #define | POSTGIVE_VALUE(e, f, t, snd_incr, snd_decr) |
| #define | POSTGIVE_VALUE_ROT(e, f, t, rotfield, rottime, regenfield, regentime, snd_incr, snd_decr) |
| #define | POSTGIVE_WEAPON(e, b, snd_incr, snd_decr) |
| #define | PREGIVE(e, f) |
| #define | PREGIVE_RESOURCE(e, f) |
| #define | PREGIVE_STATUSEFFECT(e, f) |
| #define | PREGIVE_WEAPONS(e) |
| #define ITEM_DAMAGE_NEEDKILL | ( | dt | ) |
Definition at line 129 of file items.qh.
Referenced by ctf_FlagDamage(), Item_Damage(), ka_DamageEvent(), kh_Key_Damage(), Monster_Damage(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_damage(), and physical_item_damage().
| #define ITEM_TOUCH_NEEDKILL | ( | ) |
Definition at line 128 of file items.qh.
Referenced by buff_Touch(), Item_Touch(), kh_Key_Touch(), nade_touch(), and physical_item_touch().
| #define POSTGIVE_BIT | ( | e, | |
| f, | |||
| b, | |||
| snd_incr, | |||
| snd_decr ) |
Definition at line 116 of file items.qh.
Referenced by GiveItems().
| #define POSTGIVE_RES_ROT | ( | e, | |
| f, | |||
| t, | |||
| rotfield, | |||
| rottime, | |||
| regenfield, | |||
| regentime, | |||
| snd_incr, | |||
| snd_decr ) |
Definition at line 119 of file items.qh.
Referenced by GiveItems().
| #define POSTGIVE_RESOURCE | ( | e, | |
| f, | |||
| t, | |||
| snd_incr, | |||
| snd_decr ) |
Definition at line 118 of file items.qh.
Referenced by GiveItems().
| #define POSTGIVE_STATUSEFFECT | ( | e, | |
| f, | |||
| snd_incr, | |||
| snd_decr ) |
Definition at line 117 of file items.qh.
Referenced by GiveItems().
| #define POSTGIVE_VALUE | ( | e, | |
| f, | |||
| t, | |||
| snd_incr, | |||
| snd_decr ) |
| #define POSTGIVE_VALUE_ROT | ( | e, | |
| f, | |||
| t, | |||
| rotfield, | |||
| rottime, | |||
| regenfield, | |||
| regentime, | |||
| snd_incr, | |||
| snd_decr ) |
| #define POSTGIVE_WEAPON | ( | e, | |
| b, | |||
| snd_incr, | |||
| snd_decr ) |
Definition at line 115 of file items.qh.
Referenced by GiveItems().
| #define PREGIVE | ( | e, | |
| f ) |
Definition at line 112 of file items.qh.
Referenced by GiveItems().
| #define PREGIVE_RESOURCE | ( | e, | |
| f ) |
Definition at line 114 of file items.qh.
Referenced by GiveItems().
| #define PREGIVE_STATUSEFFECT | ( | e, | |
| f ) |
Definition at line 113 of file items.qh.
Referenced by GiveItems().
| #define PREGIVE_WEAPONS | ( | e | ) |
Definition at line 908 of file items.qc.
References ammo, entity(), FOREACH, GetAmmoItem(), GetResource(), GetResourceLimit(), max(), min(), NULL, STAT, and Weapons.
Referenced by Ammo::float(), FuelRegen::float(), Jetpack::float(), and weapon_pickupevalfunc().
Definition at line 884 of file items.qc.
References entity().
Referenced by buff_Init().
Definition at line 1593 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_CompatName(), client_hasweapon(), cmd(), CS_CVAR, entity(), FOREACH, g_cts, g_weaponarena, GiveBit(), GiveResourceValue(), GiveStatusEffect(), GiveWeapon(), IT_UNLIMITED_AMMO, IT_UNLIMITED_SUPERWEAPONS, items, 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_ARMOR, STAT, StatusEffects_active(), StatusEffects_apply(), StatusEffects_update(), stof(), time, w_getbestweapon, W_SwitchWeapon_Force(), weaponentities, Weapons, WEP_FLAG_HIDDEN, WEP_FLAG_MUTATORBLOCKED, 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 446 of file items.qc.
References argv(), entity(), FOREACH, GetResource(), GiveResource(), NULL, RandomSelection_AddEnt, RandomSelection_chosen_ent, RandomSelection_Init(), STAT, tokenize_console, weapon, and Weapons.
Referenced by PutPlayerInServer().
Definition at line 1520 of file items.qc.
References ATTEN_NORM, CH_TRIGGER, CH_TRIGGER_SINGLE, entity(), NULL, sound, and VOL_BASE.
Definition at line 1453 of file items.qc.
References entity(), OP_MAX, OP_MIN, OP_MINUS, OP_PLUS, OP_SET, REGISTRY_GET, STAT, Weapons, and WepSet_FromWeapon.
Referenced by GiveItems().
Definition at line 956 of file items.qc.
References entity(), GetResource(), max(), min(), and RES_ARMOR.
Referenced by Armor::float(), and Health::float().
Definition at line 850 of file items.qc.
References cnt, entity(), ITEM_SHOULD_KEEP_POSITION, origin, spawnflags, and team.
Referenced by instagib_replace_item_with(), lms_replace_with_extralife(), MUTATOR_HOOKFUNCTION(), RandomItems_ReplaceMapItem(), and weapon_defaultspawnfunc().
Definition at line 812 of file items.qc.
References EF_NOGUNBOB, effects, entity(), ftos(), g_items, IL_EACH, LOG_TRACE, RandomSelection_chosen_ent, RandomSelection_Init(), and team.
Referenced by StartItem().
Definition at line 491 of file items.qc.
References entity(), g_weapon_stay, GetResource(), GiveResourceWithLimit(), min(), and TakeResourceWithLimit().
Referenced by Item_GiveTo().
Definition at line 528 of file items.qc.
References autocvar_g_pickup_cells_max, autocvar_g_pickup_fuel_max, autocvar_g_pickup_nails_max, autocvar_g_pickup_rockets_max, autocvar_g_pickup_shells_max, autocvar_g_powerups_stack, BIT, client_hasweapon(), CS_CVAR, entity(), FOREACH, g_cts, IT_FUEL_REGEN, IT_JETPACK, IT_PICKUPMASK, Item_GiveAmmoTo(), Item_NotifyWeapon(), max(), MAX_WEAPONSLOTS, REGISTRY_GET, RES_ARMOR, Send_Notification(), STAT, StatusEffects_apply(), StatusEffects_gettime(), time, W_DropEvent(), w_getbestweapon, W_GiveWeapon(), W_SwitchWeapon_Force(), weaponentities, Weapons, and WepSet_FromWeapon.
Referenced by Pickup::giveTo(), and WeaponPickup::giveTo().
Definition at line 791 of file items.qc.
References active, ACTIVE_ACTIVE, entity(), ITEM_IS_LOOT, Item_ScheduleInitialRespawn(), Item_Show(), Item_Think(), itemdef, nextthink, setthink, STAT, state, time, waypointsprite_attached, WaypointSprite_Kill(), and WEPSET_SUPERWEAPONS.
Referenced by StartItem().
Definition at line 242 of file items.qc.
References ATTEN_NORM, CH_TRIGGER, entity(), Item_ItemsTime_Allow(), Item_ItemsTime_SetTime(), Item_ItemsTime_SetTimesForAllPlayers(), Item_ItemsTime_UpdateTime(), Item_Show(), Item_Think(), itemdef, nextthink, setthink, sound, STAT, time, VOL_BASE, and WEPSET_SUPERWEAPONS.
Referenced by Item_RespawnCountdown(), and Item_RespawnThink().
Definition at line 258 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, soundto(), SPRITERULE_SPECTATOR, time, VOL_BASE, waypointsprite_attached, WaypointSprite_Kill(), WaypointSprite_Ping(), WaypointSprite_Spawn(), WaypointSprite_UpdateBuildFinished(), WaypointSprite_UpdateRule(), weapon, and Weapons.
Referenced by Item_RespawnCountdown(), Item_ScheduleRespawnIn(), MUTATOR_HOOKABLE(), and MUTATOR_HOOKFUNCTION().
Definition at line 411 of file items.qc.
References entity(), floor(), game_starttime, ITEM_RESPAWN_TICKS, Item_ScheduleRespawnIn(), Item_Show(), max(), random(), and time.
Referenced by Item_Reset().
Definition at line 391 of file items.qc.
References adjust_respawntime(), crandom, entity(), Item_ScheduleRespawnIn(), and Item_Show().
Referenced by Item_ScheduleRespawnIn(), MUTATOR_HOOKABLE(), MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 326 of file items.qc.
References entity(), 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, STAT, time, and WEPSET_SUPERWEAPONS.
Referenced by Item_ScheduleInitialRespawn(), and Item_ScheduleRespawn().
Definition at line 131 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, ISF_STATUS, ITS_ALLOWFB, ITS_ALLOWSI, ITS_AVAILABLE, ITS_GLOW, ITS_STAYWEP, SOLID_NOT, SOLID_TRIGGER, string_null, and WEPSET_SUPERWEAPONS.
Referenced by Item_Reset(), Item_Respawn(), Item_ScheduleInitialRespawn(), Item_ScheduleRespawn(), item_setactive(), and Item_Touch().
Definition at line 692 of file items.qc.
References _sound, ATTEN_NORM, CH_TRIGGER, CH_TRIGGER_SINGLE, entity(), FL_PICKUPITEMS, g_items, IL_EACH, invincible_finished, invisibility_finished, IS_DEAD, ISF_REMOVEFX, IT_RESOURCE, ITEM_HANDLE, ITEM_IS_EXPIRING, ITEM_IS_LOOT, item_pickupsound, 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(), RemoveItem(), SendFlags, solid, SOLID_TRIGGER, spawnshieldtime, speed_finished, STAT, strength_finished, SUB_UseTargets(), superweapons_finished, target, team, time, toucher, and VOL_BASE.
Referenced by StartItem().
Definition at line 32 of file items.qc.
References angles, bound(), classname, colormap, entity(), fade_end, glowmod, gravity, ISF_ANGLES, ISF_COLORMAP, ISF_DROP, ISF_LOCATION, ISF_SIZE, ISF_SIZE2, ISF_STATUS, ITEM_L_MAXS, ITEM_S_MAXS, ItemStatus, LOG_TRACE, maxs, mdl, MSG_ENTITY, origin, skin, velocity, WriteByte(), WriteHeader, WriteShort(), and WriteString().
Referenced by StartItem(), UpdateCSQCProjectile(), and UpdateItemAfterTeleport().
Definition at line 101 of file items.qc.
References entity(), ISF_LOCATION, oldorigin, origin, and SendFlags.
Referenced by Item_RespawnThink(), Item_Think(), UpdateCSQCProjectile(), and UpdateItemAfterTeleport().
Definition at line 864 of file items.qc.
References autocvar_sys_ticrate, entity(), ISF_REMOVEFX, nextthink, RemoveItem(), SendFlags, setthink, solid, SOLID_NOT, time, waypointsprite_attached, and WaypointSprite_Kill().
Referenced by Item_Damage(), Item_Think(), Item_Touch(), RemoveItem(), and StartItem().
Definition at line 1260 of file items.qc.
References entity(), FOREACH_ENTITY_RADIUS, IS_SMALL, ITEM_IS_LOOT, itemdef, and origin.
Referenced by StartItem().
| void setItemGroupCount | ( | ) |
| spawnfunc | ( | target_items | ) |
Definition at line 1331 of file items.qc.
References argv(), argv_end_index, argv_start_index, autocvar_g_balance_powerup_invincible_time, autocvar_g_balance_powerup_invisibility_time, autocvar_g_balance_powerup_speed_time, autocvar_g_balance_powerup_strength_time, autocvar_g_balance_superweapons_time, buffdef, buffs_finished, error, FOREACH, GetResource(), invincible_finished, invisibility_finished, IT_SUPERWEAPON, IT_UNLIMITED_AMMO, IT_UNLIMITED_SUPERWEAPONS, items, max(), netname, RES_ARMOR, spawnflags, speed_finished, STAT, strength_finished, string_null, substring(), superweapons_finished, target_items_use(), tokenize_console, use, and Weapons.
Definition at line 1004 of file items.qc.
References active, ACTIVE_ACTIVE, angles, autocvar_g_items_dropped_lifetime, autocvar_g_items_maxdist, autocvar_spawn_debug, bot_pickup, bot_pickupbasevalue, classname, cnt, colormap, DAMAGE_YES, DPCONTENTS_NODROP, DropToFloor_QC_DelayedInit(), EF_NOGUNBOB, effects, entity(), fade_end, FL_ITEM, flags, FOREACH_ENTITY_RADIUS, g_items, GetField_fullspawndata(), GetResource(), glowmod, gravity, have_pickup_item(), IL_PUSH(), InitializeEntity(), INITPRIO_FINDTARGET, invincible_finished, is_item, ISF_ANGLES, ISF_COLORMAP, IT_KEY1, IT_KEY2, IT_UPDATE_INTERVAL, Item_Damage(), Item_FindTeam(), ITEM_IS_EXPIRING, ITEM_IS_LOOT, Item_ItemsTime_SetTime(), item_model_ent, item_pickupsound, item_pickupsound_ent, Item_Reset(), item_setactive(), item_spawnshieldtime, Item_Think(), Item_Touch(), item_use(), itemdef, items, ItemSend(), ItemStatus, ITS_ANIMATE1, ITS_ANIMATE2, LOG_WARNF, max(), mdl, mins, model, MOVE_NORMAL, MOVETYPE_NONE, MOVETYPE_TOSS, MUTATOR_CALLHOOK, Net_LinkEntity(), netname, nextthink, noalign, NULL, origin, owner, pickup_anyway, pos1, precache_sound(), q3compat, REGISTRY_GET, RemoveItem(), RES_ARMOR, respawntime, SendFlags, set_movetype(), setItemGroup(), setmodel, setthink, settouch, skin, Sound_fixpath, spawnflags, startitem_failed, STAT, state, strength_finished, strzone(), superweapons_finished, takedamage, target, targetname, team, time, trace_dpstartcontents, use, wait, waypoint_spawnforitem(), weapon, Weapons, weaponsInMap, and WepSet_FromWeapon.
Referenced by instagib_replace_item_with(), Item_Initialise(), lms_replace_with_extralife(), and weapon_defaultspawnfunc().
| STATIC_INIT | ( | g_items | ) |
Definition at line 107 of file items.qc.
References entity(), getSendEntity, ItemSend(), and ItemUpdate().
Referenced by TeleportPlayer(), and WarpZone_PostTeleportPlayer_Callback().
Definition at line 886 of file items.qc.
References ammo_pickupevalfunc(), bound(), entity(), FOREACH, STAT, and Weapons.
| 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 9 of file items.qh.
Referenced by powerups_DropItem(), and StartItem().
| float autocvar_g_items_maxdist |
Definition at line 8 of file items.qh.
Referenced by StartItem().
| bool autocvar_g_nodepthtestitems |
Definition at line 11 of file items.qh.
Referenced by Item_Show().
| int autocvar_g_pickup_items |
Definition at line 10 of file items.qh.
Referenced by GameLogInit(), have_pickup_item(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and W_IsWeaponThrowable().
| float autocvar_sv_simple_items |
Definition at line 14 of file items.qh.
Referenced by Item_Show().
| IntrusiveList g_items |
Definition at line 125 of file items.qh.
Referenced by botframe_deleteuselesswaypoints(), buff_Init(), ctf_FlagSetup(), dom_controlpoint_setup(), findnearest(), havocbot_goalrating_items(), havocbot_movetogoal(), havocbot_select_an_item_of_group(), Item_FindTeam(), Item_ItemsTime_UpdateTime(), Item_Touch(), ka_SpawnBalls(), kh_Key_Attach(), kh_Key_Detach(), MoveToRandomLocationWithinBounds(), MUTATOR_HOOKFUNCTION(), setItemGroupCount(), StartItem(), STATIC_INIT(), target_give_init(), target_items_use(), tka_SpawnBalls(), W_Porto_Fail(), waypoint_spawn_fromeditor(), waypoint_unreachable(), and Weapon_whereis().
| bool is_item |
Definition at line 90 of file items.qh.
Referenced by StartItem().
| int item_group |
Definition at line 94 of file items.qh.
Referenced by havocbot_movetogoal().
| entity item_model_ent |
Definition at line 23 of file items.qh.
Referenced by StartItem().
| string item_pickupsound |
Definition at line 21 of file items.qh.
Referenced by Item_Touch(), and StartItem().
| entity item_pickupsound_ent |
Definition at line 22 of file items.qh.
Referenced by StartItem().
| const float ITEM_RESPAWN_TICKS = 10 |
Definition at line 18 of file items.qh.
Referenced by Item_RespawnCountdown(), Item_ScheduleInitialRespawn(), and Item_ScheduleRespawnIn().
| float item_respawncounter |
Definition at line 34 of file items.qh.
Referenced by Item_RespawnCountdown().
| float item_spawnshieldtime |
Definition at line 41 of file items.qh.
Referenced by Item_Touch(), and StartItem().
| entity itemdef |
Definition at line 91 of file items.qh.
Referenced by have_pickup_item(), Item_Reset(), Item_Respawn(), Item_RespawnCountdown(), Item_Think(), Item_Touch(), setItemGroup(), and StartItem().
| float max_armorvalue |
Definition at line 25 of file items.qh.
Referenced by PlayerDamage(), and PlayerFrame().
| bool noalign |
Definition at line 36 of file items.qh.
Referenced by buff_Init(), ctf_FlagThink(), Monster_Spawn(), spawn_item_key(), spawner_use(), and StartItem().
| float pickup_anyway |
Definition at line 26 of file items.qh.
Referenced by StartItem(), and weapon_defaultspawnfunc().
| float respawntime |
Definition at line 30 of file items.qh.
Referenced by counter_use(), func_breakable_destroy(), Monster_Dead_Fade(), Monster_Spawn_Setup(), multivibrator_send(), spawnfunc(), spiderbot_blowup(), StartItem(), turret_hide(), vehicle_initialize(), and weapon_defaultspawnfunc().
| float respawntimejitter |
Definition at line 31 of file items.qh.
Referenced by func_breakable_destroy(), and weapon_defaultspawnfunc().
| float superweapons_finished |
Definition at line 38 of file items.qh.
Referenced by Item_Touch(), spawnfunc(), StartItem(), and weapon_defaultspawnfunc().