Giter VIP home page Giter VIP logo

realmlib-net's People

Contributors

ashley-dv avatar dependabot[bot] avatar thomas-crane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

realmlib-net's Issues

Add support for CompressedInt

Hi,

In the 34.2.1 update, Deca have added a new integer type to deal with disconnection issues and have used this type inside the UPDATE packet and for StatData values. I have tried to add support for this myself but I'm terrible with bitwise operation and I think the parsed variable could have a different byte size each time. The new class is below:

public class CompressedInt
   {
      public static function Read(param1:IDataInput) : int
      {
         var _loc2_:* = 0;
         var _loc3_:int = param1.readUnsignedByte();
         var _loc4_:* = (_loc3_ & 64) != 0;
         var _loc5_:int = 6;
         _loc2_ = _loc3_ & 63;
         while(_loc3_ & 128)
         {
            _loc3_ = param1.readUnsignedByte();
            _loc2_ = _loc2_ | (_loc3_ & 127) << _loc5_;
            _loc5_ = _loc5_ + 7;
         }
         if(_loc4_)
         {
            _loc2_ = int(-_loc2_);
         }
         return _loc2_;
      }
   }

This is used inside the UPDATE packet for the length of NewObjs, the length of Drops and the items inside Drops.

It is then used in StatData for the statType and statValue. Then finally as the objectId and stats length in ObjectStatusData.

Without these changes you will get PacketIO errors when receiving UPDATE and anything with StatData:

[13:54:18 | USWest2]          Received PacketIO error: The value of "offset" is out of range. It must be >= 0 and <= 4434. Received -25921  

[13:54:18 | USWest3]          Received PacketIO error: Invalid array length

Sorry for the hacky comment but I couldn't provide a pull request as I'm unsure of the fix here. You can probably get better information with the diff from the new client.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.