Thread: Walking glitches when changing regions.

Results 1 to 3 of 3
  1. #1 Walking glitches when changing regions. 
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    I am converting and learning the 474 protocol, I have a slight problem at the moment where when move into another region my players coords muck up and I like noclip though obsticles.

    Does anyone have any clues to why it does this? I have tried to pause sending the walking queue whilst the region is updating and allowing it to continue when it recieves the region changed packet but that doesn't work either.
    Visit Rune Miracle Here
    Reply With Quote  
     

  2. #2  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    Hmm mine doesn't do that, very strange show me your walk packet handler thingy
    Reply With Quote  
     

  3. #3  
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    Quote Originally Posted by Michael View Post
    Hmm mine doesn't do that, very strange show me your walk packet handler thingy
    Its not my walking packet etc because I walk fine untill the region updates.

    Are my fomulees for the regions and local coords correct?

    Code:
    		mapRegionX = (absolute[0] >> 3) - 6;
    		mapRegionY = (absolute[1] >> 3) - 6;
    		localX = absX - 8 * mapRegionX;
    		localY = absY - 8 * mapRegionY;

    Here is my walking packet -
    Code:
    	int size = packet.getLength();
    		
    		if(packet.getOpcode() == 11) {
    		    size -= 14;
    		}
    
    		PathHandler path = player.getPathHandler();
    		
    		path.clearWaypoints();
    
    		final int steps = (size - 5) / 2;
    		final int[][] waypoints = new int[steps][2];
    
    		for (int i = 0; i < steps; i++) {
    			waypoints[i][0] = packet.readByte();
    			waypoints[i][1] = packet.readByteS();
    		}
    		final int firstX = packet.readShortA();
    		final int firstY = packet.readLEShort();
    		@SuppressWarnings("unused")
    		final boolean runSteps = packet.readByteC() == 1;
    		
    		path.add(Point.location(firstX, firstY));
    		for (int i = 0; i < steps; i++) {
    		    waypoints[i][0] += firstX;
    		    waypoints[i][1] += firstY;
    		    path.add(Point.location(waypoints[i][0], waypoints[i][1]));
    		}
    My walking class is the same as rs2d handled it. Works perfectly on my 377 but not with this?
    Visit Rune Miracle Here
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •