mirror of
				https://github.com/SmallJoker/boost_cart.git
				synced 2025-10-31 05:15:23 +01:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			ae33bd7a68
			...
			rotationte
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 792756c003 | 
| @@ -34,7 +34,9 @@ local cart_entity = { | |||||||
| 	old_switch = 0, | 	old_switch = 0, | ||||||
| 	sound_counter = 0, | 	sound_counter = 0, | ||||||
| 	railtype = nil, | 	railtype = nil, | ||||||
| 	attached_items = {} | 	attached_items = {}, | ||||||
|  | 	automatic_face_movement_dir = -90.0, | ||||||
|  | 	automatic_face_movement_max_rotation_per_sec = 360 * 4, | ||||||
| } | } | ||||||
|  |  | ||||||
| -- Model and textures | -- Model and textures | ||||||
| @@ -341,15 +343,17 @@ function cart_entity:on_step(dtime) | |||||||
| 	-- Re-use "dir", localize self.old_dir | 	-- Re-use "dir", localize self.old_dir | ||||||
| 	dir = self.old_dir | 	dir = self.old_dir | ||||||
|  |  | ||||||
| 	local yaw = 0 | 	if stop_wiggle then | ||||||
| 	if dir.x < 0 then | 		local yaw = 0 | ||||||
| 		yaw = 0.5 | 		if dir.x < 0 then | ||||||
| 	elseif dir.x > 0 then | 			yaw = 0.5 | ||||||
| 		yaw = 1.5 | 		elseif dir.x > 0 then | ||||||
| 	elseif dir.z < 0 then | 			yaw = 1.5 | ||||||
| 		yaw = 1 | 		elseif dir.z < 0 then | ||||||
|  | 			yaw = 1 | ||||||
|  | 		end | ||||||
|  | 		self.object:set_yaw(yaw * math.pi) | ||||||
| 	end | 	end | ||||||
| 	self.object:set_yaw(yaw * math.pi) |  | ||||||
|  |  | ||||||
| 	local anim = {x=0, y=0} | 	local anim = {x=0, y=0} | ||||||
| 	if dir.y == -1 then | 	if dir.y == -1 then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user