Revert "- Exhumed: Increase quake precision in SetQuake()."

This reverts commit fb9ff7d105.

* The game relies on this being low precision. It was causing a weird tremor in the training map.
This commit is contained in:
Mitchell Richters 2023-03-26 19:52:55 +11:00
parent 71aad07913
commit fd62f1fb68

View file

@ -936,16 +936,16 @@ void SetQuake(DExhumedActor* pActor, int nVal)
{ {
for (int i = 0; i < nTotalPlayers; i++) for (int i = 0; i < nTotalPlayers; i++)
{ {
double qVal = nVal; auto nSqrt = ((PlayerList[i].pActor->spr.pos.XY() - pActor->spr.pos.XY()) * (1. / 16.)).Length();
if (const auto nSqrt = ((PlayerList[i].pActor->spr.pos.XY() - pActor->spr.pos.XY()) * (1. / 16.)).Length()) if (nSqrt)
{ {
qVal = clamp(qVal / nSqrt, 0., 15.); nVal = clamp(int(nVal / nSqrt), 0, 15);
} }
if (qVal > PlayerList[i].nQuake) if (nVal > PlayerList[i].nQuake)
{ {
PlayerList[i].nQuake = qVal; PlayerList[i].nQuake = nVal;
} }
} }
} }