- 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 April 23, 2008
(Note to self: xplasma.mid sounds really bad. Find out why.) (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 - 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, DFlashFader (float r1, float g1, float b1, float a1,
float r2, float g2, float b2, float a2, float r2, float g2, float b2, float a2,
float time, AActor *who); float time, AActor *who);
~DFlashFader (); void Destroy ();
void Serialize (FArchive &arc); void Serialize (FArchive &arc);
void Tick (); void Tick ();
AActor *WhoFor() { return ForWho; } 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 // A weapon that's tossed out should contain no ammo, so you can't cheat
// by dropping it and then picking it back up. // by dropping it and then picking it back up.
// //=======================
//===========================================================================
AInventory *AWeapon::CreateTossable () AInventory *AWeapon::CreateTossable ()
{ {

View file

@ -1109,6 +1109,7 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor)
{ {
static_cast<AWeapon *>(item)->AmmoGive2 = weap->Ammo2->Amount; static_cast<AWeapon *>(item)->AmmoGive2 = weap->Ammo2->Amount;
} }
item->ItemFlags |= IF_IGNORESKILL;
} }
} }
else else
@ -1117,11 +1118,13 @@ void APlayerPawn::Die (AActor *source, AActor *inflictor)
if (item != NULL) if (item != NULL)
{ {
item->Amount = weap->Ammo1->Amount; item->Amount = weap->Ammo1->Amount;
item->ItemFlags |= IF_IGNORESKILL;
} }
item = P_DropItem (this, weap->AmmoType2, -1, 256); item = P_DropItem (this, weap->AmmoType2, -1, 256);
if (item != NULL) if (item != NULL)
{ {
item->Amount = weap->Ammo2->Amount; item->Amount = weap->Ammo2->Amount;
item->ItemFlags |= IF_IGNORESKILL;
} }
} }
} }