mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Rename moveresult speed to velocity
This commit is contained in:
@@ -6632,8 +6632,8 @@ Collision info passed to `on_step`:
|
|||||||
type = string, -- "node" or "object",
|
type = string, -- "node" or "object",
|
||||||
axis = string, -- "x", "y" or "z"
|
axis = string, -- "x", "y" or "z"
|
||||||
node_pos = vector, -- if type is "node"
|
node_pos = vector, -- if type is "node"
|
||||||
old_speed = vector,
|
old_velocity = vector,
|
||||||
new_speed = vector,
|
new_velocity = vector,
|
||||||
},
|
},
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
@@ -2046,10 +2046,10 @@ void push_collision_move_result(lua_State *L, const collisionMoveResult &res)
|
|||||||
}
|
}
|
||||||
|
|
||||||
push_v3f(L, c.old_speed / BS);
|
push_v3f(L, c.old_speed / BS);
|
||||||
lua_setfield(L, -2, "old_speed");
|
lua_setfield(L, -2, "old_velocity");
|
||||||
|
|
||||||
push_v3f(L, c.new_speed / BS);
|
push_v3f(L, c.new_speed / BS);
|
||||||
lua_setfield(L, -2, "new_speed");
|
lua_setfield(L, -2, "new_velocity");
|
||||||
|
|
||||||
lua_rawseti(L, -2, i++);
|
lua_rawseti(L, -2, i++);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user