X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fsv_turrets.qh;h=c5a3728d134cf20b1e2f068dc803ff943b647cad;hb=ecad7afa97f7b4c68c46e3337fcabe51987cf2f4;hp=1d492e8164a057cf17f799ef58a773f532461803;hpb=74cebbb48d9481bb83eccb4438283f319352cb74;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/sv_turrets.qh b/qcsrc/common/turrets/sv_turrets.qh index 1d492e816..c5a3728d1 100644 --- a/qcsrc/common/turrets/sv_turrets.qh +++ b/qcsrc/common/turrets/sv_turrets.qh @@ -1,11 +1,10 @@ -#ifndef SV_TURRETS_H -#define SV_TURRETS_H +#pragma once -entity turret_projectile(Sound _snd, float _size, float _health, float _death, float _proj_type, float _cull, float _cli_anim); +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); -float turret_firecheck(); -entity turret_select_target(); +bool turret_firecheck(entity this); +entity turret_select_target(entity this); // turret fields .float ticrate; // interal ai think rate @@ -83,16 +82,16 @@ void turret_respawn(entity this); 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(float _frame, float client_only); +void turrets_setframe(entity this, float _frame, float client_only); -float turret_initialize(Turret tur); +bool turret_initialize(entity this, Turret tur); /// 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; @@ -119,5 +118,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