Merge pull request #87 in MIN/mineplex from virizion_utils to master
* commit '9951701ded301c47bcc203c12001ef866204b78c': Added a FixSpawnFacing flag to Game which controls whether or not GameTeam will modify the yaw of a spawn when returning it.
This commit is contained in:
commit
fc68ce9b78
@ -302,6 +302,8 @@ public abstract class Game implements Listener
|
||||
public boolean DeadBodiesDeath = true;
|
||||
public int DeadBodiesExpire = -1;
|
||||
|
||||
public boolean FixSpawnFacing = true;
|
||||
|
||||
private IPacketHandler _useEntityPacketHandler;
|
||||
private int _deadBodyCount;
|
||||
private NautHashMap<String, Entity> _deadBodies = new NautHashMap<String, Entity>();
|
||||
|
@ -113,12 +113,15 @@ public class GameTeam
|
||||
|
||||
private Location fixFacing(Location loc)
|
||||
{
|
||||
float yaw = UtilAlg.GetYaw(UtilAlg.getTrajectory2d(loc, Host.GetSpectatorLocation()));
|
||||
|
||||
yaw = (int) (yaw / 90) * 90;
|
||||
|
||||
loc = loc.clone();
|
||||
loc.setYaw(yaw);
|
||||
if (Host.FixSpawnFacing)
|
||||
{
|
||||
float yaw = UtilAlg.GetYaw(UtilAlg.getTrajectory2d(loc, Host.GetSpectatorLocation()));
|
||||
|
||||
yaw = (int) (yaw / 90) * 90;
|
||||
|
||||
loc = loc.clone();
|
||||
loc.setYaw(yaw);
|
||||
}
|
||||
|
||||
return loc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user