Thread: [Apollo] Player Updating issue

Results 1 to 2 of 2
  1. #1 [Apollo] Player Updating issue 
    Donator


    Join Date
    Mar 2008
    Posts
    1,945
    Thanks given
    118
    Thanks received
    201
    Rep Power
    2104
    Had an old copy of my Apollo and saw this bug was never fixed. Looks like even Major's copy still has this updating bug.

    If you walk away from another player in the right direction both deltax and deltay distance will be a negative value so it will never remove the players from the local list. Mainly you could be 40 squares away and still be able to see someone talking.

    Quick fix is in the Position Class

    Code:
    /**
    	 * Gets the longest horizontal or vertical delta between the two positions.
    	 * @param other The other position.
    	 * @return The longest horizontal or vertical delta.
    	 */
    	public int getLongestDelta(Position other) {
    		int deltaX = x - other.x;
    		int deltaY = y - other.y;
    		return Math.max(Math.abs(deltaX), Math.abs(deltaY));
    	}
    Since this method compares positive numbers we need to obtain the absolute value not the negative value or we wont calculate the distance the proper way since we are using Math.max which gets the greater number of 2 values.

    Hopefully this will help you out.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    REGISTERED MEMBER RAT DONOR MORE COMING

    Major's Avatar
    Join Date
    Jan 2011
    Posts
    3,002
    Thanks given
    1,295
    Thanks received
    3,549
    Rep Power
    5000
    Fixed in the official apollo repo, thanks for reporting
    Reply With Quote  
     

  4. Thankful users:



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: 3
    Last Post: 08-02-2012, 03:56 AM
  2. Player Updating Issue?
    By Rene Eats Waffl3z in forum Help
    Replies: 24
    Last Post: 07-23-2012, 01:54 AM
  3. PI, Player updating issue
    By Clx3 in forum Help
    Replies: 1
    Last Post: 04-05-2012, 10:06 PM
  4. weird player update issue
    By Jesse in forum Help
    Replies: 0
    Last Post: 07-18-2011, 10:33 PM
  5. Player Updating Issue In 317 Server & Clients
    By Lmctruck30 in forum Informative Threads
    Replies: 40
    Last Post: 10-17-2010, 09:48 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •