mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-31 18:35:20 +01:00
Clarify that punch toolcaps are not optional (#16720)
This commit is contained in:
@@ -247,7 +247,7 @@ void ScriptApiEntity::luaentity_Step(u16 id, float dtime,
|
||||
// tool_capabilities, direction, damage)
|
||||
bool ScriptApiEntity::luaentity_Punch(u16 id,
|
||||
ServerActiveObject *puncher, float time_from_last_punch,
|
||||
const ToolCapabilities *toolcap, v3f dir, s32 damage)
|
||||
const ToolCapabilities &toolcap, v3f dir, s32 damage)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
|
||||
@@ -270,7 +270,7 @@ bool ScriptApiEntity::luaentity_Punch(u16 id,
|
||||
else
|
||||
lua_pushnil(L);
|
||||
lua_pushnumber(L, time_from_last_punch);
|
||||
push_tool_capabilities(L, *toolcap);
|
||||
push_tool_capabilities(L, toolcap);
|
||||
push_v3f(L, dir);
|
||||
lua_pushnumber(L, damage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user