mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Properly use time_from_last_punch for limiting PvP punch damage
This commit is contained in:
@@ -74,7 +74,8 @@ public:
|
||||
void rightClick(ServerActiveObject *clicker);
|
||||
void setPos(v3f pos);
|
||||
void moveTo(v3f pos, bool continuous);
|
||||
virtual std::string getDescription(){return getName();}
|
||||
virtual std::string getDescription()
|
||||
{return std::string("player ")+getName();}
|
||||
|
||||
virtual void getWieldDiggingProperties(ToolDiggingProperties *dst);
|
||||
virtual void damageWieldedItem(u16 amount);
|
||||
@@ -93,6 +94,8 @@ public:
|
||||
bool m_hp_not_sent;
|
||||
bool m_respawn_active;
|
||||
bool m_is_in_environment;
|
||||
// Incremented by step(), read and reset by Server
|
||||
float m_time_from_last_punch;
|
||||
|
||||
private:
|
||||
bool m_position_not_sent;
|
||||
|
Reference in New Issue
Block a user