forked from VoxeLibre/VoxeLibre
get rid of unecessary "if true" statement
This commit is contained in:
parent
ef980f2ea0
commit
4a086db4c5
|
@ -336,8 +336,9 @@ end
|
|||
|
||||
local set_yaw = function(self, yaw, delay, dtime)
|
||||
|
||||
|
||||
if self.noyaw then return end
|
||||
if true then
|
||||
|
||||
self._turn_to = yaw
|
||||
--clamp our yaw to a 360 range
|
||||
if math.deg(self.object:get_yaw()) > 360 then
|
||||
|
@ -372,16 +373,14 @@ local set_yaw = function(self, yaw, delay, dtime)
|
|||
end
|
||||
end
|
||||
|
||||
return yaw
|
||||
end
|
||||
|
||||
delay = delay or 0
|
||||
|
||||
yaw = self.object:get_yaw()
|
||||
|
||||
if delay == 0 then
|
||||
if self.shaking and dtime then
|
||||
yaw = yaw + (random() * 2 - 1) * 5 * dtime
|
||||
end
|
||||
self.object:set_yaw(yaw)
|
||||
update_roll(self)
|
||||
return yaw
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue