- fixed: The portal link table was not created when there were no sector portals.

- fixed: P_TryMove could loop endlessly over a list of static portals when there was an error during portal creation.
This commit is contained in:
Christoph Oelckers 2016-03-12 17:43:36 +01:00
commit ae1571158c
4 changed files with 33 additions and 29 deletions

View file

@ -865,9 +865,9 @@ void gl_RenderModel(GLSprite * spr)
// [BB] Workaround for the missing pitch information.
if ( (smf->flags & MDL_PITCHFROMMOMENTUM) )
{
const double x = static_cast<double>(spr->actor->velx);
const double y = static_cast<double>(spr->actor->vely);
const double z = static_cast<double>(spr->actor->velz);
const double x = static_cast<double>(spr->actor->vel.x);
const double y = static_cast<double>(spr->actor->vel.y);
const double z = static_cast<double>(spr->actor->vel.z);
// [BB] Calculate the pitch using spherical coordinates.
if(z || x || y) pitch = float(atan( z/sqrt(x*x+y*y) ) / M_PI * 180);