Merge branch 'master' of github.com:Saltosion/Cyber
This commit is contained in:
commit
492502ef98
@ -134,8 +134,8 @@ namespace Cyber.Networking.Clientside {
|
|||||||
|
|
||||||
NetClient.Connect(ip, port);
|
NetClient.Connect(ip, port);
|
||||||
|
|
||||||
Debug.Log("Client launched!");
|
Debug.Log("Connecting..");
|
||||||
Term.Println("Client launched!");
|
Term.Println("Connecting..");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -53,26 +53,15 @@ namespace Cyber.Networking.Serverside {
|
|||||||
|
|
||||||
foreach (Type type in Categorized.Keys) {
|
foreach (Type type in Categorized.Keys) {
|
||||||
SyncHandletype Handletype = Database.GetSyncHandletypes()[type];
|
SyncHandletype Handletype = Database.GetSyncHandletypes()[type];
|
||||||
if (Handletype.RequireHash) {
|
if (TickCounter % Handletype.TickInterval == 0) {
|
||||||
foreach (int SyncBaseID in Categorized[type]) {
|
foreach (int SyncBaseID in Categorized[type]) {
|
||||||
if (DirtySyncBases.Contains(SyncBaseID)) {
|
if (DirtySyncBases.Contains(SyncBaseID)) {
|
||||||
QueueSyncBase(SyncBaseID);
|
QueueSyncBase(SyncBaseID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (TickCounter % Handletype.TickInterval == 0) {
|
|
||||||
foreach (int SyncBaseID in Categorized[type]) {
|
|
||||||
if (DirtySyncBases.Contains(SyncBaseID)) {
|
|
||||||
QueueSyncBase(SyncBaseID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TickCounter++;
|
|
||||||
TimeSinceLastTick -= TickInterval;
|
|
||||||
|
|
||||||
if (QueuedSyncs.Count > 0) {
|
if (QueuedSyncs.Count > 0) {
|
||||||
int[] SyncIDs = QueuedSyncs.ToArray();
|
int[] SyncIDs = QueuedSyncs.ToArray();
|
||||||
SyncPkt SyncPacket = new SyncPkt(Database, SyncIDs, SyncPacketID++);
|
SyncPkt SyncPacket = new SyncPkt(Database, SyncIDs, SyncPacketID++);
|
||||||
@ -87,6 +76,14 @@ namespace Cyber.Networking.Serverside {
|
|||||||
DirtSyncBase(i);
|
DirtSyncBase(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (TickCounter < int.MaxValue) {
|
||||||
|
TickCounter++;
|
||||||
|
} else {
|
||||||
|
TickCounter = 0;
|
||||||
|
}
|
||||||
|
TimeSinceLastTick -= TickInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user