Thread: Dwarf Multicannon, logout on firing

Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28
  1. #21  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,618
    Thanks given
    170
    Thanks received
    228
    Rep Power
    326
    @OP

    Try adding cannon == null and rotation == null to the top of rotate method

    Also post your player.getPA().object method

    Replace your rotate method with this see if it helps

    Code:
    private void rotate(GlobalObject cannon) {
            if(cannon == null || rotation == null)
                return;
            switch (rotation) {
                case NORTH:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 516, 10, -1);
                    break;
                case NORTH_EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 517, 10, -1);
                    break;
                case EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 518, 10, -1);
                    break;
                case SOUTH_EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 519, 10, -1);
                    break;
                case SOUTH:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 520, 10, -1);
                    break;
                case SOUTH_WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 521, 10, -1);
                    break;
                case WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 514, 10, -1);
                    break;
                case NORTH_WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 515, 10, -1);
                    rotation = null;
                    break;
            }
        }
    Reply With Quote  
     

  2. #22  
    Banned

    Join Date
    Jun 2010
    Age
    23
    Posts
    4,836
    Thanks given
    1,676
    Thanks received
    1,563
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by Armo View Post
    @OP

    Try adding cannon == null and rotation == null to the top of rotate method

    Also post your player.getPA().object method

    Replace your rotate method with this see if it helps

    Code:
    private void rotate(GlobalObject cannon) {
            if(cannon == null || rotation == null)
                return;
            switch (rotation) {
                case NORTH:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 516, 10, -1);
                    break;
                case NORTH_EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 517, 10, -1);
                    break;
                case EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 518, 10, -1);
                    break;
                case SOUTH_EAST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 519, 10, -1);
                    break;
                case SOUTH:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 520, 10, -1);
                    break;
                case SOUTH_WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 521, 10, -1);
                    break;
                case WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 514, 10, -1);
                    break;
                case NORTH_WEST:
                    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 515, 10, -1);
                    rotation = null;
                    break;
            }
        }
    There would be a NPE if the cannon was null.
    Reply With Quote  
     

  3. #23  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,618
    Thanks given
    170
    Thanks received
    228
    Rep Power
    326
    Quote Originally Posted by Tyluur View Post
    There would be a NPE if the cannon was null.
    Well then all that's left is whatever is being sent in the player.getPA().object method
    Reply With Quote  
     

  4. #24  
    Banned

    Join Date
    Jun 2010
    Age
    23
    Posts
    4,836
    Thanks given
    1,676
    Thanks received
    1,563
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by Armo View Post
    Well then all that's left is whatever is being sent in the player.getPA().object method
    Yeah, if its an out of bounds exception, maybe it's the -1 value?
    Reply With Quote  
     

  5. #25  
    Registered Member

    Join Date
    Oct 2012
    Posts
    136
    Thanks given
    29
    Thanks received
    54
    Discord
    View profile
    Rep Power
    83
    Quote Originally Posted by soar View Post
    The rotating of the cannon is just animating the cannon for the current rotation direction, it looks like you're sending a new object every tick.

    Can you post the object method in player.getPA().object

    player.getPA().object(cannon.getPosition().getX(), cannon.getPosition().getY(), 516, 10, -1);

    The 516 is the animation but could potentially be out of bounds for whatever the correct parameter is supposed to be there.
    Guys I already posted this on the last page but you drowned it out.
    Reply With Quote  
     

  6. #26  
    Contributor
    Kris's Avatar
    Join Date
    Jun 2016
    Age
    23
    Posts
    3,536
    Thanks given
    703
    Thanks received
    2,322
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by soar View Post
    Guys I already posted this on the last page but you drowned it out.
    ^

    A bunch of spam aside from this. T2 errors, as most of us know, are corrupt packets. The +-515 ids clearly refer to cannon rotation animation(clear to me at least, despite having written the cannon years ago). This is more than likely caused by the object animation packet not being configured correctly server-side. You'll have to find this packet in the client and match it up to the server.

    Either way, show the packet(and the object method) in here. Perhaps some basic googling will be able to find you the correct packet configuration.
    Reply With Quote  
     

  7. Thankful user:


  8. #27  
    RuneCasino


    Join Date
    Jul 2007
    Posts
    1,618
    Thanks given
    170
    Thanks received
    228
    Rep Power
    326
    From my experience, it could actually be that the packet is colliding with another packet (Happens when multiple packets being sent)

    It's possible since the object/cannon function worked fine before?

    Also did you change anything in the cache that could be a factor
    Reply With Quote  
     

  9. #28  
    Banned

    Join Date
    Jun 2010
    Age
    23
    Posts
    4,836
    Thanks given
    1,676
    Thanks received
    1,563
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by Armo View Post
    From my experience, it could actually be that the packet is colliding with another packet (Happens when multiple packets being sent)

    It's possible since the object/cannon function worked fine before?

    Also did you change anything in the cache that could be a factor
    Perhaps packet fragmentation could've played a part in this - the multiplexing procedure could've been poorly written in the server.
    Can op show the multiplexing procedure?
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 12
    Last Post: 02-12-2009, 04:04 PM
  2. Light the world on fire.
    By +eX.God in forum Showcase
    Replies: 2
    Last Post: 04-08-2008, 05:36 AM
  3. Chiefs on fire!
    By Fallen Azn SinZ in forum Showcase
    Replies: 17
    Last Post: 03-02-2008, 05:38 AM
  4. "On Fire" My second
    By Sarah in forum Showcase
    Replies: 5
    Last Post: 02-03-2008, 07:25 PM
  5. On fire
    By Jv in forum Showcase
    Replies: 30
    Last Post: 01-26-2008, 05:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •