I've had players report to me that the /fmini causes damage to the minicopter when it comes to the player.
Could the plugin be adjusted to avoid this?
Thanks! Love the plugin.
Could the plugin be adjusted to avoid this?
Thanks! Love the plugin.
[ChatCommand("fmini")]
private void FetchMinicopter(BasePlayer player, string command, string[] args)
{
if (!permission.UserHasPermission(player.UserIDString, _fetchMini))
{
player.ChatMessage(lang.GetMessage("mini_perm", this, player.UserIDString));
}
else
{
if (!_data.playerMini.ContainsKey(player.UserIDString))
{
player.ChatMessage(lang.GetMessage("mini_notcurrent", this, player.UserIDString));
}
else if (_data.playerMini.ContainsKey(player.UserIDString))
{
MiniCopter mini = BaseNetworkable.serverEntities.Find(_data.playerMini[player.UserIDString]) as MiniCopter;
if (mini == null)
return;
if (!mini.AnyMounted() && GetDistance(player, mini) < _config.noMiniDistance)
{
Puts(GetDistance(player, mini).ToString());
// changed y transform from 3.5 offset to 1.0 offset to avoid minicopter damage when falling
Vector3 destination = new Vector3(player.transform.position.x + 2, player.transform.position.y + 1.0f, player.transform.position.z + 2);
mini.transform.position = destination;
}
else if (GetDistance(player, mini) > _config.noMiniDistance)
{
player.ChatMessage(lang.GetMessage("mini_distance", this, player.UserIDString));
}
else if (mini.AnyMounted())
{
player.ChatMessage(lang.GetMessage("mini_mounted", this, player.UserIDString));
}
}
}
}
Thank you!WhiteThunder
I'll fix this soon. Thanks for reminding. I'll probably have it teleport in front of the player similar to /mymini.
WhiteThunder
The teleport position for /fmini was updated in v2.8.0 so now it shouldn't cause damage in most cases (on relatively flat ground).
Thanks for the heads up! and thanks for your attention to the situation! Great plugin!