some fixes cursed book still crashes

This commit is contained in:
lustlion 2022-03-10 19:40:23 +01:00
parent e575cb5725
commit ce66ab73d3

View File

@ -28,7 +28,7 @@ function CursedBook:new(x,y)
-- light
o.light_range = 500
o.light = Light:new(o.pos.x,o.pos.y,o.light_range,2,HEX2RGB("#fe00d1"))
o.light = Light:new(o.pos.x,o.pos.y,o.light_range,2,hex2rgb("#fe00d1"))
o:id()
@ -42,7 +42,7 @@ function CursedBook:doLogic()
self.target.y = main_player.pos.y - main_player.target_offset.y
local distance_x = self.target.x - self.pos.x
local distance_y = self.target.y - self.pos.y
local angle = GetAngleFromVector(distance_x,distance_y)
local angle = getAngleFromVector(distance_x,distance_y)
local distance = math.sqrt(distance_x ^ 2 + distance_y ^ 2)
if self.status == 0 then