This commit is contained in:
2021-04-06 18:25:30 +02:00
parent 62cde419f9
commit 2e648b4300
2 changed files with 8 additions and 2 deletions

View File

@@ -319,8 +319,13 @@ namespace ReallifeGamemode.Server.Extensions
public static Vector3 GetInFrontOfPosition(this Player player)
{
player.ResetData("InFrontOf");
player.TriggerEvent("SERVER:GetInFrontPosition");
return player.GetData<Vector3>("InFrontOf");
while (true)
{
if (player.HasData("InFrontOf"))
return player.GetData<Vector3>("InFrontOf");
}
}
}
}