mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +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.
|
// Don't remove live players.
|
||||||
if (actor->player == NULL || actor != actor->player->mo)
|
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. ;)
|
// be friendly to the level statistics. ;)
|
||||||
actor->ClearCounters();
|
actor->ClearCounters();
|
||||||
actor->Destroy ();
|
actor->Destroy ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool P_Thing_Raise(AActor *thing)
|
bool P_Thing_Raise(AActor *thing)
|
||||||
|
|
Loading…
Reference in a new issue