1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Entity damage system WIP; Remove C++ mobs

This commit is contained in:
Perttu Ahola 2012-03-04 21:08:03 +02:00
parent f1cb91cd93
commit e9cdb938fe
14 changed files with 516 additions and 3296 deletions

View file

@ -44,7 +44,7 @@ Some planning
class ServerEnvironment;
struct ItemStack;
class Player;
struct ToolDiggingProperties;
struct ToolCapabilities;
class ServerActiveObject : public ActiveObject
{
@ -133,10 +133,12 @@ public:
virtual bool isStaticAllowed() const
{return true;}
// time_from_last_punch is used for lessening damage if punching fast
virtual void punch(ServerActiveObject *puncher,
// Returns tool wear
virtual int punch(v3f dir,
const ToolCapabilities *toolcap=NULL,
ServerActiveObject *puncher=NULL,
float time_from_last_punch=1000000)
{}
{ return 0; }
virtual void rightClick(ServerActiveObject *clicker)
{}
virtual void setHP(s16 hp)