mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- fixed: P_RemoveThing must not remove owned inventory items.
This commit is contained in:
parent
3fe8dbf660
commit
978667143c
1 changed files with 4 additions and 0 deletions
|
@ -402,10 +402,14 @@ void P_RemoveThing(AActor * actor)
|
|||
// Don't remove live players.
|
||||
if (actor->player == NULL || actor != actor->player->mo)
|
||||
{
|
||||
// Don't also remove owned inventory items
|
||||
if (actor->IsKindOf(RUNTIME_CLASS(AInventory)) && static_cast<AInventory*>(actor)->Owner == NULL) return;
|
||||
|
||||
// be friendly to the level statistics. ;)
|
||||
actor->ClearCounters();
|
||||
actor->Destroy ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool P_Thing_Raise(AActor *thing)
|
||||
|
|
Loading…
Reference in a new issue