|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "all.qh"#include <client/main.qh>#include <common/constants.qh>#include <common/deathtypes/all.qh>#include <common/physics/movetypes/movetypes.qh>#include <common/stats.qh>#include <common/util.qh>#include <common/weapons/calculations.qc>#include <common/weapons/weapon/_mod.inc>#include <lib/csqcmodel/cl_model.qh>#include <lib/csqcmodel/interpolate.qh>#include <lib/warpzone/anglestransform.qh>#include <lib/warpzone/client.qh>#include <lib/warpzone/common.qh>Go to the source code of this file.
Macros | |
| #define | _DOES_MSG(mode) |
| #define | _DOES_PERSEC_MSG(mode) |
| #define | _IT_DOES_MSG() |
| #define | _IT_SHOOTS_MSG() |
| #define | _SHOOTS_MSG(mode) |
| #define | _SHOOTS_UPTO_MSG(mode) |
| #define | COLORED_DAMAGE(dmg) |
| #define | DPS_MUL(mode) |
| #define | DPS_ONE(mode) |
| #define | IT_DOES() |
| #define | IT_SHOOTS() |
| #define | pri_str _("primary") |
| #define | sec_str _("secondary") |
| #define | THE_PRIMARY_DOES() |
| #define | THE_PRIMARY_DOES_PERSEC() |
| #define | THE_PRIMARY_SHOOTS() |
| #define | THE_PRIMARY_SHOOTS_UPTO() |
| #define | THE_SECONDARY_DOES() |
| #define | THE_SECONDARY_DOES_PERSEC() |
| #define | THE_SECONDARY_SHOOTS() |
| #define | THE_SECONDARY_SHOOTS_UPTO() |
| #define | WEAPONS_ALL_C |
Variables | |
| float | W_FixWeaponOrder_BuildImpulseList_buf [REGISTRY_MAX(Weapons)] |
| string | W_FixWeaponOrder_BuildImpulseList_order |
| #define _DOES_MSG | ( | mode | ) |
| #define _DOES_PERSEC_MSG | ( | mode | ) |
| #define _IT_DOES_MSG | ( | ) |
| #define _IT_SHOOTS_MSG | ( | ) |
| #define _SHOOTS_MSG | ( | mode | ) |
| #define _SHOOTS_UPTO_MSG | ( | mode | ) |
| #define COLORED_DAMAGE | ( | dmg | ) |
Definition at line 873 of file all.qc.
Referenced by W_Guide_DPS_onlyOne_unnamed_andDirectHit(), and W_Guide_DPS_secondaryMultishotWithCombo().
| #define DPS_MUL | ( | mode | ) |
| #define DPS_ONE | ( | mode | ) |
| #define IT_DOES | ( | ) |
Definition at line 888 of file all.qc.
Referenced by W_Guide_DPS_onlyOne_unnamed(), and W_Guide_DPS_onlyOne_unnamed_andDirectHit().
| #define IT_SHOOTS | ( | ) |
| #define THE_PRIMARY_DOES | ( | ) |
Definition at line 890 of file all.qc.
Referenced by W_Guide_DPS(), W_Guide_DPS_secondaryMultishot(), and W_Guide_DPS_secondaryMultishotWithCombo().
| #define THE_PRIMARY_DOES_PERSEC | ( | ) |
Definition at line 893 of file all.qc.
Referenced by W_Guide_DPS_primaryDPS().
| #define THE_PRIMARY_SHOOTS | ( | ) |
Definition at line 891 of file all.qc.
Referenced by W_Guide_DPS_bothMultishot(), and W_Guide_DPS_primaryMultishot().
| #define THE_PRIMARY_SHOOTS_UPTO | ( | ) |
| #define THE_SECONDARY_DOES | ( | ) |
Definition at line 894 of file all.qc.
Referenced by W_Guide_DPS(), W_Guide_DPS_onlySecondary(), W_Guide_DPS_primaryDPS(), and W_Guide_DPS_primaryMultishot().
| #define THE_SECONDARY_DOES_PERSEC | ( | ) |
| #define THE_SECONDARY_SHOOTS | ( | ) |
Definition at line 895 of file all.qc.
Referenced by W_Guide_DPS_bothMultishot(), W_Guide_DPS_secondaryMultishot(), and W_Guide_DPS_secondaryMultishotWithCombo().
| #define THE_SECONDARY_SHOOTS_UPTO | ( | ) |
Definition at line 896 of file all.qc.
Referenced by W_Guide_DPS_secondaryMultishot(), and W_Guide_DPS_secondaryMultishotWithCombo().
Definition at line 53 of file all.qc.
References BIT, REGISTRY_MAX, Weapons, and WEP_FIRST.
Referenced by STATIC_INIT().
supported formats:
writes: this.origin, this.angles this.weaponchild this.movedir, this.view_ofs, this.movedir_aligned this.spawnorigin (SVQC only) attachment stuff anim stuff to free: call again with "" remove the ent
Definition at line 347 of file all.qc.
References angles, anim_fire1, anim_fire2, anim_idle, anim_reload, animfixfps(), compressShotOrigin(), decompressShotOrigin(), entity(), frame, gettagindex, gettaginfo, LOG_WARNF, m_gunalign, MASK_NORMAL, maxs, mins, model, movedir, movedir_aligned, name, NULL, oldorigin, owner, renderflags, RF_VIEWMODEL, setanim, setmodel, shotorg_adjust(), spawnorigin, STAT, strcat(), vector, view_ofs, viewmodelforclient, W_GunAlign(), W_Model(), weaponchild, and wframe.
Referenced by CL_Weapon_GetShotOrg(), CL_Weaponentity_Think(), and viewmodel_draw().
Definition at line 189 of file all.qc.
References entity(), FOREACH, LOG_WARNF, Resource::netname, and NULL.
Referenced by ammo_pickupevalfunc().
Definition at line 210 of file all.qc.
References STAT_CELLS, STAT_NAILS, STAT_ROCKETS, and STAT_SHELLS.
Referenced by DrawAmmoItem(), and Weapons_Draw().
| NET_HANDLE | ( | w_whereis | , |
| bool | ) |
Definition at line 606 of file all.qc.
References ReadRegistered, Weapon_whereis(), and Weapons.
Definition at line 546 of file all.qc.
References anim_set(), entity(), ReadByte(), ReadFloat, vector, viewmodels, wframe, WS_DROP, and WS_RAISE.
| WepSet ReadWepSet | ( | ) |
Definition at line 87 of file all.qc.
References ReadInt24_t(), ReadInt48_t, ReadInt72_t, REGISTRY_MAX, and Weapons.
| REPLICATE | ( | cvar_cl_accuracy_data_receive | , |
| bool | , | ||
| "cl_accuracy_data_receive" | ) |
| REPLICATE | ( | cvar_cl_accuracy_data_share | , |
| bool | , | ||
| "cl_accuracy_data_share" | ) |
| REPLICATE | ( | cvar_cl_gunalign | , |
| int | , | ||
| "cl_gunalign" | ) |
| REPLICATE | ( | cvar_cl_weapon_switch_fallback_to_impulse | , |
| bool | , | ||
| "cl_weapon_switch_fallback_to_impulse" | ) |
| REPLICATE | ( | cvar_cl_weapon_switch_reload | , |
| bool | , | ||
| "cl_weapon_switch_reload" | ) |
| REPLICATE | ( | cvar_cl_weaponimpulsemode | , |
| int | , | ||
| "cl_weaponimpulsemode" | ) |
| REPLICATE | ( | cvar_cl_weaponpriorities | [0], |
| string | , | ||
| "cl_weaponpriority0" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [1], |
| string | , | ||
| "cl_weaponpriority1" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [2], |
| string | , | ||
| "cl_weaponpriority2" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [3], |
| string | , | ||
| "cl_weaponpriority3" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [4], |
| string | , | ||
| "cl_weaponpriority4" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [5], |
| string | , | ||
| "cl_weaponpriority5" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [6], |
| string | , | ||
| "cl_weaponpriority6" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [7], |
| string | , | ||
| "cl_weaponpriority7" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [8], |
| string | , | ||
| "cl_weaponpriority8" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriorities | [9], |
| string | , | ||
| "cl_weaponpriority9" | , | ||
| W_FixWeaponOrder_AllowIncomplete | ) |
References W_FixWeaponOrder_AllowIncomplete().
| REPLICATE | ( | cvar_cl_weaponpriority | , |
| string | , | ||
| "cl_weaponpriority" | , | ||
| W_FixWeaponOrder_ForceComplete_AndBuildImpulseList | ) |
Definition at line 262 of file all.qc.
References G_SHOOTFROMFIXEDORIGIN, shotorg_adjustfromclient(), STAT, stov(), and vector.
Referenced by CL_WeaponEntity_SetModel(), and PRECACHE().
Definition at line 240 of file all.qc.
References vector.
Referenced by shotorg_adjust().
Definition at line 95 of file all.qc.
References fixPriorityList(), WEP_FIRST, WEP_IMPULSE_BEGIN, and WEP_LAST.
Referenced by LocalCommand_sendcvar(), W_FixWeaponOrder_AllowIncomplete(), W_FixWeaponOrder_ForceComplete(), and XonoticWeaponsList_draw().
Definition at line 161 of file all.qc.
References entity(), and W_FixWeaponOrder().
Referenced by REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), REPLICATE(), and REPLICATE().
Definition at line 146 of file all.qc.
References ftos(), heapsort(), NULL, strcat(), string_null, substring(), W_FixWeaponOrder_BuildImpulseList_buf, W_FixWeaponOrder_BuildImpulseList_cmp(), W_FixWeaponOrder_BuildImpulseList_order, W_FixWeaponOrder_BuildImpulseList_swap(), WEP_FIRST, and WEP_LAST.
Referenced by HUD_Weapons(), and W_FixWeaponOrder_ForceComplete_AndBuildImpulseList().
Definition at line 134 of file all.qc.
References entity(), Weapon::impulse, pass, REGISTRY_GET, strcat(), strstrofs, W_FixWeaponOrder_BuildImpulseList_buf, W_FixWeaponOrder_BuildImpulseList_order, and Weapons.
Referenced by W_FixWeaponOrder_BuildImpulseList().
Definition at line 127 of file all.qc.
References entity(), pass, and W_FixWeaponOrder_BuildImpulseList_buf.
Referenced by W_FixWeaponOrder_BuildImpulseList().
Definition at line 166 of file all.qc.
References cvar_defstring(), W_FixWeaponOrder(), and W_NumberWeaponOrder().
Referenced by HUD_Weapons(), and W_FixWeaponOrder_ForceComplete_AndBuildImpulseList().
Definition at line 802 of file all.qc.
References CS_CVAR, entity(), strcpy, W_FixWeaponOrder_BuildImpulseList(), W_FixWeaponOrder_ForceComplete(), and weaponorder_byimpulse.
Referenced by REPLICATE().
Definition at line 930 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), THE_PRIMARY_DOES, and THE_SECONDARY_DOES.
Definition at line 944 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), THE_PRIMARY_SHOOTS, and THE_SECONDARY_SHOOTS.
Definition at line 926 of file all.qc.
References name, strcat(), and W_Guide_DPS_onlyOne_unnamed().
Definition at line 922 of file all.qc.
References name, strcat(), and W_Guide_DPS_onlyOne_unnamed_andDirectHit().
Definition at line 913 of file all.qc.
References cvar_defstring(), IT_DOES, name, stof(), and strcat().
Referenced by W_Guide_DPS_onlyOne().
Definition at line 901 of file all.qc.
References COLORED_DAMAGE, cvar_defstring(), IT_DOES, name, stof(), and strcat().
Referenced by W_Guide_DPS_onlyOne_andDirectHit().
Definition at line 958 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), and THE_SECONDARY_DOES.
Definition at line 1040 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), THE_PRIMARY_DOES_PERSEC, and THE_SECONDARY_DOES.
| string W_Guide_DPS_primaryMultishot | ( | string | name, |
| string | pri, | ||
| string | sec, | ||
| string | shots, | ||
| string | refire2 ) |
Definition at line 985 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), THE_PRIMARY_SHOOTS, and THE_SECONDARY_DOES.
| string W_Guide_DPS_secondaryMultishot | ( | string | name, |
| string | pri, | ||
| string | sec, | ||
| string | shots, | ||
| string | refire2, | ||
| bool | sec_variable ) |
Definition at line 967 of file all.qc.
References cvar_defstring(), name, stof(), strcat(), THE_PRIMARY_DOES, THE_SECONDARY_SHOOTS, and THE_SECONDARY_SHOOTS_UPTO.
| string W_Guide_DPS_secondaryMultishotWithCombo | ( | string | name, |
| string | pri, | ||
| string | sec, | ||
| string | shots, | ||
| string | refire2, | ||
| string | combo, | ||
| bool | sec_variable ) |
Definition at line 1014 of file all.qc.
References COLORED_DAMAGE, cvar_defstring(), max(), name, stof(), strcat(), THE_PRIMARY_DOES, THE_SECONDARY_SHOOTS, and THE_SECONDARY_SHOOTS_UPTO.
Definition at line 836 of file all.qc.
References argv(), cvar(), Weapon::impulse, itos, keynumtostring(), Weapon::netname, startsWith, stof(), strcat(), tokenize(), and translate_key().
Definition at line 232 of file all.qc.
References M_ARGV, MUTATOR_CALLHOOK, and strcat().
Referenced by CL_ExteriorWeaponentity_Think(), and CL_WeaponEntity_SetModel().
| void W_MuzzleFlash | ( | Weapon | thiswep, |
| entity | actor, | ||
| .entity | weaponentity, | ||
| vector | shotorg, | ||
| vector | shotdir ) |
Definition at line 728 of file all.qc.
References entity(), FOREACH_CLIENT, IS_SPEC, Weapon::m_muzzlemodel, Send_Effect_Except(), shotdir, shotorg, vector, W_MuzzleFlash_Model(), W_MuzzleFlash_Model_AttachToShotorg(), and weaponslot().
Referenced by FireGrapplingHook(), W_Arc_Attack_Bolt(), W_Blaster_Attack(), W_Crylink_Attack(), W_Crylink_Attack2(), W_Devastator_Attack(), W_Electro_Attack_Bolt(), W_Electro_Attack_Orb(), W_Fireball_Attack1(), W_Fireball_Attack2(), W_Hagar_Attack(), W_Hagar_Attack2(), W_Hagar_Attack2_Load_Release(), W_HLAC_Attack(), W_HLAC_Attack2(), W_MachineGun_Attack(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Burst(), W_MineLayer_Attack(), W_Mortar_Attack(), W_Mortar_Attack2(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), W_OverkillRocketPropelledChainsaw_Attack(), W_Rifle_FireBullet(), W_RocketMinsta_Attack(), W_Seeker_Fire_Flac(), W_Seeker_Fire_Missile(), W_Shotgun_Attack(), W_Vaporizer_Attack(), and W_Vortex_Attack().
Definition at line 703 of file all.qc.
References EF_ADDITIVE, EF_FULLBRIGHT, entity(), MASK_NORMAL, NULL, random(), setmodel, setthink, spawn, time, and W_MuzzleFlash_Model_Think().
Referenced by W_MuzzleFlash().
| void W_MuzzleFlash_Model_AttachToShotorg | ( | entity | actor, |
| .entity | weaponentity, | ||
| entity | flash, | ||
| vector | offset ) |
Definition at line 655 of file all.qc.
References entity(), gettagindex, random(), and vector.
Referenced by W_MuzzleFlash().
Definition at line 110 of file all.qc.
References mapPriorityList(), and W_NameWeaponOrder_MapFunc().
Referenced by XonoticWeaponsList_draw().
Definition at line 99 of file all.qc.
References entity(), REGISTRY_GET, stof(), and Weapons.
Referenced by W_NameWeaponOrder().
Definition at line 120 of file all.qc.
References mapPriorityList(), and W_NumberWeaponOrder_MapFunc().
Referenced by HUD_Weapons(), LocalCommand_sendcvar(), W_FixWeaponOrder_ForceComplete(), XonoticWeaponsList_draw(), and XonoticWeaponsList_toString().
Definition at line 172 of file all.qc.
References entity(), FOREACH, RandomSelection_AddEnt, RandomSelection_chosen_ent, RandomSelection_Init(), result, Weapons, and WepSet_FromWeapon.
Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().
Definition at line 225 of file all.qc.
References M_ARGV, MUTATOR_CALLHOOK, and strcat().
Definition at line 26 of file selection.qc.
References autocvar_g_showweaponspawns, enemy, entity(), g_items, IL_EACH, ITS_AVAILABLE, NULL, and WaypointSprite_Spawn().
Referenced by client_hasweapon(), and NET_HANDLE().
| WepSet WepSet_GetFromStat | ( | ) |
Definition at line 79 of file all.qc.
References STAT.
Referenced by HUD_Weapons(), MUTATOR_HOOKFUNCTION(), and Scoreboard_AccuracyStats_Draw().
| WepSet WepSet_GetFromStat_InMap | ( | ) |
Definition at line 83 of file all.qc.
References STAT.
Referenced by Scoreboard_AccuracyStats_Draw().
| void wframe_send | ( | entity | actor, |
| entity | weaponentity, | ||
| int | wepframe, | ||
| float | attackrate, | ||
| bool | restartanim ) |
Definition at line 588 of file all.qc.
References entity(), IS_REAL_CLIENT, msg_entity, MSG_ONE, weaponslot(), wframe, WriteByte(), and WriteHeader.
Referenced by weapon_thinkf().
Definition at line 71 of file all.qc.
References REGISTRY_MAX, and Weapons.
| float W_FixWeaponOrder_BuildImpulseList_buf[REGISTRY_MAX(Weapons)] |
Definition at line 125 of file all.qc.
Referenced by W_FixWeaponOrder_BuildImpulseList(), W_FixWeaponOrder_BuildImpulseList_cmp(), and W_FixWeaponOrder_BuildImpulseList_swap().
| string W_FixWeaponOrder_BuildImpulseList_order |
Definition at line 126 of file all.qc.
Referenced by W_FixWeaponOrder_BuildImpulseList(), and W_FixWeaponOrder_BuildImpulseList_cmp().