|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "common.qh"#include <common/constants.qh>#include <common/deathtypes/all.qh>#include <common/items/_mod.qh>#include <common/net_linked.qh>#include <common/notifications/all.qh>#include <common/state.qh>#include <common/stats.qh>#include <common/util.qh>#include <common/weapons/_all.qh>#include <common/wepent.qh>#include <server/command/common.qh>#include <server/damage.qh>#include <server/hook.qh>#include <server/items/items.qh>#include <server/mutators/_mod.qh>#include <server/weapons/csqcprojectile.qh>Go to the source code of this file.
Functions | |
| void | adaptor_think2use_hittype_splash (entity this) |
| bool | SUB_NoImpactCheck (entity this, entity toucher) |
| float | W_CheckProjectileDamage (entity inflictor, entity projowner, int deathtype, float exception) |
| void | W_DamageOverTime_Think (entity this, float duration, float duration_power, float damage, float edgedamage, float rad, float force, entity cantbe, float think_delay) |
| Applies damage over time, called within a think function. | |
| bool | W_DualWielding (entity player) |
| void | W_GiveWeapon (entity e, int wep) |
| void | W_GuideProjectile (entity this,.entity weaponentity, float guide_start_time, float guide_rate, float guide_rate_delay, float guide_goal, float guide_delay, entity eff, entity snd, float vol) |
| Guides a projectile towards the crosshair (v_forward). | |
| void | W_LaserPlay (entity this, float rad, float damage, float edgedamage, float burntime, WarpZone_FindRadius_cond_callback_t cb) |
| Randomly chooses a player within the radius to shoot a laser towards. | |
| void | W_LaserPlay_trace_callback (vector start, vector hit, vector end) |
| void | W_PlayStrengthSound (entity player) |
| void | W_PrepareExplosionByDamage (entity this, entity attacker, void(entity this) explode) |
| float | W_SeekOutEnemy (entity this, float speed_decel, float speed_accel, float speed_max, float turn_rate, bool smart, float smart_mindist, float smart_trace_min, float smart_trace_max) |
| Automatically guides a projectile towards its enemy. | |
| vector | W_SteerProjectileTo (vector thisdir, vector goaldir, float maxturn_cos) |
| bool | WarpZone_Projectile_Touch_ImpactFilter_Callback (entity this, entity toucher) |
Variables | |
| vector | W_LaserPlay_end_org |
| vector | W_LaserPlay_last_hit_org |
| float | wait |
Definition at line 106 of file common.qc.
References entity(), HITTYPE_SPLASH, IS_ONGROUND, and projectiledeathtype.
Referenced by M_Spider_Attack_Web(), W_Arc_Attack_Bolt(), W_Electro_Attack_Orb(), W_Electro_Orb_Follow_Think(), W_Electro_Orb_Stick(), W_Hagar_Attack(), W_Hagar_Attack2(), W_Hagar_Attack2_Load_Release(), W_Hook_Attack2(), W_Mortar_Attack2(), W_RocketMinsta_Attack(), and W_Seeker_Fire_Flac().
Definition at line 113 of file common.qc.
References checkclient, classname, entity(), LOG_TRACE, LOG_TRACEF, maxs, mins, MOVE_NORMAL, normalize(), NULL, origin, Q3SURFACEFLAG_NOIMPACT, size, sys_frametime, toucher, trace_dphitcontents, trace_dphitq3surfaceflags, trace_fraction, vector, velocity, and vlen().
Referenced by WarpZone_Projectile_Touch_ImpactFilter_Callback().
| float W_CheckProjectileDamage | ( | entity | inflictor, |
| entity | projowner, | ||
| int | deathtype, | ||
| float | exception ) |
Definition at line 45 of file common.qc.
References autocvar_g_projectiles_damage, and entity().
Referenced by GrapplingHook_Damage(), M_Golem_Attack_Lightning_Damage(), W_Arc_Bolt_Damage(), W_Devastator_Damage(), W_Electro_Orb_Damage(), W_Fireball_Damage(), W_Hagar_Damage(), W_Hook_Damage(), W_MineLayer_Damage(), W_Mortar_Grenade_Damage(), W_OverkillRocketPropelledChainsaw_Damage(), and W_Seeker_Missile_Damage().
| void W_DamageOverTime_Think | ( | entity | this, |
| float | duration, | ||
| float | duration_power, | ||
| float | damage, | ||
| float | edgedamage, | ||
| float | rad, | ||
| float | force, | ||
| entity | cantbe, | ||
| float | think_delay ) |
Applies damage over time, called within a think function.
Definition at line 285 of file common.qc.
References bound(), dmg_last, entity(), HITTYPE_SPAM, nextthink, NULL, projectiledeathtype, RadiusDamage(), realowner, teleport_time, time, and weaponentity_fld.
Referenced by W_Electro_ExplodeComboThink(), and W_Hook_ExplodeThink().
Definition at line 20 of file common.qc.
References entity(), MAX_WEAPONSLOTS, and weaponentities.
Referenced by IMPULSE(), PlayerThink(), W_GuideProjectile(), W_ResetGunAlign(), W_SetupShot_Dir_ProjectileSize_Range(), and weapon_prepareattack_do().
Definition at line 33 of file common.qc.
References entity(), REGISTRY_GET, STAT, Weapons, and WepSet_FromWeapon.
Referenced by Item_GiveTo(), and TEST().
| void W_GuideProjectile | ( | entity | this, |
| .entity | weaponentity, | ||
| float | guide_start_time, | ||
| float | guide_rate, | ||
| float | guide_rate_delay, | ||
| float | guide_goal, | ||
| float | guide_delay, | ||
| entity | eff, | ||
| entity | snd, | ||
| float | vol ) |
Guides a projectile towards the crosshair (v_forward).
Call makevectors first
Definition at line 349 of file common.qc.
References angles, ATTN_NORM, bound(), CH_WEAPON_B, cos(), count, DEG2RAD, entity(), frametime, makevectors, movedir, normalize(), origin, realowner, Send_Effect(), sound, time, v_forward, v_right, v_up, vectoangles(), vector, velocity, vlen(), W_DualWielding(), W_SteerProjectileTo(), WarpZone_RefSys_TransformOrigin(), and WarpZone_RefSys_TransformVelocity().
Referenced by W_Devastator_Think(), and W_Seeker_Tag_Think().
| void W_LaserPlay | ( | entity | this, |
| float | rad, | ||
| float | damage, | ||
| float | edgedamage, | ||
| float | burntime, | ||
| WarpZone_FindRadius_cond_callback_t | cb ) |
Randomly chooses a player within the radius to shoot a laser towards.
Definition at line 191 of file common.qc.
References entity(), Fire_AddDamage(), HITTYPE_BOUNCE, MOVE_NOMONSTERS, MOVE_NOTHING, NULL, origin, projectiledeathtype, random(), RandomSelection_AddEnt, RandomSelection_chosen_ent, RandomSelection_Init(), realowner, Send_Effect(), sqrt(), StatusEffects_active(), vector, vlen2, W_LaserPlay_end_org, W_LaserPlay_last_hit_org, W_LaserPlay_trace_callback(), WarpZone_SearchInRadius(), WarpZone_SearchInRadius_otherent, WarpZone_TraceLine_ThroughZone, and WarpZone_UnTransformOrigin().
Referenced by napalm_ball_think(), napalm_fountain_think(), W_Fireball_Firemine_Think(), and W_Fireball_Think().
Definition at line 182 of file common.qc.
References Send_Effect(), vector, W_LaserPlay_end_org, and W_LaserPlay_last_hit_org.
Referenced by W_LaserPlay().
Definition at line 40 of file common.qc.
References entity(), MUTATOR_CALLHOOK, and W_PlayStrengthSound().
Referenced by MUTATOR_HOOKABLE(), MUTATOR_HOOKFUNCTION(), W_PlayStrengthSound(), W_SetupShot_Dir_ProjectileSize_Range(), and W_Shotgun_Melee_Think().
Definition at line 87 of file common.qc.
References autocvar_g_projectiles_keep_owner, DAMAGE_NO, entity(), func_null(), IS_CLIENT, MUTATOR_CALLHOOK, nextthink, owner, realowner, setthink, takedamage, and time.
Referenced by M_Golem_Attack_Lightning_Damage(), nade_damage(), nade_translocate_DestroyDamage(), turret_projectile_damage(), W_Arc_Bolt_Damage(), W_Devastator_Damage(), W_Fireball_Damage(), W_Hagar_Damage(), W_Hook_Damage(), W_MineLayer_Damage(), W_Mortar_Grenade_Damage(), W_OverkillRocketPropelledChainsaw_Damage(), W_Seeker_Missile_Damage(), and walker_rocket_damage().
| float W_SeekOutEnemy | ( | entity | this, |
| float | speed_decel, | ||
| float | speed_accel, | ||
| float | speed_max, | ||
| float | turn_rate, | ||
| bool | smart, | ||
| float | smart_mindist, | ||
| float | smart_trace_min, | ||
| float | smart_trace_max ) |
Automatically guides a projectile towards its enemy.
RefSys must be setup
Definition at line 239 of file common.qc.
References bound(), DAMAGE_AIM, enemy, entity(), frametime, IS_DEAD, normalize(), NULL, origin, trace_endpos, trace_fraction, trace_plane_normal, vdist, vector, velocity, vlen(), wait, WarpZone_RefSys_TransformOrigin(), WarpZone_trace_transform, WarpZone_TraceLine, and WarpZone_UnTransformOrigin().
Referenced by M_Mage_Attack_Spike_Think(), and W_Seeker_Missile_Think().
Definition at line 315 of file common.qc.
References normalize(), solve_quadratic(), and vector.
Referenced by W_GuideProjectile().
Definition at line 150 of file common.qc.
References autocvar_g_projectiles_interact, classname, entity(), gettouch, movetype, MOVETYPE_BOUNCE, MOVETYPE_BOUNCEMISSILE, owner, RemoveHook(), SOLID_TRIGGER, SUB_NoImpactCheck(), toucher, trace_ent, and UpdateCSQCProjectile().
Referenced by WarpZone_Projectile_Touch().
| vector W_LaserPlay_end_org |
Definition at line 181 of file common.qc.
Referenced by W_LaserPlay(), and W_LaserPlay_trace_callback().
| vector W_LaserPlay_last_hit_org |
Definition at line 180 of file common.qc.
Referenced by W_LaserPlay(), and W_LaserPlay_trace_callback().