- refactored two mire files.

- fixed: FraggleScript's SetObjPosition function did not properly set the moved actor's properties. Better use SetOrigin for changing the position.
This commit is contained in:
Christoph Oelckers 2016-01-18 12:37:39 +01:00
commit b63eb391f7
4 changed files with 50 additions and 42 deletions

View file

@ -2918,8 +2918,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
{
// We probably won't hit the target, but aim at it anyway so we don't look stupid.
TVector2<double> xydiff = self->Vec2To(self->target);
double zdiff = (self->target->Z() + (self->target->height>>1)) -
(self->Z() + (self->height>>1) - self->floorclip);
double zdiff = FIXED2DBL((self->target->Z() + (self->target->height>>1)) - (self->Z() + (self->height>>1) - self->floorclip));
self->pitch = int(atan2(zdiff, xydiff.Length()) * ANGLE_180 / -M_PI);
}