1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Implement on_rightclickplayer callback (#10775)

Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
JDiaz 2021-01-11 18:03:31 +01:00 committed by GitHub
parent fcb3ed840a
commit 08ee9794fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 4 deletions

View file

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