mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-03 04:44:24 +07:00
Fixed erratic turret movement
This commit is contained in:
parent
6d0a0a0109
commit
b1263262de
@ -147,8 +147,8 @@ public class Turret extends Block{
|
||||
if(Float.isNaN(entity.rotation)){
|
||||
entity.rotation = 0;
|
||||
}
|
||||
entity.rotation = Mathf.slerp(entity.rotation, targetRot,
|
||||
rotatespeed*Timers.delta());
|
||||
entity.rotation = Mathf.slerpDelta(entity.rotation, targetRot,
|
||||
rotatespeed);
|
||||
|
||||
if(Angles.angleDist(entity.rotation, targetRot) < shootCone && entity.timer.get(timerReload, reload)){
|
||||
if(shootsound != null && entity.timer.get(timerSound, soundReload)) Effects.sound(shootsound, entity);
|
||||
|
Loading…
Reference in New Issue
Block a user