aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-05-04 20:02:33 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2020-05-05 08:37:04 +0200
commit1b6f40c35632ab5a2066822c8b5d4c09d469f49d (patch)
tree9fbfbf0faf9204b38639718f0b1662e419f20b6c
parent3ed5619d9a9e08031a749b8b4f5a3d1bc0e77608 (diff)
downloadminetest-1b6f40c35632ab5a2066822c8b5d4c09d469f49d.tar.gz
minetest-1b6f40c35632ab5a2066822c8b5d4c09d469f49d.tar.bz2
minetest-1b6f40c35632ab5a2066822c8b5d4c09d469f49d.zip
Rename moveresult speed to velocity
-rw-r--r--doc/lua_api.txt4
-rw-r--r--src/script/common/c_content.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 1ffb5c39b..b1099ec59 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -6632,8 +6632,8 @@ Collision info passed to `on_step`:
type = string, -- "node" or "object",
axis = string, -- "x", "y" or "z"
node_pos = vector, -- if type is "node"
- old_speed = vector,
- new_speed = vector,
+ old_velocity = vector,
+ new_velocity = vector,
},
...
}
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 6ff642738..95364000c 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -2046,10 +2046,10 @@ void push_collision_move_result(lua_State *L, const collisionMoveResult &res)
}
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);
- lua_setfield(L, -2, "new_speed");
+ lua_setfield(L, -2, "new_velocity");
lua_rawseti(L, -2, i++);
}