mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- 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:
parent
cfbf55acab
commit
ca454bfeb3
2 changed files with 30 additions and 9 deletions
|
@ -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.
|
||||
|
|
|
@ -214,15 +214,27 @@ void P_FindFloorCeiling (AActor *actor, bool onlyspawnpos)
|
|||
tmf.x = actor->x;
|
||||
tmf.y = actor->y;
|
||||
tmf.z = actor->z;
|
||||
P_GetFloorCeilingZ(tmf);
|
||||
|
||||
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 (!onlyspawnpos)
|
||||
{
|
||||
P_GetFloorCeilingZ(tmf);
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue