Thread: [PI] object height

Results 1 to 4 of 4
  1. #1 [PI] object height 
    Registered Member Rune Online's Avatar
    Join Date
    Jan 2013
    Posts
    48
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    Spoiler for public void object:
    Code:
    	public void object(int objectId, int objectX, int objectY, int face, int objectType) {
    		if (c2.getOutStream() != null && c2 != null) {
    			c2.getOutStream().createFrame(85);
    			c2.getOutStream().writeByteC(objectY - (c2.getMapRegionY() * 8));
    			c2.getOutStream().writeByteC(objectX - (c2.getMapRegionX() * 8));
    			c2.getOutStream().createFrame(101);
    			c2.getOutStream().writeByteC((objectType << 2) + (face & 3));
    			c2.getOutStream().writeByte(0);
    
    			if (objectId != -1) {
    				c2.getOutStream().createFrame(151);
    				c2.getOutStream().writeByteS(0);
    				c2.getOutStream().writeWordBigEndian(objectId);
    				c2.getOutStream().writeByteS((objectType << 2) + (face & 3));
    			}
    			c2.flushOutStream();
    		}
    
    	}


    How can I add height level to this? I thought it would be a simple copy paste.

    Code:
    public void object(int objectId, int objectX, int objectY, int height, int face, int objectType) {
    Code:
    c2.getOutStream().writeByteC(height - (c2.getMapRegionZ() * 8));
    
    also tried this and a few other variants
    
    c2.getOutStream().writeByteC(height - (c2.getMapRegionHeight() * 8));
    But it didn't work.

    Out of ideas now. Would be great to have this, but since it wasn't already added I assume it isn't simple.
    I am a magic-wielding alien.
    Reply With Quote  
     

  2. #2  
    leme give u some n00ts

    noot noot's Avatar
    Join Date
    Dec 2012
    Posts
    1,186
    Thanks given
    191
    Thanks received
    132
    Rep Power
    409
    public void object(int objectId, int objectX, int objectY, int height, int face, int objectType) ?
    Attached image
    Spoiler for :

    [Today 05:42 AM] Thakiller: Danced to make us lauigh and put a smile on our faces
    Reply With Quote  
     

  3. #3  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    there's no reason to have object heights on objects

    just send the height specific ones when a player changes height
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2013
    Posts
    12
    Thanks given
    1
    Thanks received
    2
    Rep Power
    10
    Quote Originally Posted by Harlan View Post
    there's no reason to have object heights on objects

    just send the height specific ones when a player changes height
    it's necessary for woodcutting and mining when the object are put on a tick and if you change heightlevels it will spawn at your height.
    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

Similar Threads

  1. [PI] object height messed up
    By Frankie in forum Help
    Replies: 0
    Last Post: 02-15-2013, 01:47 AM
  2. [PI] object height messed up
    By Frankie in forum Help
    Replies: 0
    Last Post: 02-14-2013, 02:28 AM
  3. [PI] Object Manager - Object Height
    By Aleksandr in forum Help
    Replies: 9
    Last Post: 09-06-2012, 02:56 AM
  4. [Client&Server] Custom Object Heights [FIX][PI]
    By spike112 in forum Tutorials
    Replies: 12
    Last Post: 08-16-2012, 06:52 PM
  5. [PI] Custom spawned objects height glitch
    By Linus in forum Snippets
    Replies: 15
    Last Post: 01-24-2012, 06:32 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
  •