1
0
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:
sfan5
2025-12-28 15:30:25 +01:00
committed by GitHub
parent f18d122a8e
commit 1dbb3eae32
17 changed files with 69 additions and 85 deletions

View File

@@ -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);