Fixed annoying creative on fire bug
This commit is contained in:
parent
630507fd5b
commit
ea2ce1595f
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user