mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
check if frame is already detached before detaching it - this also fixes a bug on client when he was trying to detach already detached frame
This commit is contained in:
parent
9c63b25d38
commit
942453a2a4
1 changed files with 3 additions and 0 deletions
|
@ -231,6 +231,9 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
|
||||
void DetachFrameDuringExplosion(Frame frame, float mass, GameObject parentGo)
|
||||
{
|
||||
if (! this.transform.IsParentOf(frame.transform)) // already detached ?
|
||||
return;
|
||||
|
||||
var meshFilter = frame.GetComponentInChildren<MeshFilter>();
|
||||
if (null == meshFilter)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue