mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Implement on_rightclickplayer callback (#10775)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
@@ -456,6 +456,11 @@ u16 PlayerSAO::punch(v3f dir,
|
||||
return hitparams.wear;
|
||||
}
|
||||
|
||||
void PlayerSAO::rightClick(ServerActiveObject *clicker)
|
||||
{
|
||||
m_env->getScriptIface()->on_rightclickplayer(this, clicker);
|
||||
}
|
||||
|
||||
void PlayerSAO::setHP(s32 hp, const PlayerHPChangeReason &reason)
|
||||
{
|
||||
if (hp == (s32)m_hp)
|
||||
|
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
u16 punch(v3f dir, const ToolCapabilities *toolcap, ServerActiveObject *puncher,
|
||||
float time_from_last_punch);
|
||||
void rightClick(ServerActiveObject *clicker) {}
|
||||
void rightClick(ServerActiveObject *clicker);
|
||||
void setHP(s32 hp, const PlayerHPChangeReason &reason);
|
||||
void setHPRaw(u16 hp) { m_hp = hp; }
|
||||
s16 readDamage();
|
||||
|
Reference in New Issue
Block a user