remove vehicle velocity when teleporting
This commit is contained in:
@@ -182,7 +182,11 @@ namespace ReallifeGamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
//TODO: Als Supporter nur, wenn mit dem Ziel ein offenes Ticket besteht. Ansonsten kein Teleport
|
||||
if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = target.Position;
|
||||
if (player.IsInVehicle && player.VehicleSeat == -1)
|
||||
{
|
||||
player.Vehicle.Position = target.Position;
|
||||
NAPI.Entity.SetEntityVelocity(player.Vehicle, new Vector3());
|
||||
}
|
||||
else player.Position = target.Position;
|
||||
}
|
||||
|
||||
@@ -215,7 +219,11 @@ namespace ReallifeGamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
//TODO: Als Supporter nur, wenn mit dem Ziel ein offenes Ticket besteht. Ansonsten kein Teleport
|
||||
if (target.IsInVehicle && target.VehicleSeat == -1) target.Vehicle.Position = player.Position;
|
||||
if (target.IsInVehicle && target.VehicleSeat == -1)
|
||||
{
|
||||
target.Vehicle.Position = player.Position;
|
||||
NAPI.Entity.SetEntityVelocity(target.Vehicle, new Vector3());
|
||||
}
|
||||
else target.Position = player.Position;
|
||||
ChatService.SendMessage(target, "Du wurdest von " + player.Name + " teleportiert.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user