/* mins */ ATTRIB(EWheel, mins, vector, '-32 -32 0');
/* maxs */ ATTRIB(EWheel, maxs, vector, '32 32 48');
/* modelname */ ATTRIB(EWheel, mdl, string, "ewheel-base2.md3");
-/* model */ ATTRIB(EWheel, model, string, strzone(strcat("models/turrets/", this.mdl)));
-/* head_model */ ATTRIB(EWheel, head_model, string, strzone(strcat("models/turrets/", "ewheel-gun1.md3")));
+/* model */ ATTRIB_STRZONE(EWheel, model, string, strcat("models/turrets/", this.mdl));
+/* head_model */ ATTRIB_STRZONE(EWheel, head_model, string, strcat("models/turrets/", "ewheel-gun1.md3"));
/* netname */ ATTRIB(EWheel, netname, string, "ewheel");
/* fullname */ ATTRIB(EWheel, turret_name, string, _("eWheel Turret"));
ATTRIB(EWheel, m_weapon, Weapon, WEP_EWHEEL);
{
self.moveto = self.pathcurrent.origin;
- self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95);
+ self.steerto = steerlib_attract2(self, self.moveto, 0.5, 500, 0.95);
- movelib_move_simple(v_forward, (autocvar_g_turrets_unit_ewheel_speed_fast), 0.4);
+ movelib_move_simple(self, v_forward, (autocvar_g_turrets_unit_ewheel_speed_fast), 0.4);
}
}
if ( self.tur_head.spawnshieldtime < 1 )
{
newframe = ewheel_anim_fwd_fast;
- movelib_move_simple(v_forward, (autocvar_g_turrets_unit_ewheel_speed_fast), 0.4);
+ movelib_move_simple(self, v_forward, (autocvar_g_turrets_unit_ewheel_speed_fast), 0.4);
}
else if (self.tur_head.spawnshieldtime < 2)
{
newframe = ewheel_anim_fwd_slow;
- movelib_move_simple(v_forward, (autocvar_g_turrets_unit_ewheel_speed_slow), 0.4);
+ movelib_move_simple(self, v_forward, (autocvar_g_turrets_unit_ewheel_speed_slow), 0.4);
}
else
{
newframe = ewheel_anim_fwd_slow;
- movelib_move_simple(v_forward, (autocvar_g_turrets_unit_ewheel_speed_slower), 0.4);
+ movelib_move_simple(self, v_forward, (autocvar_g_turrets_unit_ewheel_speed_slower), 0.4);
}
}
else if (self.tur_dist_enemy < self.target_range_optimal * 0.5)
{
newframe = ewheel_anim_bck_slow;
- movelib_move_simple(v_forward * -1, (autocvar_g_turrets_unit_ewheel_speed_slow), 0.4);
+ movelib_move_simple(self, v_forward * -1, (autocvar_g_turrets_unit_ewheel_speed_slow), 0.4);
}
else
{
newframe = ewheel_anim_stop;
- movelib_beak_simple((autocvar_g_turrets_unit_ewheel_speed_stop));
+ movelib_brake_simple(self, (autocvar_g_turrets_unit_ewheel_speed_stop));
}
turrets_setframe(newframe, false);
self.frame = 0;
if (vlen(self.velocity))
- movelib_beak_simple((autocvar_g_turrets_unit_ewheel_speed_stop));
+ movelib_brake_simple(self, (autocvar_g_turrets_unit_ewheel_speed_stop));
}
spawnfunc(turret_ewheel) { if(!turret_initialize(TUR_EWHEEL)) remove(self); }
- METHOD(EWheel, tr_think, void(EWheel thistur))
+ METHOD(EWheel, tr_think, void(EWheel thistur, entity it))
{
SELFPARAM();
float vz;
#endif // SVQC
#ifdef CSQC
-void ewheel_draw()
-{SELFPARAM();
+void ewheel_draw(entity this)
+{
float dt;
dt = time - self.move_time;