mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added null check to barrier creation
This commit is contained in:
parent
e7be1dc820
commit
132b89dd25
1 changed files with 5 additions and 0 deletions
|
|
@ -36,6 +36,11 @@ namespace SceneManager.Barriers
|
||||||
}
|
}
|
||||||
|
|
||||||
_object = new Object(ModelName, Position, Heading);
|
_object = new Object(ModelName, Position, Heading);
|
||||||
|
if(!_object)
|
||||||
|
{
|
||||||
|
Game.LogTrivial($"New barrier object is invalid.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_object.SetPositionWithSnap(Position);
|
_object.SetPositionWithSnap(Position);
|
||||||
Rage.Native.NativeFunction.Natives.PLACE_OBJECT_ON_GROUND_PROPERLY<bool>(_object);
|
Rage.Native.NativeFunction.Natives.PLACE_OBJECT_ON_GROUND_PROPERLY<bool>(_object);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue