don't log error if frame is not child of vehicle, because some vehicles have multiple frames with the same name, and this causes error only on client, but not on server

This commit is contained in:
in0finite 2020-07-05 13:42:50 +02:00
parent e649d483d2
commit e959d1c483

View file

@ -218,14 +218,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
}
else
{
if (this.transform.IsParentOf(frame.transform))
{
DetachFrameDuringExplosion(frame, mass, parentGo);
}
else
{
Debug.LogError($"Can not detach frame ({frameName}) from vehicle {this.DescriptionForLogging} because it seems that the frame is already detached");
}
DetachFrameDuringExplosion(frame, mass, parentGo);
}
}