1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 13:50:23 +02:00

Carts: Increase performance overall

This commit is contained in:
SmallJoker
2016-11-26 09:48:24 +01:00
committed by paramat
parent 2effe40dc5
commit 1a6ad498d7
2 changed files with 34 additions and 31 deletions

View File

@ -158,9 +158,9 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
return {x=0, y=0, z=0}
end
function carts:pathfinder(pos_, expected_pos, old_dir, ctrl, pf_switch, railtype)
function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
local pos = vector.round(pos_)
local pf_pos = vector.round(expected_pos)
local pf_pos = vector.round(old_pos)
local pf_dir = vector.new(old_dir)
for i = 1, 3 do