Rename moveresult speed to velocity
authorSmallJoker <mk939@ymail.com>
Mon, 4 May 2020 18:02:33 +0000 (20:02 +0200)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Tue, 5 May 2020 06:37:04 +0000 (08:37 +0200)
doc/lua_api.txt
src/script/common/c_content.cpp

index 1ffb5c39b7109d876211c82fc3294837ff3b42fe..b1099ec590c06161fa5b405af5d2f76252487491 100644 (file)
@@ -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,
             },
             ...
         }
index 6ff6427385b90be3395ae9b1bbf88c045e481108..95364000cf6c1e2f79525a4cecac84d57812d767 100644 (file)
@@ -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++);
        }