remove logs

This commit is contained in:
Mister_Nebula 2021-08-19 16:32:18 +01:00
parent bb5cd44084
commit bdef0e428c
2 changed files with 6 additions and 19 deletions

View File

@ -1,12 +1,5 @@
using QSB.SectorSync.WorldObjects;
using QSB.SectorSync;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QSB.Player.TransformSync;
using UnityEngine;
using OWML.Common;
using QSB.Utility;
using QSB.Player;
using QSB.WorldSync;
@ -60,7 +53,6 @@ namespace QSB.Syncs.Sectored
private void InitSector()
{
DebugLog.DebugWrite($"[BaseSectoredSync] {_logName} InitSector");
var closestSector = SectorSync.GetClosestSector(AttachedObject.transform);
if (closestSector != null)
{
@ -143,7 +135,6 @@ namespace QSB.Syncs.Sectored
if (!QSBCore.WorldObjectsReady)
{
sectorId = reader.ReadInt32();
DebugLog.DebugWrite($" - {_logName} ReadInt32 {sectorId}");
if (initialState && sectorId != -1)
{
DebugLog.DebugWrite($"{_logName} set waiting sector id:{sectorId}");
@ -153,7 +144,6 @@ namespace QSB.Syncs.Sectored
}
sectorId = reader.ReadInt32();
DebugLog.DebugWrite($" - {_logName} ReadInt32 {sectorId}");
var sector = sectorId == -1
? null
: QSBWorldSync.GetWorldFromId<QSBSector>(sectorId);
@ -190,8 +180,7 @@ namespace QSB.Syncs.Sectored
if (!HasAuthority)
{
DebugLog.DebugWrite($"[BaseSectoredSync] {_logName} : Does not have authority.");
return false;
return true;
}
if (referenceNull)
@ -218,7 +207,6 @@ namespace QSB.Syncs.Sectored
public void SetReferenceSector(QSBSector sector)
{
DebugLog.DebugWrite($"[BaseSectoredSync] {_logName} SetReferenceSector {sector.Name}");
ReferenceSector = sector;
SetReferenceTransform(sector?.Transform);
}

View File

@ -101,7 +101,6 @@ namespace QSB.Syncs
public virtual void Start()
{
DebugLog.DebugWrite($"[SyncBase] {_logName} Start");
var lowestBound = Resources.FindObjectsOfTypeAll<PlayerTransformSync>()
.Where(x => x.NetId.Value <= NetId.Value).OrderBy(x => x.NetId.Value).Last();
NetIdentity.SetRootIdentity(lowestBound.NetIdentity);
@ -127,7 +126,6 @@ namespace QSB.Syncs
protected virtual void OnDestroy()
{
DebugLog.DebugWrite($"[SyncBase] {_logName} OnDestroy");
if (ShouldReparentAttachedObject)
{
if (!HasAuthority && AttachedObject != null)
@ -149,7 +147,6 @@ namespace QSB.Syncs
protected virtual void Init()
{
DebugLog.DebugWrite($"[SyncBase] {_logName} Init");
if (!QSBSceneManager.IsInUniverse)
{
DebugLog.ToConsole($"Error - {_logName} is being init-ed when not in the universe!", MessageType.Error);
@ -170,7 +167,6 @@ namespace QSB.Syncs
protected virtual void OnSceneLoaded(OWScene oldScene, OWScene newScene, bool isInUniverse)
{
DebugLog.DebugWrite($"[SyncBase] {_logName} OnSceneLoaded");
_isInitialized = false;
}
@ -259,6 +255,11 @@ namespace QSB.Syncs
var distance = Vector3.Distance(currentPosition, targetPosition);
if (distance > _previousDistance + DistanceLeeway)
{
/*
DebugLog.DebugWrite($"{_logName} moved too far!" +
$"\r\n CurrentPosition:{currentPosition}," +
$"\r\n TargetPosition:{targetPosition}");
*/
_previousDistance = distance;
return targetPosition;
}
@ -269,7 +270,6 @@ namespace QSB.Syncs
public void SetReferenceTransform(Transform transform)
{
DebugLog.DebugWrite($"[SyncBase] {_logName} SetReferenceTransform");
if (ReferenceTransform == transform)
{
return;
@ -304,7 +304,6 @@ namespace QSB.Syncs
private void ReparentAttachedObject(Transform newParent)
{
DebugLog.DebugWrite($"[SyncBase] {_logName} ReparentAttachedObject");
if (AttachedObject.transform.parent != null && AttachedObject.transform.parent.GetComponent<Sector>() == null)
{
DebugLog.ToConsole($"Warning - Trying to reparent AttachedObject {AttachedObject.name} which wasnt attached to sector!", MessageType.Warning);