From bb1b825f2440144d5af349c843f0abb01fdab2b5 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Thu, 8 Sep 2011 00:55:47 +0000 Subject: [PATCH] - Backported kgsws's weapon dropitem changes from Skulltag. SVN r3289 (trunk) --- src/p_user.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/p_user.cpp b/src/p_user.cpp index df8d88725..84a81d384 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1185,6 +1185,22 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor) { AInventory *item; + // kgDROP - start - modified copy from a_action.cpp + FDropItem *di = weap->GetDropItems(); + + if (di != NULL) + { + while (di != NULL) + { + if (di->Name != NAME_None) + { + const PClass *ti = PClass::FindClass(di->Name); + if (ti) P_DropItem (player->mo, ti, di->amount, di->probability); + } + di = di->Next; + } + } else + // kgDROP - end if (weap->SpawnState != NULL && weap->SpawnState != ::GetDefault()->SpawnState) {