1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Player::getSpeed/setSpeed use const refs

This commit is contained in:
Loic Blot
2017-08-14 10:56:06 +02:00
parent ab9f3b92f2
commit 3eb9ff555f
3 changed files with 4 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ void RemoteClient::GetNextBlocks (
}
v3f playerpos = sao->getBasePosition();
v3f playerspeed = player->getSpeed();
const v3f &playerspeed = player->getSpeed();
v3f playerspeeddir(0,0,0);
if(playerspeed.getLength() > 1.0*BS)
playerspeeddir = playerspeed / playerspeed.getLength();