1
0

Made comments more readable by adding space between // and text content. Added /// doxygen syntax comments to declarations

This commit is contained in:
James Ravenscroft 2013-08-08 11:01:45 +01:00
parent 9a6442a206
commit 864bdd2626
2 changed files with 9 additions and 9 deletions

View File

@ -1322,8 +1322,8 @@ void cPlayer::UseEquippedItem()
void cPlayer::HandleAir(cChunk & a_Chunk) void cPlayer::HandleAir(cChunk & a_Chunk)
{ {
//Ref.: http://www.minecraftwiki.net/wiki/Chunk_format // Ref.: http://www.minecraftwiki.net/wiki/Chunk_format
//see if the player is /submerged/ water (block above is water) // see if the player is /submerged/ water (block above is water)
// Get the type of block the player's standing in: // Get the type of block the player's standing in:
BLOCKTYPE BlockIn; BLOCKTYPE BlockIn;
int RelX = (int)floor(m_LastPosX) - a_Chunk.GetPosX() * cChunkDef::Width; int RelX = (int)floor(m_LastPosX) - a_Chunk.GetPosX() * cChunkDef::Width;
@ -1334,24 +1334,24 @@ void cPlayer::HandleAir(cChunk & a_Chunk)
if (IsBlockWater(BlockIn)) if (IsBlockWater(BlockIn))
{ {
//either reduce air level or damage player // either reduce air level or damage player
if(m_AirLevel < 1) if(m_AirLevel < 1)
{ {
if(m_AirTickTimer < 1) if(m_AirTickTimer < 1)
{ {
//damage player // damage player
TakeDamage(dtDrowning, NULL, 1, 1, 0); TakeDamage(dtDrowning, NULL, 1, 1, 0);
//reset timer // reset timer
m_AirTickTimer = DROWNING_TICKS; m_AirTickTimer = DROWNING_TICKS;
}else{ }else{
m_AirTickTimer -= 1; m_AirTickTimer -= 1;
} }
}else{ }else{
//reduce air supply // reduce air supply
m_AirLevel -= 1; m_AirLevel -= 1;
} }
}else{ }else{
//set the air back to maximum // set the air back to maximum
m_AirLevel = MAX_AIR_LEVEL; m_AirLevel = MAX_AIR_LEVEL;
m_AirTickTimer = DROWNING_TICKS; m_AirTickTimer = DROWNING_TICKS;
} }

View File

@ -271,9 +271,9 @@ protected:
std::string m_PlayerName; std::string m_PlayerName;
std::string m_LoadedWorldName; std::string m_LoadedWorldName;
//Player's air level (for swimming) /// Player's air level (for swimming)
int m_AirLevel; int m_AirLevel;
//used to time ticks between damage taken via drowning/suffocation /// used to time ticks between damage taken via drowning/suffocation
int m_AirTickTimer; int m_AirTickTimer;
bool m_bVisible; bool m_bVisible;