Skip to content
Snippets Groups Projects
Commit a8564333 authored by Jonathan Kunstwald's avatar Jonathan Kunstwald
Browse files

Improve player safety sphere

parent 11ad471c
No related branches found
No related tags found
No related merge requests found
...@@ -132,7 +132,7 @@ glm::vec3 flock::Hive::getSafeSpawnPos(const glm::vec3 &pos) ...@@ -132,7 +132,7 @@ glm::vec3 flock::Hive::getSafeSpawnPos(const glm::vec3 &pos)
auto const playerDistance2 = glm::distance2(pos, mCurrentPlayerPosition); auto const playerDistance2 = glm::distance2(pos, mCurrentPlayerPosition);
if (playerDistance2 < playerSafetySphere2) if (playerDistance2 < playerSafetySphere2)
{ {
return pos + glm::vec3(playerSafetySphere, 0, playerSafetySphere); return mCurrentPlayerPosition + glm::vec3(playerSafetySphere, 0, 0);
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment