- added Gez's infinite ammo powerup and random spawner fix patches.
- reduced size of Hexen's flames to fix bug in Deathkings MAP01. - added checks for sidedef scaling values SVN r1648 (trunk)
This commit is contained in:
parent
93742aca31
commit
d04ffd57f8
9 changed files with 81 additions and 40 deletions
|
|
@ -29,7 +29,6 @@ class ARandomSpawner : public AActor
|
|||
int n=0;
|
||||
|
||||
Super::PostBeginPlay();
|
||||
|
||||
drop = di = GetDropItems();
|
||||
if (di != NULL)
|
||||
{
|
||||
|
|
@ -52,7 +51,7 @@ class ARandomSpawner : public AActor
|
|||
if (di->Name != NAME_None)
|
||||
{
|
||||
n -= di->amount;
|
||||
if (di->Next != NULL) di = di->Next; else n=0;
|
||||
if ((di->Next != NULL) && (n > -1)) di = di->Next; else n = -1;
|
||||
}
|
||||
}
|
||||
// So now we can spawn the dropped item.
|
||||
|
|
@ -81,6 +80,22 @@ class ARandomSpawner : public AActor
|
|||
newmobj->tracer = tracer;
|
||||
newmobj->CopyFriendliness(this, false);
|
||||
if (!(flags & MF_DROPPED)) newmobj->flags &= ~MF_DROPPED;
|
||||
|
||||
// Handle special altitude flags
|
||||
if (newmobj->flags & MF_SPAWNCEILING)
|
||||
{
|
||||
newmobj->z = newmobj->ceilingz - newmobj->height;
|
||||
}
|
||||
else if (newmobj->flags2 & MF2_SPAWNFLOAT)
|
||||
{
|
||||
fixed_t space = newmobj->ceilingz - newmobj->height - newmobj->floorz;
|
||||
if (space > 48*FRACUNIT)
|
||||
{
|
||||
space -= 40*FRACUNIT;
|
||||
newmobj->z = MulScale8 (space, pr_randomspawn()) + newmobj->floorz + 40*FRACUNIT;
|
||||
}
|
||||
}
|
||||
|
||||
// Special1 is used to count how many recursions we're in.
|
||||
if (newmobj->IsKindOf(PClass::FindClass("RandomSpawner")))
|
||||
newmobj->special1 = ++special1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue