Advertisement
Guest User

Untitled

a guest
Aug 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.05 KB | None | 0 0
  1. roundCode, droiteEnCours, gaucheEnCours, px, py, vx, vy, jump, jump_img, portal, isAngle = data.readInt(), data.readBool(), data.readBool(), data.readShort(), data.readShort(), data.readShort(), data.readShort(), data.readBool(), data.readByte(), data.readByte(), data.available(),
  2.                     angle = data.readShort() if isAngle else -1
  3.                     vel_angle = data.readShort() if isAngle else -1
  4.                     loc_1 = data.readBool() if isAngle else False
  5.  
  6.                     if roundCode == this.client.room.lastRoundCode:
  7.                         if droiteEnCours or gaucheEnCours:
  8.                             this.client.isMovingRight = droiteEnCours
  9.                             this.client.isMovingLeft = gaucheEnCours
  10.  
  11.                             if this.client.isAfk:
  12.                                 this.client.isAfk = False
  13.  
  14.                         this.client.posX = px * 800 / 2700
  15.                         this.client.posY = py * 800 / 2700
  16.                         this.client.velX = vx
  17.                         this.client.velY = vy
  18.                         this.client.isJumping = jump
  19.                        
  20.                         packet = byteArray()
  21.                         packet.setTokens(4, 4)
  22.                         packet.writeInt(this.client.playerCode)
  23.                         packet.writeInt(roundCode)
  24.                         packet.writeBool(droiteEnCours)
  25.                         packet.writeBool(gaucheEnCours)
  26.                         packet.writeShort(px)
  27.                         packet.writeShort(py)
  28.                         packet.writeShort(vx)
  29.                         packet.writeShort(vy)
  30.                         packet.writeBool(jump)
  31.                         packet.writeByte(jump_img)
  32.                         packet.writeByte(portal)
  33.                         if isAngle:
  34.                             packet.writeShort(angle)
  35.                             packet.writeShort(vel_angle)
  36.                             packet.writeBool(loc_1)
  37.                         this.client.room.sendAllOthers(this.client, packet)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement