diff --git a/source/player/player.cpp b/source/player/player.cpp index 77e569f2e..552ce49a7 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -557,10 +557,12 @@ void CPlayer::thinkHorizontalMovement() int panim=-1; #include "gfx\prim.h" // (pkg) int healthx=100; -int healthy=20; +int healthy=27; int healthw=10; int healthh=10; int healthg=2; +int livesx=162; +int livesy=28; #ifdef __USER_paul__ int mouth=-1,eyes=-1; @@ -613,7 +615,7 @@ if(eyes!=-1) #endif - // Temporary health thing + // Temporary health/lives thing int i,x; x=healthx; for(i=0;i<5;i++) @@ -621,7 +623,6 @@ if(eyes!=-1) POLY_F4 *f4; f4=GetPrimF4(); setXYWH(f4,x,healthy,healthw,healthh); - if(iMAX_HEALTH) + { + s_health=MAX_HEALTH; + } +} - +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayer::addLife() +{ + m_lives++; + if(m_lives>MAX_LIVES) + { + m_lives=MAX_LIVES; + } +} /*---------------------------------------------------------------------- Function: @@ -1064,7 +1100,7 @@ void CPlayer::respawn() setMode(PLAYER_MODE_BASICUNARMED); } - s_health=5; + s_health=MAX_HEALTH; m_invincibleFrameCount=INVIBCIBLE_FRAMES__START; Pos=m_respawnPos; m_moveVel.vx=0; diff --git a/source/player/player.h b/source/player/player.h index f86e4eae0..2ed422499 100644 --- a/source/player/player.h +++ b/source/player/player.h @@ -159,6 +159,14 @@ public: void setMapSize(DVECTOR _mapSize); void setRespawnPos(DVECTOR _respawn) {m_respawnPos=_respawn;} + enum + { + MAX_HEALTH=5, + MAX_LIVES=99, + }; + void addHealth(int _health); + void addLife(); + protected: enum {