Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename moveresult speed to velocity
  • Loading branch information
SmallJoker authored and nerzhul committed May 5, 2020
1 parent 3ed5619 commit 1b6f40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/lua_api.txt
Expand Up @@ -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,
},
...
}
Expand Down
4 changes: 2 additions & 2 deletions src/script/common/c_content.cpp
Expand Up @@ -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++);
}
Expand Down

0 comments on commit 1b6f40c

Please sign in to comment.