This commit is contained in:
Christoph Oelckers 2015-02-07 12:59:53 +01:00
commit cb4ef09b69
3 changed files with 5869 additions and 5857 deletions

View file

@ -1280,8 +1280,8 @@ public:
// We can't use DTA_HUDRules since it forces a width and height.
// Translation: No high res.
bool xright = *x < 0;
bool ybot = *y < 0;
bool xright = *x < 0 && !x.RelCenter();
bool ybot = *y < 0 && !y.RelCenter();
w = (forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth);
h = (forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight);

View file

@ -1968,8 +1968,6 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
// Don't change the angle if there's THRUREFLECT on the monster.
if (!(BlockingMobj->flags7 & MF7_THRUREFLECT))
{
//int dir;
//angle_t delta;
angle = R_PointToAngle2(BlockingMobj->x, BlockingMobj->y, mo->x, mo->y);
bool dontReflect = (mo->AdjustReflectionAngle(BlockingMobj, angle));
// Change angle for deflection/reflection
@ -1996,12 +1994,21 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
}
else
{
mo->angle = angle;
angle >>= ANGLETOFINESHIFT;
mo->velx = FixedMul(mo->Speed >> 1, finecosine[angle]);
mo->vely = FixedMul(mo->Speed >> 1, finesine[angle]);
mo->velz = -mo->velz / 2;
if (BlockingMobj->flags7 & MF7_MIRRORREFLECT && (tg || blockingtg))
{
mo->angle += ANGLE_180;
mo->velx = -mo->velx / 2;
mo->vely = -mo->vely / 2;
mo->velz = -mo->velz / 2;
}
else
{
mo->angle = angle;
angle >>= ANGLETOFINESHIFT;
mo->velx = FixedMul(mo->Speed >> 1, finecosine[angle]);
mo->vely = FixedMul(mo->Speed >> 1, finesine[angle]);
mo->velz = -mo->velz / 2;
}
}
}
else
@ -2932,11 +2939,8 @@ bool AActor::AdjustReflectionAngle (AActor *thing, angle_t &angle)
{
if (flags2 & MF2_DONTREFLECT) return true;
if (thing->flags7 & MF7_THRUREFLECT) return false;
if (thing->flags7 & MF7_MIRRORREFLECT)
angle += ANGLE_180;
// Change angle for reflection
else if (thing->flags4&MF4_SHIELDREFLECT)
if (thing->flags4&MF4_SHIELDREFLECT)
{
// Shield reflection (from the Centaur
if (abs (angle - thing->angle)>>24 > 45)
@ -2959,15 +2963,23 @@ bool AActor::AdjustReflectionAngle (AActor *thing, angle_t &angle)
else
angle -= ANG45;
}
else if (thing->flags7 & MF7_AIMREFLECT)
else
{
angle += ANGLE_1 * ((pr_reflect() % 16) - 8);
}
//Always check for AIMREFLECT, no matter what else is checked above.
if (thing->flags7 & MF7_AIMREFLECT)
{
if (this->target != NULL)
{
A_Face(this, this->target);
}
else if (thing->target != NULL)
{
A_Face(this, thing->target);
}
}
else
angle += ANGLE_1 * ((pr_reflect()%16)-8);
return false;
}

File diff suppressed because it is too large Load diff