- Fixed: P_FindFloorCeiling may not call P_PointInSector if called from

P_SpawnMapThing. It must use the values the actor has been initialized to
  by LinkToWorldForMapThing.


SVN r1488 (trunk)
This commit is contained in:
Christoph Oelckers 2009-03-19 11:24:14 +00:00
parent cfbf55acab
commit ca454bfeb3
2 changed files with 30 additions and 9 deletions

View file

@ -1,4 +1,9 @@
March 17, 2009
March 18, 2009 (Changes by Graf Zahl)
- Fixed: P_FindFloorCeiling may not call P_PointInSector if called from
P_SpawnMapThing. It must use the values the actor has been initialized to
by LinkToWorldForMapThing.
March 17, 2009
- Added the -norun parameter to quit the game just before video
initialization. To be used to check for errors in scripts without actually
running the game.

View file

@ -214,8 +214,10 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
tmf.x = actor->x;
tmf.y = actor->y;
tmf.z = actor->z;
P_GetFloorCeilingZ(tmf);
if (!onlyspawnpos)
{
P_GetFloorCeilingZ(tmf);
actor->floorz = tmf.floorz;
actor->dropoffz = tmf.dropoffz;
actor->ceilingz = tmf.ceilingz;
@ -223,6 +225,16 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
actor->floorsector = tmf.floorsector;
actor->ceilingpic = tmf.ceilingpic;
actor->ceilingsector = tmf.ceilingsector;
}
else
{
tmf.ceilingsector = tmf.floorsector = actor->Sector;
tmf.floorz = tmf.dropoffz = actor->floorz;
tmf.ceilingz = actor->ceilingz;
tmf.floorpic = actor->floorpic;
tmf.ceilingpic = actor->ceilingpic;
}
FBoundingBox box(tmf.x, tmf.y, actor->radius);
@ -249,6 +261,10 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
actor->ceilingpic = tmf.ceilingpic;
actor->ceilingsector = tmf.ceilingsector;
}
else
{
actor->floorsector = actor->ceilingsector = actor->Sector;
}
}
//