mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 11:48:56 +00:00
Minor fix.
This commit is contained in:
parent
f3428c88df
commit
6265d2bc1e
@ -363,8 +363,6 @@ module.export = cc.Class({
|
|||||||
|
|
||||||
lateUpdate(dt) {
|
lateUpdate(dt) {
|
||||||
const self = this;
|
const self = this;
|
||||||
self.activeDirection.dx = self.activeDirection.dx;
|
|
||||||
self.activeDirection.dy = self.activeDirection.dy;
|
|
||||||
const now = new Date().getTime();
|
const now = new Date().getTime();
|
||||||
self.lastMovedAt = now;
|
self.lastMovedAt = now;
|
||||||
},
|
},
|
||||||
|
@ -338,7 +338,7 @@ cc.Class({
|
|||||||
self.lastDownsyncInputFrameId = -1;
|
self.lastDownsyncInputFrameId = -1;
|
||||||
self.lastAllConfirmedInputFrameId = -1;
|
self.lastAllConfirmedInputFrameId = -1;
|
||||||
self.lastUpsyncInputFrameId = -1;
|
self.lastUpsyncInputFrameId = -1;
|
||||||
self.inputFrameUpsyncDelayTolerance = 1;
|
self.inputFrameUpsyncDelayTolerance = 3;
|
||||||
|
|
||||||
self.recentFrameCache = {};
|
self.recentFrameCache = {};
|
||||||
self.recentFrameCacheCurrentSize = 0;
|
self.recentFrameCacheCurrentSize = 0;
|
||||||
@ -964,6 +964,9 @@ cc.Class({
|
|||||||
playerScriptIns.scheduleNewDirection(decodedInput, true);
|
playerScriptIns.scheduleNewDirection(decodedInput, true);
|
||||||
if (invokeUpdateToo) {
|
if (invokeUpdateToo) {
|
||||||
playerScriptIns.update(self.rollbackEstimatedDt);
|
playerScriptIns.update(self.rollbackEstimatedDt);
|
||||||
|
// [WARNING] CocosCreator v2.2.1 uses a singleton "CCDirector" to schedule "tree descendent updates" and "collision detections" in different timers, thus the following manual trigger of collision detection might not produce the same outcome for the "selfPlayer" as the other peers. Moreover, the aforementioned use of different timers is an intrinsic source of error!
|
||||||
|
|
||||||
|
cc.director._collisionManager.update(self.rollbackEstimatedDt); // Just to avoid unexpected wall penetration, no guarantee on determinism
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user