1
0
Fork 0

Fixed annoying creative on fire bug

This commit is contained in:
Tiger Wang 2014-02-04 23:27:13 +00:00
parent 630507fd5b
commit ea2ce1595f
2 changed files with 20 additions and 0 deletions

View File

@ -1760,6 +1760,23 @@ void cPlayer::UseEquippedItem(void)
void cPlayer::TickBurning(cChunk & a_Chunk)
{
// Don't burn in creative and stop burning in creative if necessary
if (!IsGameModeCreative())
{
super::TickBurning(a_Chunk);
}
else if (IsOnFire())
{
m_TicksLeftBurning = 0;
OnFinishedBurning();
}
}
void cPlayer::HandleFood(void)
{

View File

@ -475,6 +475,9 @@ protected:
/// Filters out damage for creative mode/friendly fire
virtual void DoTakeDamage(TakeDamageInfo & TDI) override;
/** Stops players from burning in creative mode */
virtual void TickBurning(cChunk & a_Chunk) override;
/// Called in each tick to handle food-related processing
void HandleFood(void);