mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +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];
|
||||
|
@ -140,7 +141,7 @@ class ARandomSpawner : public AActor
|
|||
// 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