Do not call DoEffect when predicting player movement.

This commit is contained in:
Christoph Oelckers 2017-09-02 07:57:03 +02:00
parent f96f71044f
commit 12ad7ee933

View file

@ -4113,10 +4113,13 @@ void AActor::Tick ()
} }
else else
{ {
AInventory * item = Inventory;
if (!player || !(player->cheats & CF_PREDICTING))
{
// Handle powerup effects here so that the order is controlled // Handle powerup effects here so that the order is controlled
// by the order in the inventory, not the order in the thinker table // by the order in the inventory, not the order in the thinker table
AInventory *item = Inventory;
while (item != NULL && item->Owner == this) while (item != NULL && item->Owner == this)
{ {
IFVIRTUALPTR(item, AInventory, DoEffect) IFVIRTUALPTR(item, AInventory, DoEffect)
@ -4126,6 +4129,7 @@ void AActor::Tick ()
} }
item = item->Inventory; item = item->Inventory;
} }
}
if (flags & MF_UNMORPHED) if (flags & MF_UNMORPHED)
{ {