improve elevator slightly

This commit is contained in:
JohnCorby 2022-01-06 18:22:34 -08:00
parent 18dd499890
commit 408f372eb3
3 changed files with 8 additions and 6 deletions

View File

@ -30,7 +30,7 @@ namespace QSB.ElevatorSync.WorldObjects
// BUG : This won't work for the log lift! need to make a different trigger for that
var boxShape = AttachedObject.gameObject.AddComponent<BoxShape>();
var boxShape = AttachedObject.gameObject.GetAddComponent<BoxShape>();
boxShape.center = new Vector3(0, 1.75f, 0.25f);
boxShape.size = new Vector3(3, 3.5f, 3);
@ -79,8 +79,13 @@ namespace QSB.ElevatorSync.WorldObjects
public override void DisplayLines()
{
var boxShape = AttachedObject.gameObject.GetComponent<BoxShape>();
Popcron.Gizmos.Cube(AttachedObject.transform.position + boxShape.center, AttachedObject.transform.rotation, boxShape.size);
var boxShape = (BoxShape)_elevatorTrigger._shape;
Popcron.Gizmos.Cube(
ShapeUtil.Box.CalcWorldSpaceCenter(boxShape),
boxShape.transform.rotation,
ShapeUtil.Box.CalcWorldSpaceSize(boxShape),
_elevatorTrigger.IsTrackingObject(Locator.GetPlayerDetector()) ? Color.green : Color.white
);
}
}
}

View File

@ -26,8 +26,6 @@ namespace QSB.QuantumSync.WorldObjects
}
}
public override bool ShouldDisplayDebug() => ControllingPlayer != 0;
public override void Init()
{
if (QSBCore.ShowQuantumVisibilityObjects)

View File

@ -1,5 +1,4 @@
using OWML.Common;
using QSB.Player;
using QSB.Player.TransformSync;
using QuantumUNET;
using System;