mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- fixed: FastProjectile was missing all sky checks when the projectile's move
was blocked. SVN r2063 (trunk)
This commit is contained in:
parent
bcbf4c3c84
commit
3288d56cac
2 changed files with 42 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
December 31, 2009 (Changes by Graf Zahl)
|
||||
- fixed: FastProjectile was missing all sky checks when the projectile's move
|
||||
was blocked.
|
||||
|
||||
December 30, 2009
|
||||
- Fixed: A_ThrowGrenade used the same code as the old fighter flechette, so
|
||||
it was just as broken at aiming up and down.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#include "a_sharedglobal.h"
|
||||
#include "p_local.h"
|
||||
#include "g_level.h"
|
||||
#include "r_sky.h"
|
||||
#include "p_lnspec.h"
|
||||
|
||||
|
||||
IMPLEMENT_CLASS(AFastProjectile)
|
||||
|
@ -72,6 +74,26 @@ void AFastProjectile::Tick ()
|
|||
|
||||
if (!P_TryMove (this, x + xfrac,y + yfrac, true, false, tm))
|
||||
{ // Blocked move
|
||||
if (!(flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
if (tm.ceilingline &&
|
||||
tm.ceilingline->backsector &&
|
||||
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||
z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (x, y))
|
||||
{
|
||||
// Hack to prevent missiles exploding against the sky.
|
||||
// Does not handle sky floors.
|
||||
Destroy ();
|
||||
return;
|
||||
}
|
||||
// [RH] Don't explode on horizon lines.
|
||||
if (BlockingLine != NULL && BlockingLine->special == Line_Horizon)
|
||||
{
|
||||
Destroy ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
P_ExplodeMissile (this, BlockingLine, BlockingMobj);
|
||||
return;
|
||||
}
|
||||
|
@ -79,6 +101,15 @@ void AFastProjectile::Tick ()
|
|||
z += zfrac;
|
||||
if (z <= floorz)
|
||||
{ // Hit the floor
|
||||
|
||||
if (floorpic == skyflatnum && !(flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
// [RH] Just remove the missile without exploding it
|
||||
// if this is a sky floor.
|
||||
Destroy ();
|
||||
return;
|
||||
}
|
||||
|
||||
z = floorz;
|
||||
P_HitFloor (this);
|
||||
P_ExplodeMissile (this, NULL, NULL);
|
||||
|
@ -86,6 +117,13 @@ void AFastProjectile::Tick ()
|
|||
}
|
||||
if (z + height > ceilingz)
|
||||
{ // Hit the ceiling
|
||||
|
||||
if (ceilingpic == skyflatnum && !(flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
Destroy ();
|
||||
return;
|
||||
}
|
||||
|
||||
z = ceilingz - height;
|
||||
P_ExplodeMissile (this, NULL, NULL);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue