- replaced ceilingz with a floating point variable, also in FCheckPosition.
This commit is contained in:
parent
6e2421bd37
commit
ec58e70078
25 changed files with 118 additions and 107 deletions
|
|
@ -117,7 +117,7 @@ void AFastProjectile::Tick ()
|
|||
P_ExplodeMissile (this, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
if (_f_Top() > ceilingz)
|
||||
if (Top() > ceilingz)
|
||||
{ // Hit the ceiling
|
||||
|
||||
if (ceilingpic == skyflatnum && !(flags3 & MF3_SKYEXPLODE))
|
||||
|
|
@ -126,7 +126,7 @@ void AFastProjectile::Tick ()
|
|||
return;
|
||||
}
|
||||
|
||||
_f_SetZ(ceilingz - height);
|
||||
SetZ(ceilingz - _Height());
|
||||
P_ExplodeMissile (this, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,11 +426,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
|
|||
|
||||
if (self->flags & MF_SPAWNCEILING)
|
||||
{
|
||||
self->_f_SetZ(self->ceilingz - self->height - self->SpawnPoint[2]);
|
||||
self->_f_SetZ(self->_f_ceilingz() - self->height - self->SpawnPoint[2]);
|
||||
}
|
||||
else if (self->flags2 & MF2_SPAWNFLOAT)
|
||||
{
|
||||
fixed_t space = self->ceilingz - self->height - self->floorz;
|
||||
fixed_t space = self->_f_ceilingz() - self->height - self->floorz;
|
||||
if (space > 48*FRACUNIT)
|
||||
{
|
||||
space -= 40*FRACUNIT;
|
||||
|
|
@ -452,9 +452,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
|
|||
// initial spawn.
|
||||
self->_f_SetZ(self->floorz);
|
||||
}
|
||||
if ((self->flags & MF_SOLID) && (self->_f_Top() > self->ceilingz))
|
||||
if ((self->flags & MF_SOLID) && (self->Top() > self->ceilingz))
|
||||
{ // Do the same for the ceiling.
|
||||
self->_f_SetZ(self->ceilingz - self->height);
|
||||
self->SetZ(self->ceilingz - self->_Height());
|
||||
}
|
||||
// Do not interpolate from the position the actor was at when it was
|
||||
// picked up, in case that is different from where it is now.
|
||||
|
|
|
|||
|
|
@ -188,11 +188,11 @@ class ARandomSpawner : public AActor
|
|||
// Handle special altitude flags
|
||||
if (newmobj->flags & MF_SPAWNCEILING)
|
||||
{
|
||||
newmobj->_f_SetZ(newmobj->ceilingz - newmobj->height - SpawnPoint[2]);
|
||||
newmobj->_f_SetZ(newmobj->_f_ceilingz() - newmobj->height - SpawnPoint[2]);
|
||||
}
|
||||
else if (newmobj->flags2 & MF2_SPAWNFLOAT)
|
||||
{
|
||||
fixed_t space = newmobj->ceilingz - newmobj->height - newmobj->floorz;
|
||||
fixed_t space = newmobj->_f_ceilingz() - newmobj->height - newmobj->floorz;
|
||||
if (space > 48*FRACUNIT)
|
||||
{
|
||||
space -= 40*FRACUNIT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue