some fixes cursed book still crashes
This commit is contained in:
		
							parent
							
								
									e575cb5725
								
							
						
					
					
						commit
						ce66ab73d3
					
				| @ -28,7 +28,7 @@ function CursedBook:new(x,y) | |||||||
| 
 | 
 | ||||||
| 	-- light | 	-- light | ||||||
| 	o.light_range = 500 | 	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() | 	o:id() | ||||||
| 
 | 
 | ||||||
| @ -42,7 +42,7 @@ function CursedBook:doLogic() | |||||||
| 	self.target.y = main_player.pos.y - main_player.target_offset.y | 	self.target.y = main_player.pos.y - main_player.target_offset.y | ||||||
| 	local distance_x = self.target.x - self.pos.x | 	local distance_x = self.target.x - self.pos.x | ||||||
| 	local distance_y = self.target.y - self.pos.y | 	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) | 	local distance = math.sqrt(distance_x ^ 2 + distance_y ^ 2) | ||||||
| 
 | 
 | ||||||
| 	if self.status == 0 then | 	if self.status == 0 then | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user