|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "common.qh"#include <common/checkextension.qh>#include <client/items/items.qh>#include <common/weapons/_all.qh>Go to the source code of this file.
Macros | |
| #define | CHOOSE_AXIS(axis) |
| #define | WarpZone_Accumulator_Add(acc, wz) |
| #define | WarpZone_Accumulator_AddInverse(acc, wz) |
| #define | WarpZone_Trace_AddTransform(wz) |
| #define | WarpZoneLib_NearestPointOnBox(mi, ma, org) |
| #define CHOOSE_AXIS | ( | axis | ) |
Referenced by WarpZone_TraceBox_ThroughZone().
| #define WarpZone_Accumulator_Add | ( | acc, | |
| wz ) |
Definition at line 23 of file common.qc.
Referenced by WarpZone_RefSys_AddIncrementally().
| #define WarpZone_Accumulator_AddInverse | ( | acc, | |
| wz ) |
Definition at line 32 of file common.qc.
| #define WarpZone_Trace_AddTransform | ( | wz | ) |
Definition at line 178 of file common.qc.
Referenced by WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
| #define WarpZoneLib_NearestPointOnBox | ( | mi, | |
| ma, | |||
| org ) |
Definition at line 561 of file common.qc.
Referenced by _WarpZone_FindRadius_Recurse().
| void _WarpZone_FindRadius_Recurse | ( | vector | org, |
| float | rad, | ||
| vector | org0, | ||
| vector | transform, | ||
| vector | shift ) |
| org | blast origin of current search |
| org0 | original blast origin |
| transform | how to untransform (victim to blast system) |
Definition at line 605 of file common.qc.
References _WarpZone_FindRadius_goodents_first, _WarpZone_FindRadius_nomonsters, entity(), FOREACH_ENTITY_RADIUS, if(), MOVE_NOTHING, NULL, org, trace_fraction, vector, vlen2, WarpZone_FindRadius_Hit_BAD, WarpZone_FindRadius_Hit_GOOD, and WarpZoneLib_NearestPointOnBox.
Referenced by WarpZone_SearchInRadius().
| ACCUMULATE void ONREMOVE | ( | entity | this | ) |
Definition at line 731 of file common.qc.
References entity(), and WarpZone_refsys.
Callback function for WarpZone_TraceBox_ThroughZone, for use with te_csqc_* functions.
Must set te_csqc_trace_callback_func first
Definition at line 455 of file common.qc.
References te_csqc_trace_callback_func(), and vector.
Definition at line 25 of file common.qc.
References AnglesTransform_Invert(), AnglesTransform_PrePostShift_GetPostShift(), entity(), vector, and WarpZone_Accumulator_AddTransform().
Referenced by WarpZone_RefSys_AddIncrementally(), and WarpZone_RefSys_AddInverseTransform().
Definition at line 16 of file common.qc.
References AnglesTransform_Multiply(), AnglesTransform_Multiply_GetPostShift(), entity(), and vector.
Referenced by WarpZone_Accumulator_AddInverseTransform(), and WarpZone_RefSys_AddTransform().
Definition at line 11 of file common.qc.
References entity().
Referenced by WarpZone_RefSys_CheckCreate(), WarpZone_SearchInRadius(), and WarpZone_Trace_InitTransform().
Definition at line 72 of file common.qc.
References ang, entity(), makevectors, maxs, mins, org, origin, trace_endpos, vdist, vector, warpzone_angles, warpzone_fadeend, warpzone_fadestart, and warpzone_origin.
Referenced by WarpZone_Camera_SetUp().
Definition at line 85 of file common.qc.
References entity(), setcamera_transform, vector, and WarpZone_Camera_camera_transform().
Referenced by NET_HANDLE(), WarpZoneCamera_InitStep_FindTarget(), and WarpZoneCamera_Think().
Definition at line 35 of file common.qc.
References ang, entity(), maxs, mins, MOVE_NOMONSTERS, NULL, org, origin, v_forward, v_right, v_up, vdist, vector, warpzone_fadeend, warpzone_fadestart, warpzone_targetorigin, WarpZone_TransformOrigin(), and WarpZone_TransformVelocity().
Referenced by WarpZone_SetUp().
Definition at line 152 of file common.qc.
References entity(), g_warpzones, IL_EACH, NULL, vector, warpzone_warpzones_exist, and WarpZoneLib_BoxTouchesBrush().
Referenced by WarpZone_FixNearClip(), WarpZone_FixPMove(), WarpZone_FixView(), WarpZone_StartFrame(), WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
| void WarpZone_MakeAllOther | ( | ) |
Definition at line 166 of file common.qc.
References g_warpzones, IL_EACH, SOLID_TRIGGER, and warpzone_warpzones_exist.
Referenced by WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
| void WarpZone_MakeAllSolid | ( | ) |
Definition at line 160 of file common.qc.
References g_warpzones, IL_EACH, SOLID_BSP, and warpzone_warpzones_exist.
Referenced by WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
Definition at line 478 of file common.qc.
References entity(), and vector.
Referenced by WarpZone_FixNearClip(), WarpZone_StartFrame(), and WarpZone_Touch().
Definition at line 768 of file common.qc.
References entity(), WarpZone_Accumulator_Add, and WarpZone_Accumulator_AddInverseTransform().
Referenced by GrapplingHookThink().
Definition at line 759 of file common.qc.
References entity(), vector, WarpZone_Accumulator_AddInverseTransform(), and WarpZone_RefSys_CheckCreate().
Definition at line 752 of file common.qc.
References entity(), vector, WarpZone_Accumulator_AddTransform(), and WarpZone_RefSys_CheckCreate().
Definition at line 779 of file common.qc.
References entity().
Referenced by GrapplingHookTouch().
Definition at line 737 of file common.qc.
References entity(), and WarpZone_Accumulator_Clear().
Referenced by WarpZone_RefSys_AddInverseTransform(), WarpZone_RefSys_AddTransform(), and WarpZone_RefSys_Copy().
Definition at line 745 of file common.qc.
References entity(), and NULL.
Referenced by MUTATOR_HOOKFUNCTION(), and WarpZone_RefSys_Copy().
Copies the warpzone reference of from onto me.
In other words, makes it be "on the same side of the warpzones"
Definition at line 824 of file common.qc.
References entity(), WarpZone_RefSys_CheckCreate(), and WarpZone_RefSys_Clear().
Referenced by ctf_Handle_Throw(), FireGrapplingHook(), M_Mage_Attack_Spike(), Monster_Enemy_Check(), MUTATOR_HOOKFUNCTION(), spawn_held_nade(), W_Crylink_Attack(), W_Crylink_Attack2(), W_Devastator_Attack(), W_Fireball_Attack1(), W_Fireball_Attack2(), W_MineLayer_Attack(), W_Seeker_Fire_Missile(), W_Seeker_Fire_Tag(), W_Seeker_Tag_Touch(), and WarpZone_RefSys_SpawnSameRefSys().
Spawns an entity in the same warpzone reference as me, and sets up its reference.
Used when you need to spawn en entity, set up the reference system, and you know you're setting its origin "on the same side of the warpzones" as me
Definition at line 838 of file common.qc.
References entity(), spawn, and WarpZone_RefSys_Copy().
Transform angle ang in from's reference into to's reference.
Definition at line 805 of file common.qc.
References ang, entity(), vector, WarpZone_TransformAngles(), and WarpZone_UnTransformAngles().
Referenced by nade_translocate_boom().
Transform origin org in from's reference into to's reference.
E.g., WarpZone_RefSys_TransformOrigin(receiver, flag, receiver.origin + receiver.view_ofs): Returns receiver's view origin as seen by flag
Definition at line 787 of file common.qc.
References entity(), org, vector, WarpZone_TransformOrigin(), and WarpZone_UnTransformOrigin().
Referenced by ctf_FlagThink(), ctf_Handle_Throw(), GrapplingHookThink(), Monster_Enemy_Check(), Monster_Move_Target(), MUTATOR_HOOKFUNCTION(), W_Crylink_LinkJoin(), W_Devastator_RemoteExplode(), W_Devastator_Think(), W_Fireball_Explode(), W_Fireball_Firemine_Think(), W_Nexball_Think(), and W_SeekOutEnemy().
Transform v_angle ang in from's reference into to's reference.
Definition at line 814 of file common.qc.
References ang, entity(), vector, WarpZone_TransformVAngles(), and WarpZone_UnTransformVAngles().
Transform velocity vel in from's reference into to's reference.
Definition at line 796 of file common.qc.
References entity(), vector, WarpZone_TransformVelocity(), and WarpZone_UnTransformVelocity().
Referenced by GrapplingHookThink(), nade_translocate_boom(), W_Crylink_LinkJoin(), and W_Devastator_Think().
| entity WarpZone_SearchInRadius | ( | vector | org, |
| float | radius, | ||
| float | nomonsters, | ||
| WarpZone_FindRadius_cond_callback_t | cb ) |
Modified findradius aware of warpzones, that only includes entities that meet the "cb" criteria.
Most useful if lineofsight, when searching with very specific criteria, or over a range likely to contain many entities.
Definition at line 680 of file common.qc.
References _WarpZone_FindRadius_badents_first, _WarpZone_FindRadius_cond_cb, _WarpZone_FindRadius_goodents_first, _WarpZone_FindRadius_nomonsters, _WarpZone_FindRadius_Recurse(), boxesoverlap(), chain, entity(), FOREACH_ENTITY_RADIUS, FOREACH_LIST, g_warpzones, IL_EACH, MOVE_NOTHING, NearestPointOnBoundingBox(), NULL, org, trace_fraction, vec3, vector, WarpZone_Accumulator_Clear(), WarpZone_FindRadius_Hit_UNSEEN, WarpZone_findradius_next, warpzone_warpzones_exist, and WarpZoneLib_BadEntity().
Referenced by M_Golem_Attack_Lightning_Explode(), M_Mage_Defend_Heal(), M_Spider_Attack_Web_Explode(), M_Wyvern_Attack_Fireball_Explode(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_darkness_think(), nade_ice_think(), PlayerFrame(), PlayerUseKey(), RadiusDamageForSource(), setItemGroup(), turret_tesla_toast(), W_Crylink_Touch_WouldHitFriendly(), W_Devastator_DoRemoteExplode(), W_Electro_Bolt_Think(), W_Electro_TriggerCombo(), W_Fireball_Explode(), W_LaserPlay(), W_MineLayer_ProximityExplode(), W_MineLayer_RemoteExplode(), W_MineLayer_Think(), and walker_melee_do_dmg().
Definition at line 56 of file common.qc.
References AnglesTransform_PrePostShift_GetPostShift(), AnglesTransform_RightDivide(), AnglesTransform_TurnDirectionFR(), entity(), FIXED_MAKE_VECTORS, setcamera_transform, vector, and WarpZone_camera_transform().
Referenced by NET_HANDLE(), and WarpZone_InitStep_FinalizeTransform().
Definition at line 483 of file common.qc.
References entity(), and vector.
Referenced by WarpZone_Teleport().
| void WarpZone_Trace_InitTransform | ( | ) |
Definition at line 172 of file common.qc.
References new_pure, WarpZone_Accumulator_Clear(), and WarpZone_trace_transform.
Referenced by WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
| void WarpZone_TraceBox_ThroughZone | ( | vector | org, |
| vector | mi, | ||
| vector | ma, | ||
| vector | end, | ||
| float | nomonsters, | ||
| entity | forent, | ||
| entity | zone, | ||
| WarpZone_trace_callback_t | cb ) |
Traces a box from org to end, shifting & transforming each time it goes through a warpzone.
Hence it only ends at end if it didn't hit something along the way AND it went through no warpzones
Definition at line 183 of file common.qc.
References BITCLR_ASSIGN, BITSET_ASSIGN, boxesoverlap(), CHOOSE_AXIS, DPCONTENTS_SOLID, entity(), g_warpzones, IL_EACH, LABEL, LOG_TRACE, MOVE_NOMONSTERS, MOVE_NOTHING, MOVE_WORLDONLY, normalize(), NULL, org, trace_dphitcontents, trace_endpos, trace_ent, trace_fraction, trace_startsolid, v_forward, v_right, v_up, vector, WarpZone_Find(), WarpZone_MakeAllOther(), WarpZone_MakeAllSolid(), WarpZone_Trace_AddTransform, WarpZone_trace_firstzone, WarpZone_trace_forent, WarpZone_Trace_InitTransform(), WarpZone_trace_lastzone, WarpZone_TransformOrigin(), warpzone_warpzones_exist, x, y, and z.
Referenced by tracebox_antilag_force_wz().
| void WarpZone_TraceToss_ThroughZone | ( | entity | e, |
| entity | forent, | ||
| entity | zone, | ||
| WarpZone_trace_callback_t | cb ) |
Traces tossing e, shifting & transforming each time it goes through a warpzone.
Definition at line 334 of file common.qc.
References entity(), LABEL, LOG_TRACE, NULL, org, PHYS_GRAVITY, sqrt(), trace_endpos, trace_ent, trace_fraction, v_forward, v_right, v_up, vector, vlen2, WarpZone_Find(), WarpZone_MakeAllOther(), WarpZone_MakeAllSolid(), WarpZone_Trace_AddTransform, WarpZone_trace_firstzone, WarpZone_trace_forent, WarpZone_Trace_InitTransform(), WarpZone_trace_lastzone, WarpZone_tracetoss_time, WarpZone_tracetoss_velocity, WarpZone_TransformOrigin(), WarpZone_TransformVelocity(), and warpzone_warpzones_exist.
Definition at line 446 of file common.qc.
References entity(), MOVE_NOMONSTERS, NULL, org, vector, WarpZone_TraceLine_ThroughZone, WarpZone_TrailParticles_trace_callback(), WarpZone_TrailParticles_trace_callback_eff, and WarpZone_TrailParticles_trace_callback_own.
Referenced by CheatCommand(), and ctf_Handle_Throw().
Definition at line 441 of file common.qc.
References vector, WarpZone_TrailParticles_trace_callback_eff, and WarpZone_TrailParticles_trace_callback_own.
Referenced by WarpZone_TrailParticles().
| void WarpZone_TrailParticles_WithMultiplier | ( | entity | own, |
| float | eff, | ||
| vector | org, | ||
| vector | end, | ||
| float | f, | ||
| int | boxflags ) |
Definition at line 468 of file common.qc.
References entity(), MOVE_NOMONSTERS, NULL, org, PARTICLES_DRAWASTRAIL, vector, WarpZone_TraceLine_ThroughZone, WarpZone_TrailParticles_trace_callback_eff, WarpZone_TrailParticles_trace_callback_f, WarpZone_TrailParticles_trace_callback_flags, WarpZone_TrailParticles_trace_callback_own, and WarpZone_TrailParticles_WithMultiplier_trace_callback().
Referenced by CSQCModel_Effects_Apply(), NET_HANDLE(), NET_HANDLE(), and NET_HANDLE().
| void WarpZone_TrailParticles_WithMultiplier_trace_callback | ( | vector | from, |
| vector | endpos, | ||
| vector | to ) |
Definition at line 463 of file common.qc.
References vector, WarpZone_TrailParticles_trace_callback_eff, WarpZone_TrailParticles_trace_callback_f, WarpZone_TrailParticles_trace_callback_flags, and WarpZone_TrailParticles_trace_callback_own.
Referenced by WarpZone_TrailParticles_WithMultiplier().
Transforms angle v across warpzone wz.
Definition at line 500 of file common.qc.
References ang, AnglesTransform_ApplyToAngles(), entity(), and vector.
Referenced by WarpZone_RefSys_TransformAngles(), and WarpZone_Teleport().
Transforms origin org across warpzone wz.
For example, this'd give you the origin a projectile will have after it crosses the warpzone
Definition at line 489 of file common.qc.
References AnglesTransform_Apply(), entity(), org, and vector.
Referenced by CheatCommand(), Draw_ArcBeam(), Draw_ArcBeam_callback(), Draw_GrapplingHook(), Draw_GrapplingHook_trace_callback(), Draw_VaporizerBeam_trace_callback(), fireBullet_falloff(), W_Arc_Beam_Think(), W_Fireball_Explode(), W_OverkillRocketPropelledChainsaw_Think(), WarpZone_camera_transform(), WarpZone_FixPMove(), WarpZone_FixView(), WarpZone_RefSys_TransformOrigin(), WarpZone_Teleport(), WarpZone_TraceBox_ThroughZone(), and WarpZone_TraceToss_ThroughZone().
Transforms v_angle ang across warpzone wz.
Definition at line 505 of file common.qc.
References ang, AnglesTransform_ApplyToVAngles(), AnglesTransform_CancelRoll(), AnglesTransform_Normalize(), entity(), and vector.
Referenced by NET_HANDLE(), sandbox_ObjectSpawn(), View_EventChase(), WarpZone_FixPMove(), WarpZone_FixView(), WarpZone_PlayerPhysics_FixVAngle(), WarpZone_RefSys_TransformVAngles(), and WarpZone_Teleport().
Transforms velocity v across warpzone wz.
For example, this can give you the updated v_forward after crossing the warpzone
Definition at line 495 of file common.qc.
References AnglesTransform_Apply(), entity(), and vector.
Referenced by Draw_ArcBeam(), fireBullet_falloff(), FireImoBeam(), FireRailgunBullet(), W_Arc_Beam_Think(), W_Shotgun_Melee_Think(), walker_melee_do_dmg(), WarpZone_camera_transform(), WarpZone_RefSys_TransformVelocity(), WarpZone_Teleport(), and WarpZone_TraceToss_ThroughZone().
Transforms angle ang backwards through warpzone wz, as the inverse of WarpZone_TransformAngles.
Definition at line 536 of file common.qc.
References ang, AnglesTransform_ApplyToAngles(), AnglesTransform_Invert(), entity(), and vector.
Referenced by WarpZone_RefSys_TransformAngles().
Transforms origin org backwards through warpzone wz, as the inverse of WarpZone_TransformOrigin.
E.g., WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos): Returns the endpoint of a warpzone-aware trace, as if the trace had never gone through warpzones
Definition at line 526 of file common.qc.
References AnglesTransform_Apply(), AnglesTransform_Invert(), entity(), org, and vector.
Referenced by beam_think(), ctf_CalculatePassVelocity(), Draw_ArcBeam(), Draw_ArcBeam_callback(), fireBullet_falloff(), FireImoBeam(), FireRailgunBullet(), M_Golem_Attack_Lightning_Explode(), MUTATOR_HOOKFUNCTION(), PlayerUseKey(), RadiusDamageForSource(), sandbox_ObjectEdit_Get(), SendCSQCVaporizerBeamParticle(), SendCSQCVortexBeamParticle(), turret_tesla_toast(), W_Arc_Beam_Think(), W_LaserPlay(), W_SeekOutEnemy(), W_SetupShot_Dir_ProjectileSize_Range(), W_Vaporizer_Attack(), W_Vortex_Attack(), and WarpZone_RefSys_TransformOrigin().
Transforms v_angle ang backwards through warpzone wz, as the inverse of WarpZone_TransformVAngles.
Definition at line 541 of file common.qc.
References ang, AnglesTransform_ApplyToVAngles(), AnglesTransform_CancelRoll(), AnglesTransform_Invert(), AnglesTransform_Normalize(), entity(), and vector.
Referenced by WarpZone_RefSys_TransformVAngles().
Transforms angle vel backwards through warpzone wz, as the inverse of WarpZone_TransformVelocity.
Definition at line 531 of file common.qc.
References AnglesTransform_Apply(), AnglesTransform_Invert(), entity(), and vector.
Referenced by WarpZone_RefSys_TransformVelocity().
| bool WarpZoneLib_BadEntity | ( | entity | e, |
| WarpZone_FindRadius_cond_callback_t | cb ) |
Blacklist of entities that WarpZone_FindRadius doesn't care about.
Definition at line 568 of file common.qc.
References entity(), is_pure, startsWith, WarpZone_FindRadius_Hit_BAD, and WarpZone_FindRadius_Hit_UNSEEN.
Referenced by WarpZone_SearchInRadius().
Definition at line 120 of file common.qc.
References entity(), Q3COMPAT_COMMON, SOLID_BSP, vector, WarpZoneLib_BoxTouchesBrush_Recurse(), and world.
Referenced by havocbot_moveto(), Teleport_Find(), WarpZone_Find(), and WarpZoneLib_ExactTrigger_Touch().
Definition at line 92 of file common.qc.
References entity(), LOG_TRACE, MOVE_NOMONSTERS, SOLID_NOT, trace_ent, trace_networkentity, vector, and WarpZoneLib_BoxTouchesBrush_Recurse().
Referenced by WarpZoneLib_BoxTouchesBrush(), and WarpZoneLib_BoxTouchesBrush_Recurse().
Definition at line 845 of file common.qc.
References absmax, absmin, boxesoverlap(), entity(), Q3COMPAT_COMMON, toucher, vector, and WarpZoneLib_BoxTouchesBrush().
Referenced by conveyor_think(), func_ladder_think(), SV_PlayerPhysics(), swamp_think(), viewloc_think(), and WarpZone_StartFrame().
Definition at line 875 of file common.qc.
References entity(), eX, eY, eZ, MOVE_WORLDONLY, trace_startsolid, vector, and WarpZoneLib_MoveOutOfSolid_Expand().
Referenced by CheckEngineExtensions(), and WarpZone_Teleport().
Definition at line 864 of file common.qc.
References entity(), MOVE_WORLDONLY, trace_fraction, trace_startsolid, and vector.
Referenced by WarpZoneLib_MoveOutOfSolid().
| entity _WarpZone_FindRadius_badents_first |
Definition at line 601 of file common.qc.
Referenced by WarpZone_SearchInRadius().
| var WarpZone_FindRadius_cond_callback_t _WarpZone_FindRadius_cond_cb |
Definition at line 603 of file common.qc.
Referenced by WarpZone_SearchInRadius().
| entity _WarpZone_FindRadius_goodents_first |
Definition at line 600 of file common.qc.
Referenced by _WarpZone_FindRadius_Recurse(), and WarpZone_SearchInRadius().
| float _WarpZone_FindRadius_nomonsters |
Definition at line 602 of file common.qc.
Referenced by _WarpZone_FindRadius_Recurse(), and WarpZone_SearchInRadius().
| const int WarpZone_FindRadius_Hit_BAD = 2 |
Definition at line 566 of file common.qc.
Referenced by _WarpZone_FindRadius_Recurse(), and WarpZoneLib_BadEntity().
| const int WarpZone_FindRadius_Hit_GOOD = 1 |
Definition at line 565 of file common.qc.
Referenced by _WarpZone_FindRadius_Recurse().
| const int WarpZone_FindRadius_Hit_UNSEEN = 0 |
Definition at line 564 of file common.qc.
Referenced by WarpZone_SearchInRadius(), and WarpZoneLib_BadEntity().
| entity WarpZone_findradius_next |
Definition at line 604 of file common.qc.
Referenced by WarpZone_SearchInRadius().
| entity WarpZone_refsys |
Definition at line 727 of file common.qc.
Referenced by ONREMOVE().
| float WarpZone_TrailParticles_trace_callback_eff |
Definition at line 440 of file common.qc.
Referenced by WarpZone_TrailParticles(), WarpZone_TrailParticles_trace_callback(), WarpZone_TrailParticles_WithMultiplier(), and WarpZone_TrailParticles_WithMultiplier_trace_callback().
| float WarpZone_TrailParticles_trace_callback_f |
Definition at line 461 of file common.qc.
Referenced by WarpZone_TrailParticles_WithMultiplier(), and WarpZone_TrailParticles_WithMultiplier_trace_callback().
| float WarpZone_TrailParticles_trace_callback_flags |
Definition at line 462 of file common.qc.
Referenced by WarpZone_TrailParticles_WithMultiplier(), and WarpZone_TrailParticles_WithMultiplier_trace_callback().
| entity WarpZone_TrailParticles_trace_callback_own |
Definition at line 439 of file common.qc.
Referenced by WarpZone_TrailParticles(), WarpZone_TrailParticles_trace_callback(), WarpZone_TrailParticles_WithMultiplier(), and WarpZone_TrailParticles_WithMultiplier_trace_callback().