- Added translation support to multipatch textures. Incomplete and not tested yet!
- Added Martin Howe's morph weapon update. SVN r916 (trunk)
This commit is contained in:
parent
ce5d4dba02
commit
b2bfad0c50
19 changed files with 645 additions and 142 deletions
|
|
@ -206,6 +206,7 @@ bool P_UndoPlayerMorph (player_t *player, bool force)
|
|||
mo->flags3 = (mo->flags3 & ~MF3_GHOST) | (pmo->flags3 & MF3_GHOST);
|
||||
|
||||
const PClass *exit_flash = player->MorphExitFlash;
|
||||
bool correctweapon = ((player->MorphStyle & MORPH_LOSEACTUALWEAPON) == 0);
|
||||
|
||||
player->morphTics = 0;
|
||||
player->MorphedPlayerClass = 0;
|
||||
|
|
@ -267,13 +268,32 @@ bool P_UndoPlayerMorph (player_t *player, bool force)
|
|||
{
|
||||
player->ReadyWeapon = player->PendingWeapon = NULL;
|
||||
}
|
||||
if (beastweap != NULL)
|
||||
{ // You don't get to keep your morphed weapon.
|
||||
if (beastweap->SisterWeapon != NULL)
|
||||
if (correctweapon)
|
||||
{ // Better "lose morphed weapon" semantics
|
||||
const PClass *morphweapon = PClass::FindClass (mo->MorphWeapon);
|
||||
if (morphweapon != NULL && morphweapon->IsDescendantOf (RUNTIME_CLASS(AWeapon)))
|
||||
{
|
||||
beastweap->SisterWeapon->Destroy ();
|
||||
AWeapon *OriginalMorphWeapon = static_cast<AWeapon *>(mo->FindInventory (morphweapon));
|
||||
if ((OriginalMorphWeapon != NULL) && (OriginalMorphWeapon->GivenAsMorphWeapon))
|
||||
{ // You don't get to keep your morphed weapon.
|
||||
if (OriginalMorphWeapon->SisterWeapon != NULL)
|
||||
{
|
||||
OriginalMorphWeapon->SisterWeapon->Destroy ();
|
||||
}
|
||||
OriginalMorphWeapon->Destroy ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else // old behaviour (not really useful now)
|
||||
{ // Assumptions made here are no longer valid
|
||||
if (beastweap != NULL)
|
||||
{ // You don't get to keep your morphed weapon.
|
||||
if (beastweap->SisterWeapon != NULL)
|
||||
{
|
||||
beastweap->SisterWeapon->Destroy ();
|
||||
}
|
||||
beastweap->Destroy ();
|
||||
}
|
||||
beastweap->Destroy ();
|
||||
}
|
||||
pmo->tracer = NULL;
|
||||
pmo->Destroy ();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ enum
|
|||
MORPH_UNDOBYCHAOSDEVICE = 0x00000008, // Player unmorphs upon activating a Chaos Device
|
||||
MORPH_FAILNOTELEFRAG = 0x00000010, // Player stays morphed if unmorph by Tome of Power fails
|
||||
MORPH_FAILNOLAUGH = 0x00000020, // Player doesn't laugh if unmorph by Chaos Device fails
|
||||
MORPH_WHENINVULNERABLE = 0x00000040 // Player can morph when invulnerable but ONLY if doing it to themselves
|
||||
MORPH_WHENINVULNERABLE = 0x00000040, // Player can morph when invulnerable but ONLY if doing it to themselves
|
||||
MORPH_LOSEACTUALWEAPON = 0X00000080 // Player loses specified morph weapon only (not "whichever they have when unmorphing")
|
||||
};
|
||||
|
||||
struct PClass;
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@ public:
|
|||
// In-inventory instance variables
|
||||
TObjPtr<AAmmo> Ammo1, Ammo2;
|
||||
TObjPtr<AWeapon> SisterWeapon;
|
||||
bool GivenAsMorphWeapon;
|
||||
|
||||
bool bAltFire; // Set when this weapon's alternate fire is used.
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ void AWeapon::Serialize (FArchive &arc)
|
|||
<< ProjectileType << AltProjectileType
|
||||
<< SelectionOrder
|
||||
<< MoveCombatDist
|
||||
<< Ammo1 << Ammo2 << SisterWeapon
|
||||
<< Ammo1 << Ammo2 << SisterWeapon << GivenAsMorphWeapon
|
||||
<< bAltFire;
|
||||
}
|
||||
|
||||
|
|
@ -230,6 +230,7 @@ void AWeapon::AttachToOwner (AActor *other)
|
|||
StatusBar->ReceivedWeapon (this);
|
||||
}
|
||||
}
|
||||
GivenAsMorphWeapon = false; // will be set explicitly by morphing code
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue