- //fixedmakevectors(self.angles);
- // Not sure why this works better, but it does.
- spider.tur_head.angles_x *= -1;
- spider.angles_x *= -1;
- makevectors(spider.angles);
- spider.tur_head.angles_x *= -1;
- spider.angles_x *= -1;
+
+ // Pitch head
+ ad = vectoangles(normalize(trace_endpos - gettaginfo(spider.tur_head,gettagindex(spider.tur_head,"tag_hud")))) - (spider.tur_head.angles + spider.angles);
+ if(ad_x > 180) ad_x -= 360;
+ if(ad_x < -180) ad_x += 360;
+
+
+ ftmp = autocvar_g_vehicle_spiderbot_head_pitchspeed * sys_frametime;
+ ad_x = bound(ftmp * -1, ad_x, ftmp);
+ spider.tur_head.angles_x = bound(autocvar_g_vehicle_spiderbot_head_pitchlimit_down, spider.tur_head.angles_x + ad_x, autocvar_g_vehicle_spiderbot_head_pitchlimit_up);
+
+
+
+ // Turn Body
+ ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
+ ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);
+
+
+#endif
+ makevectors(spider.angles + '-1 0 0' * spider.angles_x);