Skip to content

Commit 1b6f40c

Browse files
SmallJokernerzhul
authored andcommittedMay 5, 2020
Rename moveresult speed to velocity
1 parent 3ed5619 commit 1b6f40c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

Diff for: ‎doc/lua_api.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6632,8 +6632,8 @@ Collision info passed to `on_step`:
66326632
type = string, -- "node" or "object",
66336633
axis = string, -- "x", "y" or "z"
66346634
node_pos = vector, -- if type is "node"
6635-
old_speed = vector,
6636-
new_speed = vector,
6635+
old_velocity = vector,
6636+
new_velocity = vector,
66376637
},
66386638
...
66396639
}

Diff for: ‎src/script/common/c_content.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2046,10 +2046,10 @@ void push_collision_move_result(lua_State *L, const collisionMoveResult &res)
20462046
}
20472047

20482048
push_v3f(L, c.old_speed / BS);
2049-
lua_setfield(L, -2, "old_speed");
2049+
lua_setfield(L, -2, "old_velocity");
20502050

20512051
push_v3f(L, c.new_speed / BS);
2052-
lua_setfield(L, -2, "new_speed");
2052+
lua_setfield(L, -2, "new_velocity");
20532053

20542054
lua_rawseti(L, -2, i++);
20552055
}

0 commit comments

Comments
 (0)