mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- Added Gez's RandomSpawner patch: If a randomspawner is given a Z-height in the map editor, and the spawned object has a spawn height flag, it is ignored by the spawned object. This little patch fixes that.
SVN r2304 (trunk)
This commit is contained in:
parent
5fc654dac2
commit
4e693e1c98
1 changed files with 4 additions and 2 deletions
|
@ -114,6 +114,7 @@ class ARandomSpawner : public AActor
|
|||
{
|
||||
// copy everything relevant
|
||||
newmobj->SpawnAngle = newmobj->angle = angle;
|
||||
newmobj->SpawnPoint[2] = SpawnPoint[2];
|
||||
newmobj->special = special;
|
||||
newmobj->args[0] = args[0];
|
||||
newmobj->args[1] = args[1];
|
||||
|
@ -137,10 +138,10 @@ class ARandomSpawner : public AActor
|
|||
// a health set to -2 after spawning, for internal reasons.
|
||||
if (health != SpawnHealth()) newmobj->health = health;
|
||||
if (!(flags & MF_DROPPED)) newmobj->flags &= ~MF_DROPPED;
|
||||
// Handle special altitude flags
|
||||
// Handle special altitude flags
|
||||
if (newmobj->flags & MF_SPAWNCEILING)
|
||||
{
|
||||
newmobj->z = newmobj->ceilingz - newmobj->height;
|
||||
newmobj->z = newmobj->ceilingz - newmobj->height - SpawnPoint[2];
|
||||
}
|
||||
else if (newmobj->flags2 & MF2_SPAWNFLOAT)
|
||||
{
|
||||
|
@ -150,6 +151,7 @@ class ARandomSpawner : public AActor
|
|||
space -= 40*FRACUNIT;
|
||||
newmobj->z = MulScale8 (space, pr_randomspawn()) + newmobj->floorz + 40*FRACUNIT;
|
||||
}
|
||||
newmobj->z += SpawnPoint[2];
|
||||
}
|
||||
if (newmobj->flags & MF_MISSILE)
|
||||
P_CheckMissileSpawn(newmobj);
|
||||
|
|
Loading…
Reference in a new issue