mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Invalid shadow barrier object now displays a message and returns.
This commit is contained in:
parent
7ee307f8e6
commit
22dac470b7
1 changed files with 3 additions and 1 deletions
|
|
@ -52,7 +52,9 @@ namespace SceneManager
|
||||||
shadowBarrier = new Rage.Object(Settings.barrierValues[barrierList.Index], TracePlayerView(Settings.BarrierPlacementDistance, TraceFlags.IntersectWorld).HitPosition, rotateBarrier.Value);
|
shadowBarrier = new Rage.Object(Settings.barrierValues[barrierList.Index], TracePlayerView(Settings.BarrierPlacementDistance, TraceFlags.IntersectWorld).HitPosition, rotateBarrier.Value);
|
||||||
if (!shadowBarrier)
|
if (!shadowBarrier)
|
||||||
{
|
{
|
||||||
shadowBarrier = new Rage.Object(Settings.barrierValues[barrierList.Index], TracePlayerView(Settings.BarrierPlacementDistance, TraceFlags.IntersectWorld).HitPosition, rotateBarrier.Value);
|
barrierMenu.Close();
|
||||||
|
Game.DisplayNotification($"~o~Scene Manager\n~red~[Error]~w~ Something went wrong creating the shadow barrier. Please try again.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
Rage.Native.NativeFunction.Natives.PLACE_OBJECT_ON_GROUND_PROPERLY(shadowBarrier);
|
Rage.Native.NativeFunction.Natives.PLACE_OBJECT_ON_GROUND_PROPERLY(shadowBarrier);
|
||||||
shadowBarrier.IsGravityDisabled = true;
|
shadowBarrier.IsGravityDisabled = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue