From 29c6615e50b04447279ba841d020048bb0114b54 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Apr 2008 17:17:46 +0000 Subject: [PATCH] - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. SVN r935 (trunk) --- docs/rh-log.txt | 5 +++++ src/g_shared/a_sharedglobal.h | 2 +- src/g_shared/a_weapons.cpp | 3 +-- src/p_user.cpp | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9471eeea5..f95515766 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +April 24, 2008 (Changes by Graf Zahl) +- Fixed: DFlashFader did some operations in its destructor that had to be moved + to its Destroy method. +- Fixed: Dropped weapons from dying players should not double ammo. + April 23, 2008 (Note to self: xplasma.mid sounds really bad. Find out why.) - Fixed: When note_on() is called and another copy of the same note is diff --git a/src/g_shared/a_sharedglobal.h b/src/g_shared/a_sharedglobal.h index 4c102bcfe..347ba12b7 100644 --- a/src/g_shared/a_sharedglobal.h +++ b/src/g_shared/a_sharedglobal.h @@ -129,7 +129,7 @@ public: DFlashFader (float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2, float time, AActor *who); - ~DFlashFader (); + void Destroy (); void Serialize (FArchive &arc); void Tick (); AActor *WhoFor() { return ForWho; } diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 3f3929573..f6e37b6a1 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -175,8 +175,7 @@ AInventory *AWeapon::CreateCopy (AActor *other) // // A weapon that's tossed out should contain no ammo, so you can't cheat // by dropping it and then picking it back up. -// -//=========================================================================== +//======================= AInventory *AWeapon::CreateTossable () { diff --git a/src/p_user.cpp b/src/p_user.cpp index 280d7f79a..e215277bb 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1109,6 +1109,7 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor) { static_cast(item)->AmmoGive2 = weap->Ammo2->Amount; } + item->ItemFlags |= IF_IGNORESKILL; } } else @@ -1117,11 +1118,13 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor) if (item != NULL) { item->Amount = weap->Ammo1->Amount; + item->ItemFlags |= IF_IGNORESKILL; } item = P_DropItem (this, weap->AmmoType2, -1, 256); if (item != NULL) { item->Amount = weap->Ammo2->Amount; + item->ItemFlags |= IF_IGNORESKILL; } } }