|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "sv_turrets.qh"#include <common/mapobjects/defs.qh>#include <server/bot/api.qh>#include <server/damage.qh>#include <server/weapons/common.qh>#include <server/weapons/weaponsystem.qh>#include <server/world.qh>Go to the source code of this file.
Macros | |
| #define | TRY(x) |
| #define | X(class, prefix, fld, type) |
Variables | |
| float | clientframe |
| float | turret_framecounter |
| Handles head rotation according to the units .track_type and .track_flags. | |
| #define TRY | ( | x | ) |
Referenced by turret_initparams().
| #define X | ( | class, | |
| prefix, | |||
| fld, | |||
| type ) |
Definition at line 381 of file sv_turrets.qc.
References entity(), get_turretinfo, GetResource(), NULL, SetResourceExplicit(), TR_PROPS_COMMON, Turret::tr_setup(), and X.
Referenced by turret_initialize(), and turrets_manager_think().
Definition at line 12 of file sv_turrets.qc.
References aim_flags, attack_finished_single, autocvar_sv_gravity, enemy, entity(), IS_ONGROUND, max(), MOVE_WORLDONLY, MOVETYPE_BOUNCE, MOVETYPE_TOSS, MOVETYPE_WALK, real_origin(), sys_frametime, TFL_AIM_LEAD, TFL_AIM_SHOTTIMECOMPENSATE, TFL_AIM_SIMPLE, TFL_AIM_SPLASH, TFL_AIM_ZPREDICT, time, trace_endpos, trace_fraction, tur_shotorg, turret_tag_fire_update(), vector, and vlen().
Referenced by turret_think().
Definition at line 980 of file sv_turrets.qc.
References entity(), M_ARGV, and MUTATOR_CALLHOOK.
Referenced by turret_think().
Definition at line 1246 of file sv_turrets.qc.
References absmax, absmin, boxesoverlap(), entity(), and vector.
Referenced by ewheel_move_path(), Monster_Move(), and walker_move_path().
| void turret_damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | vforce ) |
Definition at line 221 of file sv_turrets.qc.
References active, autocvar_g_friendlyfire, damage_flags, DAMAGE_NO, DEAD_DEAD, deadflag, entity(), func_null(), GetResource(), nextthink, random(), SAME_TEAM, SendFlags, setthink, takedamage, TakeResource(), TFL_DMG_HEADSHAKE, time, TNSF_ANG, TNSF_STATUS, TUR_FLAG_MOVE, tur_head, turret_die(), turret_flags, vector, and velocity.
Referenced by turret_initialize(), and turret_respawn().
Definition at line 180 of file sv_turrets.qc.
References ATTEN_NORM, CH_SHOTS, damage_flags, DAMAGE_NO, DEAD_DEAD, deadflag, entity(), func_null(), get_turretinfo, m_id, nextthink, origin, Send_Effect(), SendFlags, SetResourceExplicit(), setthink, solid, SOLID_NOT, sound, takedamage, TFL_DMG_DEATH_NORESPAWN, time, TNSF_STATUS, Turret::tr_death(), tur_head, turret_hide(), and VOL_BASE.
updates enemy distances, predicted impact point/time and updated aim<->predict impact distance.
updates aim org, shot org, shot dir and enemy org for selected turret
Definition at line 499 of file sv_turrets.qc.
References entity(), MOVE_NORMAL, real_origin(), trace_endpos, trace_ent, turret_tag_fire_update(), v_forward, vector, and vlen().
Referenced by beam_think(), and turret_think().
Definition at line 1252 of file sv_turrets.qc.
References angleofs, classname, entity(), find(), idle_aim, LOG_TRACE, new_pure, NULL, setthink, target, targetname, time, tur_defend, tur_head, and turrets_manager_think().
Referenced by turret_initialize().
Definition at line 988 of file sv_turrets.qc.
References ammo, attack_finished_single, autocvar_g_turrets_nofire, enemy, entity(), get_turretinfo, m_id, MUTATOR_CALLHOOK, NULL, shoot_flags, TFL_SHOOT_CLEARTARGET, time, Turret::tr_attack(), tur_aimpos, tur_impacttime, and volly_counter.
Referenced by turret_think().
Preforms pre-fire checks based on the uints firecheck_flags.
Definition at line 905 of file sv_turrets.qc.
References ammo, attack_finished_single, enemy, entity(), firecheck_flags, IS_DEAD, NULL, shoot_flags, target_validate_flags, TFL_FIRECHECK_AFF, TFL_FIRECHECK_AIMDIST, TFL_FIRECHECK_AMMO_OTHER, TFL_FIRECHECK_AMMO_OWN, TFL_FIRECHECK_DEAD, TFL_FIRECHECK_DISTANCES, TFL_FIRECHECK_NO, TFL_FIRECHECK_REFIRE, TFL_SHOOT_VOLLYALWAYS, time, tur_dist_aimpos, tur_dist_impact_to_aimpos, tur_impactent, turret_validate_target(), and volly_counter.
Referenced by turret_initialize(), turret_phaser_firecheck(), turret_tesla_firecheck(), and walker_firecheck().
Definition at line 267 of file sv_turrets.qc.
References entity(), GetResource(), GiveResourceWithLimit(), RES_LIMIT_NONE, and TNSF_STATUS.
Referenced by turret_initialize(), and turret_respawn().
Definition at line 173 of file sv_turrets.qc.
References EF_NODRAW, effects, entity(), nextthink, respawntime, setthink, time, and turret_respawn().
Referenced by turret_die().
Definition at line 1281 of file sv_turrets.qc.
References active, ACTIVE_ACTIVE, aim_flags, ammo, ammo_flags, autocvar_g_turrets, bot_attack, bound(), DAMAGE_AIM, damage_flags, DAMAGE_NO, DropToFloor_QC_DelayedInit(), EF_NODRAW, effects, entity(), fabs(), firecheck_flags, FLOAT_MAX, g_bot_targets, g_turrets, GetResource(), idle_aim, IL_PUSH(), InitializeEntity(), INITPRIO_FINDTARGET, load_unit_settings(), m_id, Turret::m_id, Turret::m_maxs, Turret::m_mins, Turret::m_name, max_health, move_movetype, MOVETYPE_NOCLIP, MUTATOR_CALLHOOK, netname, nextthink, randomvec(), set_movetype(), SetResourceExplicit(), solid, SOLID_BBOX, SOLID_NOT, spawnflags, Turret::spawnflags, takedamage, target, target_select_flags, target_validate_flags, team, teamplay, TFL_AIM_LEAD, TFL_AIM_SHOTTIMECOMPENSATE, TFL_AIM_SPLASH, TFL_AMMO_ENERGY, TFL_AMMO_RECHARGE, TFL_DMG_AIMSHAKE, TFL_DMG_DEATH_NORESPAWN, TFL_DMG_RETALIATE, TFL_DMG_YES, TFL_FIRECHECK_AIMDIST, TFL_FIRECHECK_AMMO_OWN, TFL_FIRECHECK_DEAD, TFL_FIRECHECK_DISTANCES, TFL_FIRECHECK_LOS, TFL_FIRECHECK_REFIRE, TFL_FIRECHECK_TEAMCHECK, TFL_TARGETSELECT_ANGLELIMITS, TFL_TARGETSELECT_LOS, TFL_TARGETSELECT_MISSILES, TFL_TARGETSELECT_PLAYERS, TFL_TARGETSELECT_RANGELIMITS, TFL_TARGETSELECT_TEAMCHECK, TFL_TRACK_PITCH, TFL_TRACK_ROTATE, TFL_TRACKTYPE_STEPMOTOR, time, Turret::tr_precache(), Turret::tr_setup(), track_flags, TSF_SUSPENDED, TSL_NO_RESPAWN, tur_defend, TUR_FLAG_ISTURRET, TUR_FLAG_MEDPROJ, TUR_FLAG_MISSILE, TUR_FLAG_PLAYER, TUR_FLAG_SPLASH, TUR_FLAG_SUPPORT, tur_head, tur_shotorg, turret_count, turret_damage(), turret_findtarget(), turret_firecheck(), turret_flags, turret_heal(), turret_initparams(), turret_link(), turret_reset(), turret_respawn(), turret_tag_fire_update(), turret_targetscore_generic(), turret_targetscore_support(), turret_use(), use, vdist, view_ofs, and weaponentities.
Referenced by spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), spawnfunc(), and spawnfunc().
Definition at line 1217 of file sv_turrets.qc.
References bound(), entity(), floor(), max(), max_shot_distance, and TRY.
Referenced by turret_initialize().
Definition at line 1193 of file sv_turrets.qc.
References EF_NODRAW, entity(), Net_LinkEntity(), nextthink, setthink, time, tur_head, turret_send(), and turret_think().
Referenced by turret_initialize().
| entity turret_projectile | ( | entity | actor, |
| Sound | _snd, | ||
| float | _size, | ||
| float | _health, | ||
| float | _death, | ||
| float | _proj_type, | ||
| float | _cull, | ||
| float | _cli_anim ) |
Definition at line 457 of file sv_turrets.qc.
References ATTEN_NORM, CH_WEAPON_A, CSQCProjectile(), DAMAGE_YES, entity(), FL_NOTARGET, FL_PROJECTILE, g_bot_dodge, g_projectiles, IL_PUSH(), MOVETYPE_FLYMISSILE, normalize(), PROJECTILE_MAKETRIGGER, randomvec(), set_movetype(), SetResourceExplicit(), setthink, settouch, sound, spawn, TC, time, turret_projectile_damage(), turret_projectile_explode(), turret_projectile_touch(), and VOL_BASE.
| void turret_projectile_damage | ( | entity | this, |
| entity | inflictor, | ||
| entity | attacker, | ||
| float | damage, | ||
| int | deathtype, | ||
| .entity | weaponentity, | ||
| vector | hitloc, | ||
| vector | vforce ) |
Definition at line 448 of file sv_turrets.qc.
References entity(), GetResource(), owner, TakeResource(), turret_projectile_explode(), vector, velocity, and W_PrepareExplosionByDamage().
Referenced by turret_projectile().
Definition at line 427 of file sv_turrets.qc.
References DAMAGE_NO, DMG_NOWEP, entity(), func_null(), NULL, owner, RadiusDamage(), realowner, and takedamage.
Referenced by turret_hellion_missile_think(), turret_hk_missile_think(), turret_projectile(), turret_projectile_damage(), and turret_projectile_touch().
Definition at line 442 of file sv_turrets.qc.
References entity(), PROJECTILE_TOUCH, toucher, and turret_projectile_explode().
Referenced by turret_projectile().
Definition at line 1276 of file sv_turrets.qc.
References entity(), and turret_respawn().
Referenced by turret_initialize().
Definition at line 279 of file sv_turrets.qc.
References ammo, avelocity, DAMAGE_AIM, DEAD_NO, deadflag, EF_LOWPRECISION, EF_NODRAW, effects, enemy, entity(), get_turretinfo, idle_aim, m_id, max_health, nextthink, NULL, origin, SendFlags, SetResourceExplicit(), setthink, solid, SOLID_BBOX, takedamage, team, time, TNSF_FULL_UPDATE, Turret::tr_setup(), tur_head, turret_damage(), turret_heal(), turret_think(), and volly_counter.
Referenced by assault_roundstart_use(), MUTATOR_HOOKFUNCTION(), turret_hide(), turret_initialize(), and turret_reset().
Definition at line 838 of file sv_turrets.qc.
References enemy, entity(), NULL, origin, target_select_flags, target_validate_flags, and turret_validate_target().
Referenced by turret_tesla_firecheck(), and turret_think().
Definition at line 328 of file sv_turrets.qc.
References angles, angles_y, anim_start_time, ceil(), entity(), frame, GetResource(), m_id, max_health, MSG_ENTITY, origin, rint(), team, TNSF_ANG, TNSF_ANIM, TNSF_AVEL, TNSF_MOVE, TNSF_SETUP, TNSF_STATUS, tur_head, velocity, WriteByte(), WriteCoord(), WriteHeader, and WriteShort().
Referenced by turret_link().
Definition at line 87 of file sv_turrets.qc.
References bprint(), entity(), FL_PROJECTILE, ftos(), IS_CLIENT, max(), min(), real_origin(), tvt_dist, tvt_thadf, vdist, and vlen().
Referenced by turret_initialize().
Definition at line 69 of file sv_turrets.qc.
References entity(), max(), min(), and tvt_dist.
Referenced by turret_initialize().
Definition at line 1019 of file sv_turrets.qc.
References active, aim_flags, ammo, autocvar_g_turrets_aimidle_delay, autocvar_g_turrets_targetscan_maxdelay, autocvar_g_turrets_targetscan_mindelay, enemy, entity(), frametime, get_turretinfo, lip, m_id, min(), MUTATOR_CALLHOOK, nextthink, NULL, origin, shoot_flags, spawnflags, target_select_time, target_validate_flags, target_validate_time, TFL_AIM_NO, TFL_SHOOT_CUSTOM, TFL_SHOOT_HITALLVALID, TFL_SHOOT_VOLLYALWAYS, TFL_TRACK_NO, time, Turret::tr_think(), track_flags, TSF_NO_AMMO_REGEN, tur_aimpos, turret_aim_generic(), turret_checkfire(), turret_do_updates(), turret_fire(), turret_select_target(), turret_track(), turret_validate_target(), and volly_counter.
Referenced by turret_link(), and turret_respawn().
Definition at line 534 of file sv_turrets.qc.
References active, anglemods(), angles, AnglesTransform_FromAngles(), AnglesTransform_LeftDivide(), AnglesTransform_ToAngles(), bound(), enemy, entity(), frametime, idle_aim, lip, normalize(), NULL, SendFlags, shortangle_vxy(), TFL_TRACK_NO, TFL_TRACK_PITCH, TFL_TRACK_ROTATE, TFL_TRACKTYPE_FLUIDINERTIA, TFL_TRACKTYPE_FLUIDPRECISE, TFL_TRACKTYPE_STEPMOTOR, time, TNSF_ANG, TNSF_AVEL, track_flags, tur_aimpos, tur_head, tur_shotorg, turret_framecounter, vectoangles(), and vector.
Referenced by turret_think().
Definition at line 1181 of file sv_turrets.qc.
References active, ACTIVE_ACTIVE, ACTIVE_NOT, entity(), LOG_TRACE, netname, and team.
Referenced by turret_initialize().
Evaluate a entity for target valitity based on validate_flags NOTE: the caller must check takedamage before calling this, to inline this check.
Definition at line 686 of file sv_turrets.qc.
References angleofs, angleofs3(), checkpvs(), entity(), fabs(), FL_NOTARGET, FL_PROJECTILE, GetResource(), IS_CLIENT, IS_DEAD, IS_VEHICLE, LOG_TRACE, M_ARGV, MUTATOR_CALLHOOK, real_origin(), shortangle_vxy(), TFL_TARGETSELECT_ANGLELIMITS, TFL_TARGETSELECT_LOS, TFL_TARGETSELECT_MISSILES, TFL_TARGETSELECT_MISSILESONLY, TFL_TARGETSELECT_NO, TFL_TARGETSELECT_NOTURRETS, TFL_TARGETSELECT_OWNTEAM, TFL_TARGETSELECT_PLAYERS, TFL_TARGETSELECT_RANGELIMITS, TFL_TARGETSELECT_TEAMCHECK, TFL_TARGETSELECT_VEHICLES, trace_endpos, tvt_dist, tvt_tadv, tvt_thadf, tvt_thadv, vdist, vector, and vlen().
Referenced by turret_firecheck(), turret_hk_addtarget(), turret_select_target(), turret_tesla_firecheck(), turret_think(), and walker_melee_do_dmg().
Definition at line 1201 of file sv_turrets.qc.
References autocvar_g_turrets_reloadcvars, cvar_set(), entity(), g_turrets, get_turretinfo, IL_EACH, load_unit_settings(), nextthink, time, and Turret::tr_think().
Referenced by turret_findtarget().
Definition at line 313 of file sv_turrets.qc.
References anim_start_time, clientframe, entity(), frame, SendFlags, time, and TNSF_ANIM.
Referenced by ewheel_move_enemy(), and walker_setnoanim().
| float clientframe |
Definition at line 312 of file sv_turrets.qc.
Referenced by turrets_setframe().
| float turret_framecounter |
Handles head rotation according to the units .track_type and .track_flags.
Definition at line 533 of file sv_turrets.qc.
Referenced by turret_track().