mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +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
|
December 30, 2009
|
||||||
- Fixed: A_ThrowGrenade used the same code as the old fighter flechette, so
|
- Fixed: A_ThrowGrenade used the same code as the old fighter flechette, so
|
||||||
it was just as broken at aiming up and down.
|
it was just as broken at aiming up and down.
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#include "a_sharedglobal.h"
|
#include "a_sharedglobal.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
|
#include "r_sky.h"
|
||||||
|
#include "p_lnspec.h"
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(AFastProjectile)
|
IMPLEMENT_CLASS(AFastProjectile)
|
||||||
|
@ -72,6 +74,26 @@ void AFastProjectile::Tick ()
|
||||||
|
|
||||||
if (!P_TryMove (this, x + xfrac,y + yfrac, true, false, tm))
|
if (!P_TryMove (this, x + xfrac,y + yfrac, true, false, tm))
|
||||||
{ // Blocked move
|
{ // 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);
|
P_ExplodeMissile (this, BlockingLine, BlockingMobj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -79,6 +101,15 @@ void AFastProjectile::Tick ()
|
||||||
z += zfrac;
|
z += zfrac;
|
||||||
if (z <= floorz)
|
if (z <= floorz)
|
||||||
{ // Hit the floor
|
{ // 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;
|
z = floorz;
|
||||||
P_HitFloor (this);
|
P_HitFloor (this);
|
||||||
P_ExplodeMissile (this, NULL, NULL);
|
P_ExplodeMissile (this, NULL, NULL);
|
||||||
|
@ -86,6 +117,13 @@ void AFastProjectile::Tick ()
|
||||||
}
|
}
|
||||||
if (z + height > ceilingz)
|
if (z + height > ceilingz)
|
||||||
{ // Hit the ceiling
|
{ // Hit the ceiling
|
||||||
|
|
||||||
|
if (ceilingpic == skyflatnum && !(flags3 & MF3_SKYEXPLODE))
|
||||||
|
{
|
||||||
|
Destroy ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
z = ceilingz - height;
|
z = ceilingz - height;
|
||||||
P_ExplodeMissile (this, NULL, NULL);
|
P_ExplodeMissile (this, NULL, NULL);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue