mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
- Backported kgsws's weapon dropitem changes from Skulltag.
SVN r3289 (trunk)
This commit is contained in:
parent
7714ee3ffd
commit
bb1b825f24
1 changed files with 16 additions and 0 deletions
|
@ -1185,6 +1185,22 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor)
|
||||||
{
|
{
|
||||||
AInventory *item;
|
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 &&
|
if (weap->SpawnState != NULL &&
|
||||||
weap->SpawnState != ::GetDefault<AActor>()->SpawnState)
|
weap->SpawnState != ::GetDefault<AActor>()->SpawnState)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue