mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Swap name of quick_rotate_45 to quick_rotate
This commit is contained in:
parent
240d6ea211
commit
07841c8963
1 changed files with 3 additions and 4 deletions
|
@ -14,8 +14,7 @@ local THIRTY_SECONDTH_PI = DOUBLE_PI * 0.03125
|
||||||
|
|
||||||
|
|
||||||
--a simple helper function which is too small to move into movement.lua
|
--a simple helper function which is too small to move into movement.lua
|
||||||
--this rotates 11.25 degrees, probably should rename it eventually
|
local quick_rotate = function(self,dtime)
|
||||||
local quick_rotate_45 = function(self,dtime)
|
|
||||||
self.yaw = self.yaw + THIRTY_SECONDTH_PI
|
self.yaw = self.yaw + THIRTY_SECONDTH_PI
|
||||||
if self.yaw > DOUBLE_PI then
|
if self.yaw > DOUBLE_PI then
|
||||||
self.yaw = self.yaw - DOUBLE_PI
|
self.yaw = self.yaw - DOUBLE_PI
|
||||||
|
@ -146,7 +145,7 @@ local land_state_execution = function(self,dtime)
|
||||||
--function)
|
--function)
|
||||||
elseif node_in_front_of == 2 or (self.fear_height ~= 0 and cliff_check(self,dtime)) then
|
elseif node_in_front_of == 2 or (self.fear_height ~= 0 and cliff_check(self,dtime)) then
|
||||||
--turn 45 degrees if so
|
--turn 45 degrees if so
|
||||||
quick_rotate_45(self,dtime)
|
quick_rotate(self,dtime)
|
||||||
--stop the mob so it doesn't fall off
|
--stop the mob so it doesn't fall off
|
||||||
mobs.set_velocity(self,0)
|
mobs.set_velocity(self,0)
|
||||||
end
|
end
|
||||||
|
@ -286,7 +285,7 @@ local swim_state_execution = function(self,dtime)
|
||||||
--do a quick turn to make mob continuously move
|
--do a quick turn to make mob continuously move
|
||||||
--if in a fish tank or something
|
--if in a fish tank or something
|
||||||
if swim_turn_check(self,dtime) then
|
if swim_turn_check(self,dtime) then
|
||||||
quick_rotate_45(self,dtime)
|
quick_rotate(self,dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue