diff options
Diffstat (limited to 'test-client/main.ts')
| -rw-r--r-- | test-client/main.ts | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/test-client/main.ts b/test-client/main.ts index f0f481b4..00699b60 100644 --- a/test-client/main.ts +++ b/test-client/main.ts @@ -156,7 +156,7 @@ function packet(p: PacketC) {          case "remove_player":              players.delete(p.id)              break; -        case "position": { +        case "movement": {              const pl = players.get(p.player)!              const pos = { x: p.pos[0], y: p.pos[1] }              // const dist = length(sub_v2(pl.position, pos));a @@ -165,7 +165,7 @@ function packet(p: PacketC) {              if (p.player == my_id) return last_server_sent_position = pos              pl.position.x = pos.x              pl.position.y = pos.y -            pl.boosting = p.boosting +            pl.boosting = p.boost              pl.rot = p.rot              break;          } @@ -307,7 +307,7 @@ function set_interact(edge: boolean) {  function tick_update() {      const p = players.get(my_id)      if (!p) return -    send({ player: my_id, type: "movement", pos: [p.position.x, p.position.y], direction: [p.direction.x, p.direction.y], boosting: p.boosting }) +    send({ player: my_id, type: "movement", pos: [p.position.x, p.position.y], dir: [p.direction.x, p.direction.y], boost: p.boosting })  }  function frame_update(dt: number) { | 
