X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fsv_turrets.qh;h=deee313ab109204ce7e1acbba2cb1aaaa6921aac;hb=62d736d8c3a51baf5fa3a4265e39a2b773704a91;hp=8bba1c4a4a6e39ff3fcd11596b3224ec5aace3a9;hpb=785232fc90ed7bd7038c79f65534a7e79efd7f45;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/sv_turrets.qh b/qcsrc/common/turrets/sv_turrets.qh index 8bba1c4a4..deee313ab 100644 --- a/qcsrc/common/turrets/sv_turrets.qh +++ b/qcsrc/common/turrets/sv_turrets.qh @@ -1,9 +1,15 @@ -#ifndef SV_TURRETS_H -#define SV_TURRETS_H +#pragma once + +#include + +entity turret_projectile(entity actor, Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim); +void turret_projectile_explode(entity this); +float turret_validate_target(entity e_turret, entity e_target, float validate_flags); +bool turret_firecheck(entity this); +entity turret_select_target(entity this); // turret fields .float ticrate; // interal ai think rate -.vector aim_idle; // where to aim while idle .entity tur_head; // top part of the turret .entity tur_defend; // defend this entity .vector tur_shotorg; // shot origin @@ -71,25 +77,30 @@ const float TFL_TRACKTYPE_FLUIDINERTIA = 3; // simulated inertia ("wobbly" mode) .float track_accel_rotate; .float track_blendrate; -void() turret_respawn; +void turret_respawn(entity this); /// updates aim org, shot org, shot dir and enemy org for selected turret void turret_do_updates(entity e_turret); .vector tur_shotdir_updated; -.float() turret_firecheckfunc; // TODO: deprecate! +.float(entity this) turret_firecheckfunc; // TODO: deprecate! + +void turrets_setframe(entity this, float _frame, float client_only); -void turrets_setframe(float _frame, float client_only); +bool turret_initialize(entity this, Turret tur); -float turret_initialize(float tur_id); +// returns true when box overlaps with a given location +bool turret_closetotarget(entity this, vector targ); /// Function to use for target evaluation. usualy turret_targetscore_generic .float(entity _turret, entity _target) turret_score_target; -.float(entity e_target,entity e_sender) turret_addtarget; +.bool(entity this, entity e_target,entity e_sender) turret_addtarget; .entity pathcurrent; +.entity pathgoal; + float turret_count; // debugging @@ -113,5 +124,3 @@ vector tvt_tadv; // turret angle diff vector, updated by a successful call to tu float tvt_thadf; // turret head angle diff float, updated by a successful call to turret_validate_target float tvt_tadf; // turret angle diff float, updated by a successful call to turret_validate_target float tvt_dist; // turret distance, updated by a successful call to turret_validate_target - -#endif