- Changed: For actors not being spawned on the floor P_FindFloorCeiling should
be used to prevent them from dropping through 3DMIDTEX textures. - Fixed: AMageStaffFX2::IsOkayToAttack overwrote the projectile's angle variable. SVN r970 (trunk)
This commit is contained in:
parent
c4cbef9e58
commit
6dbdcf5f60
5 changed files with 22 additions and 10 deletions
|
|
@ -321,7 +321,7 @@ bool AMageStaffFX2::IsOkayToAttack (AActor *link)
|
|||
else if (P_CheckSight (this, link))
|
||||
{
|
||||
AActor *master = target;
|
||||
angle = R_PointToAngle2 (master->x, master->y,
|
||||
angle_t angle = R_PointToAngle2 (master->x, master->y,
|
||||
link->x, link->y) - master->angle;
|
||||
angle >>= 24;
|
||||
if (angle>226 || angle<30)
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ bool P_CheckSight (const AActor* t1, const AActor* t2, int flags=0);
|
|||
void P_ResetSightCounters (bool full);
|
||||
void P_UseLines (player_t* player);
|
||||
bool P_UsePuzzleItem (AActor *actor, int itemType);
|
||||
void P_FindFloorCeiling (AActor *actor);
|
||||
void P_FindFloorCeiling (AActor *actor, bool onlymidtex = false);
|
||||
|
||||
bool P_ChangeSector (sector_t* sector, int crunch, int amt, int floorOrCeil, bool isreset);
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ static bool PIT_FindFloorCeiling (line_t *ld, const FBoundingBox &box, FCheckPos
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void P_FindFloorCeiling (AActor *actor)
|
||||
void P_FindFloorCeiling (AActor *actor, bool onlymidtex)
|
||||
{
|
||||
sector_t *sec;
|
||||
FCheckPosition tmf;
|
||||
|
|
@ -194,13 +194,16 @@ void P_FindFloorCeiling (AActor *actor)
|
|||
|
||||
if (tmf.touchmidtex) tmf.dropoffz = tmf.floorz;
|
||||
|
||||
actor->floorz = tmf.floorz;
|
||||
actor->dropoffz = tmf.dropoffz;
|
||||
actor->ceilingz = tmf.ceilingz;
|
||||
actor->floorpic = tmf.floorpic;
|
||||
actor->floorsector = tmf.floorsector;
|
||||
actor->ceilingpic = tmf.ceilingpic;
|
||||
actor->ceilingsector = tmf.ceilingsector;
|
||||
if (!onlymidtex || (tmf.touchmidtex && (tmf.floorz < actor->z)))
|
||||
{
|
||||
actor->floorz = tmf.floorz;
|
||||
actor->dropoffz = tmf.dropoffz;
|
||||
actor->ceilingz = tmf.ceilingz;
|
||||
actor->floorpic = tmf.floorpic;
|
||||
actor->floorsector = tmf.floorsector;
|
||||
actor->ceilingpic = tmf.ceilingpic;
|
||||
actor->ceilingsector = tmf.ceilingsector;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -3238,6 +3238,9 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
actor->floorpic = actor->floorsector->floorpic;
|
||||
actor->ceilingsector = actor->Sector;
|
||||
actor->ceilingpic = actor->ceilingsector->ceilingpic;
|
||||
// Check if there's something solid to stand on between the current position and the
|
||||
// current sector's floor.
|
||||
P_FindFloorCeiling(actor, true);
|
||||
}
|
||||
else if (!(actor->flags5 & MF5_NOINTERACTION))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue