Skip to content

Commit

Permalink
Fix client-side rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya committed Jan 5, 2022
1 parent 87e1fa0 commit 541f239
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/playback/src/gameworld.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ export default class GameWorld {
let h = this.mapStats.maxCorner.y - this.mapStats.minCorner.y;
switch (target) {
case 0:
for (let x = 0; x < w / 2; x++) {
for (let y = 0; y < (w + 1) / 2; y++) {
for (let x = 0; x < Math.floor(w / 2); x++) {
for (let y = 0; y < Math.floor((w + 1) / 2); y++) {
let curX = x
let curY = y
let lastRubble = this.mapStats.rubble[curX + curY * w]
Expand All @@ -570,7 +570,7 @@ export default class GameWorld {
}
break
case 1:
for (let x = 0; x < w / 2; x++) {
for (let x = 0; x < Math.floor(w / 2); x++) {
for (let y = 0; y < h; y++) {
let idx = x + y * w
let newX = w - 1 - x
Expand All @@ -582,7 +582,7 @@ export default class GameWorld {
}
break
case 2:
for (let y = 0; y < h / 2; y++) {
for (let y = 0; y < Math.floor(h / 2); y++) {
for (let x = 0; x < w; x++) {
let idx = x + y * w
let newY = h - 1 - y
Expand Down

0 comments on commit 541f239

Please sign in to comment.