Thread: Global Object Glitch?

Results 1 to 2 of 2
  1. #1 Global Object Glitch? 
    Registered Member
    Shamon King's Avatar
    Join Date
    Aug 2007
    Posts
    3,335
    Thanks given
    90
    Thanks received
    228
    Rep Power
    1363
    This is for hyperion of coruse

    Well anyways it's kinda weird when I light a fire and walk east it spawns the object behind me about 10 squares. But if I'm standing still or going any other direction it spawns it on the right coords.

    The frame should be right.

    Code:
    	public ActionSender sendNewObject(Location loc, int id, int face, int type) {
    		player.write(new PacketBuilder(85)
    		.putByteC(loc.getY() - 8 * loc.getRegionY())
    		.putByteC(loc.getX() - 8 * loc.getRegionX())
    		.toPacket());
    		player.write(new PacketBuilder(151)
    		.putByteA(0)
    		.putLEShort(id)
    		.putByteS((byte)((type << 2) + (face & 3)))
    		.toPacket());
    		return this;
    	}
    usage
    Code:
    player.getActionSender().sendNewObject(player.getLocation(), NORMAL_FIRE, -1, 10);
    Any idea's whats wrong?
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    Been a while, but should it be:
    .putByteC(loc.getY() - (8 * loc.getRegionY()))
    .putByteC(loc.getX() - (8 * loc.getRegionX()))

    You're subtracting 8 from the coordinate first then timing it by the region.
    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
  •