- 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)
This commit is contained in:
Christoph Oelckers 2008-04-24 17:17:46 +00:00
parent 16d18c707a
commit 29c6615e50
4 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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; }

View file

@ -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 ()
{

View file

@ -1109,6 +1109,7 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor)
{
static_cast<AWeapon *>(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;
}
}
}