Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code:
- public void updateNPCMovement(stream str) {
- if(updateRequired || direction != -1) {
- System.out.println("sends = "+direction);
- str.writeBits(1, 1);
- /**
- * self Update type is sent as 2 bits.
- * Only one of these is sent at once.
- * 0: No data to send
- * 1: 3 bits for direction then 1 bit for update required (?)
- * 2: 3 bits for 1st dir, 3 bits for 2nd dir, then 1 bit for update required (?)
- */
- if(direction != -1) {
- if(false) {
- str.writeBits(2, 2); // update type 2
- str.writeBits(3, Mobs.CLIENT_SPRITES[0]); // direction 1
- str.writeBits(3, Mobs.CLIENT_SPRITES[direction]); // direction 2
- str.writeBits(1, updateRequired ? 1 : 0); // is the update required?
- } else {
- str.writeBits(2, 1); // update type 1
- str.writeBits(3, Mobs.CLIENT_SPRITES[direction]); // direction
- str.writeBits(1, updateRequired ? 1 : 0); // is the update required?
- }
- } else {
- str.writeBits(2, 0); //don't need to move and an update is required
- }
- } else {
- str.writeBits(1, 0);
- }
- }
- When landed on the println msg:
- Error: arch337 size mismatch in getnpcpos - pos:18 psize:20
- Error: T2 - 65,81,124 - 20,2609,3103 - 21,1,0,1,-1,-8,84,71,19,1,-3,127,0,0,0,3,
- 99,20,63,24,
- Exception in thread "Thread-3" java.lang.NullPointerException
- at client.build3dScreenMenu(client.java:6133)
- at client.processRightClick(client.java:8180)
- at client.draw3dScreen(client.java:11154)
- at client.method146(client.java:14758)
- at client.drawGameScreen(client.java:10081)
- at client.processDrawing(client.java:11053)
- at RSApplet.run(RSApplet.java:117)
- at client.run(client.java:6021)
- at java.lang.Thread.run(Unknown Source)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement