From b5d0c5c357e3d74c1b90b9492cf176f14b1c7f72 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 28 Dec 2014 22:15:12 +0100 Subject: [PATCH] - fixed: When a player drops his inventory, the dropped weapons must be checked for their class to ensure that they are not DehackedPickups which cannot be modified as intended. --- src/p_user.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.cpp b/src/p_user.cpp index bf656d2b9..e91766cf0 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1365,7 +1365,7 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor, int dmgflags) weap->SpawnState != ::GetDefault()->SpawnState) { item = P_DropItem (this, weap->GetClass(), -1, 256); - if (item != NULL) + if (item != NULL && item->IsKindOf(RUNTIME_CLASS(AWeapon))) { if (weap->AmmoGive1 && weap->Ammo1) {