From 4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 13 Feb 2012 21:47:03 +0000 Subject: Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cPawn.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'source/cPawn.h') diff --git a/source/cPawn.h b/source/cPawn.h index a5156cec3..b35350392 100644 --- a/source/cPawn.h +++ b/source/cPawn.h @@ -1,6 +1,11 @@ + #pragma once + #include "cEntity.h" -#include "math.h" + + + + struct TakeDamageInfo //tolua_export { //tolua_export @@ -8,6 +13,10 @@ struct TakeDamageInfo //tolua_export cEntity* Instigator; //tolua_export }; //tolua_export + + + + class cPawn : public cEntity //tolua_export { //tolua_export public: @@ -19,7 +28,7 @@ public: virtual void TeleportTo( cEntity* a_Entity ); //tolua_export virtual void TeleportTo( const double & a_PosX, const double & a_PosY, const double & a_PosZ ); //tolua_export - virtual void Tick(float a_Dt); + virtual void Tick(float a_Dt) override; void Heal( int a_Health ); //tolua_export virtual void TakeDamage( int a_Damage, cEntity* a_Instigator ); //tolua_export @@ -39,8 +48,8 @@ public: virtual short GetMaxHealth() { return m_MaxHealth; } //virtual void SetMaxFood(short a_MaxFood); - virtual short GetMaxFood() { return m_MaxFoodLevel/6; } - virtual short GetFood() { return m_FoodLevel/6; } + virtual short GetMaxFood() { return m_MaxFoodLevel / 6; } + virtual short GetFood() { return m_FoodLevel / 6; } //virtual void SetMaxFoodSaturation(float a_MaxFoodSaturation); virtual float GetMaxFoodSaturation() { return fmod(m_MaxFoodLevel, 6.f); } @@ -50,6 +59,7 @@ public: virtual short GetMaxFoodLevel() { return m_MaxFoodLevel; } protected: + short m_Health; short m_FoodLevel; short m_MaxHealth; @@ -57,7 +67,7 @@ protected: bool m_bBurnable; - MetaData m_MetaData; + MetaData m_MetaData; double m_LastPosX, m_LastPosY, m_LastPosZ; float m_TimeLastTeleportPacket; @@ -66,3 +76,7 @@ protected: float m_BurnPeriod; }; //tolua_export + + + + -- cgit v1.2.3