mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- added PERSISTENTPOWER and TRANSFERPOINTERS submissions by Gez.
SVN r1651 (trunk)
This commit is contained in:
parent
16bf1ef6d0
commit
6ba839a0e9
6 changed files with 14 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
June 7, 2009 (Changes by Graf Zahl)
|
||||
- added PERSISTENTPOWER and TRANSFERPOINTERS submissions by Gez.
|
||||
- fixed FORCEPAIN logic.
|
||||
- added Gez's infinite ammo powerup and random spawner fix patches.
|
||||
- reduced size of Hexen's flames to fix bug in Deathkings MAP01.
|
||||
|
|
|
@ -1104,7 +1104,8 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, bool resetinventory
|
|||
next = item->Inventory;
|
||||
if (item->IsKindOf (RUNTIME_CLASS(APowerup)))
|
||||
{
|
||||
if (deathmatch || mode != FINISH_SameHub || !(item->ItemFlags & IF_HUBPOWER))
|
||||
if (deathmatch || ((mode != FINISH_SameHub || !(item->ItemFlags & IF_HUBPOWER))
|
||||
&& !(item->ItemFlags & IF_PERSISTENTPOWER))) // Keep persistent powers in non-deathmatch games
|
||||
{
|
||||
item->Destroy ();
|
||||
}
|
||||
|
|
|
@ -129,6 +129,7 @@ enum
|
|||
IF_CREATECOPYMOVED = 1<<15, // CreateCopy changed the owner (copy's Owner field holds new owner).
|
||||
IF_INITEFFECTFAILED = 1<<16, // CreateCopy tried to activate a powerup and activation failed (can happen with PowerMorph)
|
||||
IF_NOATTENPICKUPSOUND = 1<<17, // Play pickup sound with ATTN_NONE
|
||||
IF_PERSISTENTPOWER = 1<<18, // Powerup is kept when travelling between levels
|
||||
};
|
||||
|
||||
struct vissprite_t;
|
||||
|
|
|
@ -1317,6 +1317,7 @@ enum SIX_Flags
|
|||
// 128 is used by Skulltag!
|
||||
SIXF_TRANSFERAMBUSHFLAG=256,
|
||||
SIXF_TRANSFERPITCH=512,
|
||||
SIXF_TRANSFERPOINTERS=1024,
|
||||
};
|
||||
|
||||
|
||||
|
@ -1330,6 +1331,12 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
|
|||
{
|
||||
mo->Translation = self->Translation;
|
||||
}
|
||||
if (flags & SIXF_TRANSFERPOINTERS)
|
||||
{
|
||||
mo->target = self->target;
|
||||
mo->master = self->master; // This will be overridden later if SIXF_SETMASTER is set
|
||||
mo->tracer = self->tracer;
|
||||
}
|
||||
|
||||
mo->angle=self->angle;
|
||||
if (flags & SIXF_TRANSFERPITCH) mo->pitch = self->pitch;
|
||||
|
@ -1378,7 +1385,7 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!(flags & SIXF_TRANSFERPOINTERS))
|
||||
{
|
||||
// If this is a missile or something else set the target to the originator
|
||||
mo->target=originator? originator : self;
|
||||
|
|
|
@ -255,6 +255,7 @@ static FFlagDef InventoryFlags[] =
|
|||
DEFINE_FLAG(IF, IGNORESKILL, AInventory, ItemFlags),
|
||||
DEFINE_FLAG(IF, ADDITIVETIME, AInventory, ItemFlags),
|
||||
DEFINE_FLAG(IF, NOATTENPICKUPSOUND, AInventory, ItemFlags),
|
||||
DEFINE_FLAG(IF, PERSISTENTPOWER, AInventory, ItemFlags),
|
||||
|
||||
DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ const int SXF_TELEFRAG=64;
|
|||
const int SXF_CLIENTSPAWN=128; // only used by Skulltag
|
||||
const int SXF_TRANSFERAMBUSHFLAG=256;
|
||||
const int SXF_TRANSFERPITCH=512;
|
||||
const int SXF_TRANSFERPOINTERS=1024;
|
||||
|
||||
// Flags for A_Chase
|
||||
const int CHF_FASTCHASE = 1;
|
||||
|
|
Loading…
Reference in a new issue