mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 14:09:06 +00:00
High framerate problem wasn't fully fixed, let's try this again.
Little addition to 7891a2f011
.
This commit is contained in:
parent
7dca65351c
commit
f8ed78d331
1 changed files with 5 additions and 1 deletions
|
@ -6977,7 +6977,11 @@ void Avatar::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
/*collideCheck:*/
|
/*collideCheck:*/
|
||||||
|
|
||||||
if (!isSwimming() && vel.getLength2D() < sqr(2))
|
// Beware: This code may cause clamping vel to zero if the framerate is very high.
|
||||||
|
// Starting with zero vel, low difftimes will cause an addVec small enough that this
|
||||||
|
// check will always trigger, and vel will never get larger than zero.
|
||||||
|
// Under water and swimming check should hopefully prevent this from happening. -- FG
|
||||||
|
if (_isUnderWater && !isSwimming() && vel.getLength2D() < sqr(2))
|
||||||
{
|
{
|
||||||
vel = Vector(0,0,0);
|
vel = Vector(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue