- replaced all single precision floats in p_slopes.cpp with doubles.
I don't think we want to have precision and reliability issues in such a vital part of the engine...
This commit is contained in:
parent
646f7a1f90
commit
33cdb4d816
2 changed files with 52 additions and 52 deletions
|
|
@ -2749,13 +2749,13 @@ void P_PredictionLerpReset()
|
|||
|
||||
bool P_LerpCalculate(PredictPos from, PredictPos to, PredictPos &result, float scale)
|
||||
{
|
||||
FVector3 vecFrom(FIXED2DBL(from.x), FIXED2DBL(from.y), FIXED2DBL(from.z));
|
||||
FVector3 vecTo(FIXED2DBL(to.x), FIXED2DBL(to.y), FIXED2DBL(to.z));
|
||||
FVector3 vecResult;
|
||||
TVector3<double> vecFrom(FIXED2DBL(from.x), FIXED2DBL(from.y), FIXED2DBL(from.z));
|
||||
TVector3<double> vecTo(FIXED2DBL(to.x), FIXED2DBL(to.y), FIXED2DBL(to.z));
|
||||
TVector3<double> vecResult;
|
||||
vecResult = vecTo - vecFrom;
|
||||
vecResult *= scale;
|
||||
vecResult = vecResult + vecFrom;
|
||||
FVector3 delta = vecResult - vecTo;
|
||||
TVector3<double> delta = vecResult - vecTo;
|
||||
|
||||
result.x = FLOAT2FIXED(vecResult.X);
|
||||
result.y = FLOAT2FIXED(vecResult.Y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue