Merge branch '20-06-24-movement-prediction' into 20-06-24-foobar

This commit is contained in:
Pieter-Jan Briers
2020-06-24 21:00:55 +02:00
64 changed files with 1127 additions and 561 deletions

View File

@@ -148,9 +148,10 @@ namespace Content.Server.Throw
var velocityNecessary = distance / throwDuration;
var impulseNecessary = velocityNecessary * mass;
var forceNecessary = impulseNecessary * (1f / timing.TickRate);
// Then clamp it to the max force allowed and call Throw().
Throw(thrownEnt, MathF.Min(impulseNecessary, throwForceMax), targetLoc, sourceLoc, spread, throwSourceEnt);
Throw(thrownEnt, MathF.Min(forceNecessary, throwForceMax), targetLoc, sourceLoc, spread, throwSourceEnt);
}
}
}