- replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed. Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
This commit is contained in:
parent
51a98d0e5d
commit
51b05d331d
140 changed files with 2406 additions and 2403 deletions
|
|
@ -133,25 +133,22 @@ void DEarthquake::Tick ()
|
|||
|
||||
dist = m_Spot->AproxDistance (victim, true);
|
||||
// Check if in damage radius
|
||||
if (dist < m_DamageRadius && victim->Z() <= victim->floorz)
|
||||
if (dist < m_DamageRadius && victim->_f_Z() <= victim->floorz)
|
||||
{
|
||||
if (pr_quake() < 50)
|
||||
{
|
||||
P_DamageMobj (victim, NULL, NULL, pr_quake.HitDice (1), NAME_None);
|
||||
}
|
||||
// Thrust player around
|
||||
angle_t an = victim->_f_angle() + ANGLE_1*pr_quake();
|
||||
DAngle an = victim->Angles.Yaw + pr_quake();
|
||||
if (m_IntensityX == m_IntensityY)
|
||||
{ // Thrust in a circle
|
||||
P_ThrustMobj (victim, an, m_IntensityX << (FRACBITS-1));
|
||||
}
|
||||
else
|
||||
{ // Thrust in an ellipse
|
||||
an >>= ANGLETOFINESHIFT;
|
||||
// So this is actually completely wrong, but it ought to be good
|
||||
// enough. Otherwise, I'd have to use tangents and square roots.
|
||||
victim->vel.x += FixedMul(m_IntensityX << (FRACBITS-1), finecosine[an]);
|
||||
victim->vel.y += FixedMul(m_IntensityY << (FRACBITS-1), finesine[an]);
|
||||
victim->Vel.X += FIXED2DBL(m_IntensityX) * an.Cos() * 0.5;
|
||||
victim->Vel.Y += FIXED2DBL(m_IntensityY) * an.Sin() * 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue