Adjust item drop
This commit is contained in:
@@ -66,5 +66,17 @@ namespace reallife_gamemode.Server.Extensions
|
||||
{
|
||||
return player.HasData("isLoggedIn") ? player.GetData("isLoggedIn") : false;
|
||||
}
|
||||
|
||||
public static Vector3 GetPositionFromPlayer(Client player, float distance, int offset = 0)
|
||||
{
|
||||
var pos = player.Position;
|
||||
var a = player.Heading + offset;
|
||||
var rad = a * Math.PI / 180;
|
||||
var newpos = new Vector3(pos.X + (distance * Math.Sin(-rad)),
|
||||
pos.Y + (distance * Math.Cos(-rad)),
|
||||
pos.Z);
|
||||
return newpos;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user