- 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 - Added the -norun parameter to quit the game just before video
initialization. To be used to check for errors in scripts without actually initialization. To be used to check for errors in scripts without actually
running the game. running the game.

View file

@ -214,15 +214,27 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
tmf.x = actor->x; tmf.x = actor->x;
tmf.y = actor->y; tmf.y = actor->y;
tmf.z = actor->z; tmf.z = actor->z;
P_GetFloorCeilingZ(tmf);
actor->floorz = tmf.floorz; if (!onlyspawnpos)
actor->dropoffz = tmf.dropoffz; {
actor->ceilingz = tmf.ceilingz; P_GetFloorCeilingZ(tmf);
actor->floorpic = tmf.floorpic; actor->floorz = tmf.floorz;
actor->floorsector = tmf.floorsector; actor->dropoffz = tmf.dropoffz;
actor->ceilingpic = tmf.ceilingpic; actor->ceilingz = tmf.ceilingz;
actor->ceilingsector = tmf.ceilingsector; actor->floorpic = tmf.floorpic;
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); FBoundingBox box(tmf.x, tmf.y, actor->radius);
@ -249,6 +261,10 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
actor->ceilingpic = tmf.ceilingpic; actor->ceilingpic = tmf.ceilingpic;
actor->ceilingsector = tmf.ceilingsector; actor->ceilingsector = tmf.ceilingsector;
} }
else
{
actor->floorsector = actor->ceilingsector = actor->Sector;
}
} }
// //