- fixed: Spawning things abuve a 3D midtexture did not provess the 'is above midtexture' state properly.

- fixed: When teleporting an actor the destination must be checked with the new z position, not the old one.


SVN r3111 (trunk)
This commit is contained in:
Christoph Oelckers 2011-01-20 11:40:05 +00:00
commit 622d1ebe6a
5 changed files with 27 additions and 8 deletions

View file

@ -256,10 +256,11 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f
//
//============================================================================
bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom)
bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opentop, fixed_t &openbottom, bool *above)
{
fixed_t tt, tb;
*above = false;
if (P_GetMidTexturePosition(linedef, 0, &tt, &tb))
{
if (thing->z + (thing->height/2) < (tt + tb)/2)
@ -268,8 +269,11 @@ bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, fixed_t &opent
}
else
{
if(tt > openbottom) openbottom = tt;
if(tt > openbottom)
{
openbottom = tt;
*above = true;
}
// returns true if it touches the midtexture
return (abs(thing->z - tt) <= thing->MaxStepHeight);
}