diff --git a/frontend/assets/scenes/offline_map.fire b/frontend/assets/scenes/offline_map.fire index fd546c5..bfea240 100644 --- a/frontend/assets/scenes/offline_map.fire +++ b/frontend/assets/scenes/offline_map.fire @@ -518,7 +518,7 @@ "array": [ 0, 0, - 210.4441731196186, + 209.66956379694378, 0, 0, 0, diff --git a/frontend/assets/scripts/Map.js b/frontend/assets/scripts/Map.js index acd736d..097c2d2 100644 --- a/frontend/assets/scripts/Map.js +++ b/frontend/assets/scripts/Map.js @@ -462,7 +462,7 @@ cc.Class({ }, onLoad() { - cc.game.setFrameRate(60); + cc.game.setFrameRate(59.9); cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE); cc.view.enableAutoFullScreen(true); diff --git a/frontend/assets/scripts/OfflineMap.js b/frontend/assets/scripts/OfflineMap.js index 4095167..e9b3e83 100644 --- a/frontend/assets/scripts/OfflineMap.js +++ b/frontend/assets/scripts/OfflineMap.js @@ -11,7 +11,7 @@ cc.Class({ }, onLoad() { - cc.game.setFrameRate(60); + cc.game.setFrameRate(59.9); cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE); cc.view.enableAutoFullScreen(true); const self = this; diff --git a/frontend/assets/scripts/modules/jsexport.js b/frontend/assets/scripts/modules/jsexport.js index d16c636..f78c938 100644 --- a/frontend/assets/scripts/modules/jsexport.js +++ b/frontend/assets/scripts/modules/jsexport.js @@ -6908,20 +6908,24 @@ $packages["jsexport/battle"] = (function() { /* */ } return; } var $f = {$blk: generateRectColliderInCollisionSpace, $c: true, $r, blX, blY, collider, data, h, shape, tag, w, $s};return $f; }; UpdateRectCollider = function(collider, wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, blX, blY, bottomPadding, collider, data, h, leftPadding, rectShape, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy; + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, blX, blY, bottomPadding, collider, data, effH, effW, h, leftPadding, rectShape, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy; _tuple = WorldToPolygonColliderBLPos(wx, wy, w * 0.5, h * 0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY); blX = _tuple[0]; blY = _tuple[1]; - _tmp = blX; - _tmp$1 = blY; - _tmp$2 = w; - _tmp$3 = h; - collider.X = _tmp; - collider.Y = _tmp$1; - collider.W = _tmp$2; - collider.H = _tmp$3; + _tmp = leftPadding + w + rightPadding; + _tmp$1 = bottomPadding + h + topPadding; + effW = _tmp; + effH = _tmp$1; + _tmp$2 = blX; + _tmp$3 = blY; + _tmp$4 = effW; + _tmp$5 = effH; + collider.X = _tmp$2; + collider.Y = _tmp$3; + collider.W = _tmp$4; + collider.H = _tmp$5; rectShape = $assertType(collider.Shape, ptrType$9); - rectShape.UpdateAsRectangle(0, 0, w, h); + rectShape.UpdateAsRectangle(0, 0, effW, effH); collider.Data = data; }; $pkg.UpdateRectCollider = UpdateRectCollider; diff --git a/jsexport/battle/battle.go b/jsexport/battle/battle.go index e87f265..6bdf4d5 100644 --- a/jsexport/battle/battle.go +++ b/jsexport/battle/battle.go @@ -1210,10 +1210,10 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(inputsBuffer *resolv.Rin } } - for i := 0; i < colliderCnt; i++ { - dynamicCollider := dynamicRectangleColliders[i] + for i := 0; i < colliderCnt; i++ { + dynamicCollider := dynamicRectangleColliders[i] dynamicCollider.Space.RemoveSingle(dynamicCollider) - } + } ret.Id = nextRenderFrameId ret.BulletLocalIdCounter = bulletLocalId @@ -1236,9 +1236,10 @@ func generateRectColliderInCollisionSpace(blX, blY, w, h float64, data interface func UpdateRectCollider(collider *resolv.Object, wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY float64, data interface{}, tag string) { blX, blY := WorldToPolygonColliderBLPos(wx, wy, w*0.5, h*0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY) - collider.X, collider.Y, collider.W, collider.H = blX, blY, w, h + effW, effH := leftPadding+w+rightPadding, bottomPadding+h+topPadding + collider.X, collider.Y, collider.W, collider.H = blX, blY, effW, effH rectShape := collider.Shape.(*resolv.ConvexPolygon) - rectShape.UpdateAsRectangle(0, 0, w, h) + rectShape.UpdateAsRectangle(0, 0, effW, effH) collider.Data = data // Ignore "tag" for now }