- Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now. - Fixed: The music strings in the default level info were never freed and caused memory leaks when used repeatedly. - Fixed: The intermusic string in the level info was never freed. - Fixed: The default fire obituary should only be printed if the damage came from the environment. If it comes from a monster the monster specific obituary should be used instead. - Added custom damage types from the floating point test release. - Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also be used by other actors so a more generalized approach is needed than hard coding it into the Pain Elemental. - Converted a few of Doom's monsters to DECORATE because I couldn't test the first version of the custom state code with the corpses inheriting from them. - Added custom states from last year's floating point test release and fixed some bugs I found in that code. Unfortunately it wasn't all salvageable and it was easier to recreate some parts from scratch. SVN r368 (trunk)
This commit is contained in:
parent
3b2c2efcb1
commit
063c85b157
118 changed files with 2103 additions and 1818 deletions
|
|
@ -764,7 +764,7 @@ void AInventory::BecomePickup ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void AInventory::AbsorbDamage (int damage, int damageType, int &newdamage)
|
||||
void AInventory::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||
{
|
||||
if (Inventory != NULL)
|
||||
{
|
||||
|
|
@ -1250,18 +1250,6 @@ void AInventory::DetachFromOwner ()
|
|||
IMPLEMENT_STATELESS_ACTOR (ACustomInventory, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ACustomInventory :: Serialize
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void ACustomInventory::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << UseState << PickupState << DropState;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ACustomInventory :: SpecialDropAction
|
||||
|
|
@ -1270,7 +1258,7 @@ void ACustomInventory::Serialize (FArchive &arc)
|
|||
|
||||
bool ACustomInventory::SpecialDropAction (AActor *dropper)
|
||||
{
|
||||
return CallStateChain (dropper, DropState);
|
||||
return CallStateChain (dropper, FindState(NAME_Drop));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -1281,7 +1269,7 @@ bool ACustomInventory::SpecialDropAction (AActor *dropper)
|
|||
|
||||
bool ACustomInventory::Use (bool pickup)
|
||||
{
|
||||
return CallStateChain (Owner, UseState);
|
||||
return CallStateChain (Owner, FindState(NAME_Use));
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -1292,8 +1280,9 @@ bool ACustomInventory::Use (bool pickup)
|
|||
|
||||
bool ACustomInventory::TryPickup (AActor *toucher)
|
||||
{
|
||||
bool useok = CallStateChain (toucher, PickupState);
|
||||
if ((useok || PickupState == NULL) && UseState != NULL)
|
||||
FState *pickupstate = FindState(NAME_Pickup);
|
||||
bool useok = CallStateChain (toucher, pickupstate);
|
||||
if ((useok || pickupstate == NULL) && FindState(NAME_Use) != NULL)
|
||||
{
|
||||
useok = Super::TryPickup (toucher);
|
||||
}
|
||||
|
|
@ -1561,9 +1550,9 @@ bool ABasicArmor::HandlePickup (AInventory *item)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void ABasicArmor::AbsorbDamage (int damage, int damageType, int &newdamage)
|
||||
void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||
{
|
||||
if (damageType != MOD_WATER)
|
||||
if (damageType != NAME_Water)
|
||||
{
|
||||
int saved = FixedMul (damage, SavePercent);
|
||||
if (Amount < saved)
|
||||
|
|
@ -1725,9 +1714,9 @@ bool AHexenArmor::AddArmorToSlot (AActor *actor, int slot, int amount)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void AHexenArmor::AbsorbDamage (int damage, int damageType, int &newdamage)
|
||||
void AHexenArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||
{
|
||||
if (damageType != MOD_WATER)
|
||||
if (damageType != NAME_Water)
|
||||
{
|
||||
fixed_t savedPercent = Slots[0] + Slots[1] + Slots[2] + Slots[3] + Slots[4];
|
||||
APlayerPawn *ppawn = Owner->player != NULL ? Owner->player->mo : NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue