1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Properly use time_from_last_punch for limiting PvP punch damage

This commit is contained in:
Perttu Ahola 2011-12-04 14:43:01 +02:00
parent ceaf8edade
commit 4cc117ddf6
5 changed files with 21 additions and 7 deletions

View file

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