33 this.move_time =
time;
71 && dist < 10240 && t != this.
team)
85 ?
"gfx/vehicles/turret_moving"
86 :
"gfx/vehicles/turret_stationary";
93 if (dist > this.maxdistance)
96 string spriteimage = this.
netname;
102 else if (this.maxdistance > 0)
107 this.teamradar_color =
'1 0 1';
108 LOG_INFOF(
"WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
115 if (this.helpme &&
time < this.helpme)
118 txt = sprintf(_(
"%s under attack!"), txt);
125 txt = strtoupper(txt);
147 float edgedistance_min =
min(
209 setorigin(
this, this.
origin);
210 _setmodel(
this, tur.model);
211 _setmodel(this.
tur_head, tur.head_model);
214 setsize(
this, tur.m_mins, tur.m_maxs);
215 setsize(this.
tur_head,
'0 0 0',
'0 0 0');
217 if (this.
m_id == TUR_EWHEEL.m_id)
218 setattachment(this.
tur_head,
this,
"");
220 setattachment(this.
tur_head,
this,
"tag_head");
222 this.
tur_head.classname =
"turret_head";
243 this.teamradar_color =
'1 0.6 0.1';
248 tur.tr_setup(tur,
this);
280 for (
int j = 1; j < 5; ++j)
290 entity gib =
new(turret_gib);
291 setorigin(gib, _from);
292 _setmodel(gib, _model);
293 gib.colormod = _cmod;
297 setsize(gib,
'-1 -1 -1',
'1 1 1');
308 setorigin(gib, _from);
311 gib.move_time =
time;
312 gib.damageforcescale = 1;
324 if (this.
m_id == TUR_EWHEEL.m_id)
326 else if (this.
m_id == TUR_WALKER.m_id)
328 else if (this.
m_id == TUR_TESLA.m_id)
344 headgib.angles = this.
tur_head.angles;
346 headgib.avelocity.y *= 5;
347 headgib.gravity = 0.5;
380 this.
tur_head.angles.x = ReadShort();
381 this.
tur_head.angles.y = ReadShort();
390 this.
tur_head.avelocity.x = ReadShort();
391 this.
tur_head.avelocity.y = ReadShort();
397 setorigin(
this, this.
origin);
400 this.
angles.y = ReadShort();
414 if (_tmp != this.
team)
422 if (_tmp == 0 && myhp != 0)
424 else if (myhp && myhp > _tmp)
426 else if (myhp && myhp < _tmp)
float frame1time
start time of framegroup animation
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void turret_changeteam(entity this)
void turret_gib_draw(entity this)
void turret_die(entity this)
void turret_remove(entity this)
void turret_draw(entity this)
entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, float _explode)
void turret_draw2d(entity this)
void turret_gibboom(entity this)
void turret_construct(entity this, bool isNew)
void turret_head_draw(entity this)
float autocvar_cl_vehicles_crosshair_size
bool autocvar_cl_vehicles_hud_tactical
#define drawpic(position, pic, size, rgb, alpha, flag)
IntrusiveList g_drawables
const float ALPHA_MIN_VISIBLE
IntrusiveList g_drawables_2d
#define setmodel(this, m)
const float DRAWFLAG_NORMAL
const float MOVE_NOMONSTERS
vector drawgetimagesize(string pic)
#define pointparticles(effect, org, vel, howmany)
SetResourceExplicit(ent, RES_ARMOR, ReadByte() *DEC_FACTOR)) ENTCS_PROP(NAME
float autocvar_cl_gibs_ticrate
bool autocvar_cl_gibs_sloppy
float autocvar_cl_gibs_lifetime
float autocvar_hud_panel_fg_alpha
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
noref float vid_conheight
#define NET_HANDLE(id, param)
#define ReadRegistered(r)
#define ReadAngleVector2D()
void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)
void set_movetype(entity this, int mt)
const int MOVETYPE_NOCLIP
const int MOVETYPE_BOUNCE
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
float prandom()
Predictable random number generator (not seeded yet).
#define sound(e, c, s, v, a)
vector Team_ColorRGB(int teamid)
const int TUR_FLAG_MOVE
can move
#define get_turretinfo(i)
vector project_3d_to_2d(vector vec)
vector drawsprite_TextOrIcon(bool is_text, vector o, float ang, float minwidth, vector rgb, float a, vector sz, string str)
void drawhealthbar(vector org, float rot, float h, vector sz, vector hotspot, float width, float theheight, float margin, float border, float align, vector rgb, float a, vector hrgb, float ha, float f)
vector drawspritearrow(vector o, float ang, vector rgb, float a, float t)
string spritelookuptext(entity this, string s)
vector spritelookupcolor(entity this, string s, vector def)
vector fixrgbexcess(vector rgb)
float spritelookupblinkvalue(entity this, string s)
const float SPRITE_HEALTHBAR_HEIGHT
float waypointsprite_alpha
bool autocvar_g_waypointsprite_uppercase
bool autocvar_g_waypointsprite_turrets_text
float waypointsprite_edgeoffset_left
float waypointsprite_scale
float waypointsprite_distancefadedistance
float waypointsprite_edgeoffset_top
float waypointsprite_distancealphaexponent
float waypointsprite_crosshairfadescale
const float SPRITE_HELPME_BLINK
float waypointsprite_normdistance
float waypointsprite_edgefadescale
float waypointsprite_edgeoffset_right
float waypointsprite_crosshairfadealpha
float waypointsprite_fadedistance
float waypointsprite_edgefadedistance
const float SPRITE_ARROW_SCALE
float waypointsprite_crosshairfadedistance
bool autocvar_cl_hidewaypoints
bool autocvar_g_waypointsprite_turrets_onlyhurt
float autocvar_g_waypointsprite_turrets_maxdist
const float SPRITE_HEALTHBAR_HEALTHALPHA
const float SPRITE_HEALTHBAR_BORDERALPHA
float waypointsprite_edgefadealpha
const float SPRITE_HEALTHBAR_WIDTH
const float SPRITE_HEALTHBAR_BORDER
float waypointsprite_distancefadealpha
bool autocvar_g_waypointsprite_turrets
float waypointsprite_distancefadescale
const float SPRITE_HEALTHBAR_MARGIN
float waypointsprite_fontsize
float waypointsprite_minalpha
float waypointsprite_edgeoffset_bottom