Make Syncer a bit neater and change "Client Launched" to "Connecting"
This commit is contained in:
parent
a5d5a7c9ef
commit
2a96affea0
@ -134,8 +134,8 @@ namespace Cyber.Networking.Clientside {
|
||||
|
||||
NetClient.Connect(ip, port);
|
||||
|
||||
Debug.Log("Client launched!");
|
||||
Term.Println("Client launched!");
|
||||
Debug.Log("Connecting..");
|
||||
Term.Println("Connecting..");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -53,13 +53,6 @@ namespace Cyber.Networking.Serverside {
|
||||
|
||||
foreach (Type type in Categorized.Keys) {
|
||||
SyncHandletype Handletype = Database.GetSyncHandletypes()[type];
|
||||
if (Handletype.RequireHash) {
|
||||
foreach (int SyncBaseID in Categorized[type]) {
|
||||
if (DirtySyncBases.Contains(SyncBaseID)) {
|
||||
QueueSyncBase(SyncBaseID);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (TickCounter % Handletype.TickInterval == 0) {
|
||||
foreach (int SyncBaseID in Categorized[type]) {
|
||||
if (DirtySyncBases.Contains(SyncBaseID)) {
|
||||
@ -68,10 +61,6 @@ namespace Cyber.Networking.Serverside {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TickCounter++;
|
||||
TimeSinceLastTick -= TickInterval;
|
||||
|
||||
if (QueuedSyncs.Count > 0) {
|
||||
int[] SyncIDs = QueuedSyncs.ToArray();
|
||||
@ -87,6 +76,14 @@ namespace Cyber.Networking.Serverside {
|
||||
DirtSyncBase(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (TickCounter < int.MaxValue) {
|
||||
TickCounter++;
|
||||
} else {
|
||||
TickCounter = 0;
|
||||
}
|
||||
TimeSinceLastTick -= TickInterval;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user