mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
always have local flashlight casting shadows
This commit is contained in:
parent
225f0254f6
commit
73e8f498a2
@ -101,6 +101,8 @@ namespace QSB.Player.TransformSync
|
||||
Player.CameraBody = cameraBody.gameObject;
|
||||
_visibleCameraRoot = cameraBody;
|
||||
|
||||
PlayerToolsManager.InitLocal();
|
||||
|
||||
// stick
|
||||
var pivot = GetStickPivot();
|
||||
Player.RoastingStick = pivot.parent.gameObject;
|
||||
@ -163,7 +165,7 @@ namespace QSB.Player.TransformSync
|
||||
* SET UP PLAYER CAMERA
|
||||
*/
|
||||
|
||||
PlayerToolsManager.Init(REMOTE_PlayerCamera.transform);
|
||||
PlayerToolsManager.InitRemote(REMOTE_PlayerCamera.transform);
|
||||
|
||||
var camera = REMOTE_PlayerCamera.AddComponent<Camera>();
|
||||
camera.enabled = false;
|
||||
|
@ -19,7 +19,7 @@ namespace QSB.Tools
|
||||
public static Material Props_HEA_Lightbulb_OFF_mat;
|
||||
public static Material Structure_HEA_PlayerShip_Screens_mat;
|
||||
|
||||
public static void Init(Transform playerCamera)
|
||||
public static void InitRemote(Transform playerCamera)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -42,7 +42,6 @@ namespace QSB.Tools
|
||||
Props_HEA_Lightbulb_OFF_mat = null;
|
||||
Structure_HEA_PlayerShip_Screens_mat = null;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -55,6 +54,19 @@ namespace QSB.Tools
|
||||
TranslatorCreator.CreateTranslator(playerCamera);
|
||||
}
|
||||
|
||||
public static void InitLocal()
|
||||
{
|
||||
var flashlight = Locator.GetFlashlight();
|
||||
var spot = flashlight._illuminationCheckLight;
|
||||
var lightLOD = spot.GetComponent<LightLOD>();
|
||||
|
||||
if (lightLOD != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(lightLOD);
|
||||
spot.GetLight().shadows = LightShadows.Soft;
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateStowTransforms(Transform cameraBody)
|
||||
{
|
||||
var stow = new GameObject("REMOTE_ToolStowTransform");
|
||||
|
Loading…
Reference in New Issue
Block a user