Thread: Glitchy torso

Results 1 to 7 of 7
  1. #1 Glitchy torso 
    Donator

    Join Date
    Nov 2012
    Posts
    773
    Thanks given
    45
    Thanks received
    42
    Rep Power
    18
    Ive had an issue with my neck being invisible when equiping fighter torso after adding 634 chars/items ect, I followed this
    [Only registered and activated users can see links. ]

    And messed around with the method479 and issue with invisible neck was solved but now have invisible patches on arms
    [Only registered and activated users can see links. ]

    Any help?

    Method479
    Code:
    	public final void method479(int i, int j, int k, int l, int i1, boolean flag) {
    		int j1 = (int) Math.sqrt(k * k + l * l + i1 * i1);
    		int k1 = j * j1 >> 8;
    		if (anIntArray1634 == null) {
    			anIntArray1634 = new int[anInt1630];
    			anIntArray1635 = new int[anInt1630];
    			anIntArray1636 = new int[anInt1630];
    		}
    		if (super.aClass33Array1425 == null) {
    			super.aClass33Array1425 = new Class33[anInt1626];
    			for (int l1 = 0; l1 < anInt1626; l1++)
    				super.aClass33Array1425[l1] = new Class33();
    
    		}
    		for (int i2 = 0; i2 < anInt1630; i2++) {
    			if (anIntArray1640 != null && anIntArray1639 != null)
    				if (anIntArray1640[i2] == 65535 //Most triangles
    					|| anIntArray1640[i2] == 0  //Black Triangles 633 Models, changed to 4 from 0 to fix zamorak cape and red mystic, but when it is 4, black dhides glitch out and if this whole line is commented out, godswords and saradomin sword will show a black triangle
    					|| anIntArray1640[i2] == 16705) //Nezzy Green Triangles//GWD White Triangles
    					anIntArray1639[i2] = 255;
    			int j2 = anIntArray1631[i2];
    			int l2 = anIntArray1632[i2];
    			int i3 = anIntArray1633[i2];
    			int j3 = anIntArray1627[l2] - anIntArray1627[j2];
    			int k3 = anIntArray1628[l2] - anIntArray1628[j2];
    			int l3 = anIntArray1629[l2] - anIntArray1629[j2];
    			int i4 = anIntArray1627[i3] - anIntArray1627[j2];
    			int j4 = anIntArray1628[i3] - anIntArray1628[j2];
    			int k4 = anIntArray1629[i3] - anIntArray1629[j2];
    			int l4 = k3 * k4 - j4 * l3;
    			int i5 = l3 * i4 - k4 * j3;
    			int j5;
    			for (j5 = j3 * j4 - i4 * k3; l4 > 8192 || i5 > 8192 || j5 > 8192
    			|| l4 < -8192 || i5 < -8192 || j5 < -8192; j5 >>= 1) {
    				l4 >>= 1;
    			i5 >>= 1;
    			}
    
    			int k5 = (int) Math.sqrt(l4 * l4 + i5 * i5 + j5 * j5);
    			if (k5 <= 0)
    				k5 = 1;
    			l4 = (l4 * 256) / k5;
    			i5 = (i5 * 256) / k5;
    			j5 = (j5 * 256) / k5;
    
    			if (anIntArray1637 == null || (anIntArray1637[i2] & 1) == 0) {
    
    				Class33 class33_2 = super.aClass33Array1425[j2];
    				class33_2.anInt602 += l4;
    				class33_2.anInt603 += i5;
    				class33_2.anInt604 += j5;
    				class33_2.anInt605++;
    				class33_2 = super.aClass33Array1425[l2];
    				class33_2.anInt602 += l4;
    				class33_2.anInt603 += i5;
    				class33_2.anInt604 += j5;
    				class33_2.anInt605++;
    				class33_2 = super.aClass33Array1425[i3];
    				class33_2.anInt602 += l4;
    				class33_2.anInt603 += i5;
    				class33_2.anInt604 += j5;
    				class33_2.anInt605++;
    
    			} else {
    
    				int l5 = i + (k * l4 + l * i5 + i1 * j5) / (k1 + k1 / 2);
    				anIntArray1634[i2] = method481(anIntArray1640[i2], l5,
    						anIntArray1637[i2]);
    
    			}
    		}
    
    		if (flag) {
    			method480(i, k1, k, l, i1);
    		} else {
    			aClass33Array1660 = new Class33[anInt1626];
    			for (int k2 = 0; k2 < anInt1626; k2++) {
    				Class33 class33 = super.aClass33Array1425[k2];
    				Class33 class33_1 = aClass33Array1660[k2] = new Class33();
    				class33_1.anInt602 = class33.anInt602;
    				class33_1.anInt603 = class33.anInt603;
    				class33_1.anInt604 = class33.anInt604;
    				class33_1.anInt605 = class33.anInt605;
    			}
    
    		}
    		if (flag) {
    			method466();
    			return;
    		} else {
    			method468(21073);
    			return;
    		}
    	}
    Code:
    public Model(int modelId) {
    		byte[] is = aClass21Array1661[modelId].aByteArray368;
    		if (is[is.length - 1] == -1 && is[is.length - 2] == -1)
    			read622Model(is, modelId);
    		else
    			readOldModel(modelId);
    		if (newmodel[modelId]) {
    	        scale2(2);
    	        method475(0, 6, 0);
    	        }
    	}
    
        public void scale2(int i) {
            for (int i1 = 0; i1 < anInt1626; i1++) {
                    anIntArray1627[i1] = anIntArray1627[i1] >> i;
                    anIntArray1628[i1] = anIntArray1628[i1] >> i;
                    anIntArray1629[i1] = anIntArray1629[i1] >> i;
            }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Sep 2018
    Posts
    24
    Thanks given
    5
    Thanks received
    16
    Rep Power
    20
    Should try double checking your itemdef readvalues
    Reply With Quote  
     

  3. #3  
    Donator

    Join Date
    Nov 2012
    Posts
    773
    Thanks given
    45
    Thanks received
    42
    Rep Power
    18
    Quote Originally Posted by Guardian_ View Post
    Should try double checking your itemdef readvalues
    Thanks for your reply. Im almost certain this is a issue with model.java
    Readvalues here tho.
    Code:
    private void readValues(Stream stream) {
    		do {
    			int i = stream.readUnsignedByte();
    			if (i == 0)
    				return;
    			if (i == 1) {
    				modelID = stream.readUnsignedWord();
    			} else if (i == 2)
    				name = stream.readString();
    			else if (i == 3)
    				description = stream.readBytes();
    			else if (i == 4)
    				modelZoom = stream.readUnsignedWord();
    			else if (i == 5)
    				modelRotation1 = stream.readUnsignedWord();
    			else if (i == 6)
    				modelRotation2 = stream.readUnsignedWord();
    			else if (i == 7) {
    				modelOffset1 = stream.readUnsignedWord();
    				if (modelOffset1 > 32767)
    					modelOffset1 -= 0x10000;
    			} else if (i == 8) {
    				modelOffset2 = stream.readUnsignedWord();
    				if (modelOffset2 > 32767)
    					modelOffset2 -= 0x10000;
    			} else if (i == 10)
    				stream.readUnsignedWord();
    			else if (i == 11)
    				stackable = true;
    			else if (i == 12)
    				value = stream.readUnsignedWord();
    			else if (i == 16)
    				membersObject = true;
    			else if (i == 23) {
    				maleEquip1 = stream.readUnsignedWord();
    				aByte205 = stream.readSignedByte();
    			} else if (i == 24)
    				maleEquip2 = stream.readUnsignedWord();
    			else if (i == 25) {
    				femaleEquip1 = stream.readUnsignedWord();
    				aByte154 = stream.readSignedByte();
    			} else if (i == 26)
    				femaleEquip2 = stream.readUnsignedWord();
    			else if (i >= 30 && i < 35) {
    				if (groundActions == null)
    					groundActions = new String[5];
    				groundActions[i - 30] = stream.readString();
    				if (groundActions[i - 30].equalsIgnoreCase("hidden"))
    					groundActions[i - 30] = null;
    			} else if (i >= 35 && i < 40) {
    				if (actions == null)
    					actions = new String[5];
    				actions[i - 35] = stream.readString();
    				if (actions[i - 35].equalsIgnoreCase("null"))
    					actions[i - 35] = null;
    			} else if (i == 40) {
    				int j = stream.readUnsignedByte();
    				originalModelColors = new int[j];
    				modifiedModelColors = new int[j];
    				for (int k = 0; k < j; k++) {
    					originalModelColors[k] = stream.readUnsignedWord();
    					modifiedModelColors[k] = stream.readUnsignedWord();
    				}
    			} else if (i == 78)
    				anInt185 = stream.readUnsignedWord();
    			else if (i == 79)
    				anInt162 = stream.readUnsignedWord();
    			else if (i == 90)
    				anInt175 = stream.readUnsignedWord();
    			else if (i == 91)
    				anInt197 = stream.readUnsignedWord();
    			else if (i == 92)
    				anInt166 = stream.readUnsignedWord();
    			else if (i == 93)
    				anInt173 = stream.readUnsignedWord();
    			else if (i == 95)
    				anInt204 = stream.readUnsignedWord();
    			else if (i == 97)
    				certID = stream.readUnsignedWord();
    			else if (i == 98)
    				certTemplateID = stream.readUnsignedWord();
    			else if (i >= 100 && i < 110) {
    				if (stackIDs == null) {
    					stackIDs = new int[10];
    					stackAmounts = new int[10];
    				}
    				stackIDs[i - 100] = stream.readUnsignedWord();
    				stackAmounts[i - 100] = stream.readUnsignedWord();
    			} else if (i == 110)
    				anInt167 = stream.readUnsignedWord();
    			else if (i == 111)
    				anInt192 = stream.readUnsignedWord();
    			else if (i == 112)
    				anInt191 = stream.readUnsignedWord();
    			else if (i == 113)
    				anInt196 = stream.readSignedByte();
    			else if (i == 114)
    				anInt184 = stream.readSignedByte() * 5;
    			else if (i == 115)
    				team = stream.readUnsignedByte();
    			else if (i == 116)
    				lendID = stream.readUnsignedWord();
    			else if (i == 117)
    				lentItemID = stream.readUnsignedWord();
    		} while (true);
    	}
    Reply With Quote  
     

  4. #4  
    Donator Market Banned Market Banned


    Dust R I P's Avatar
    Join Date
    Jan 2008
    Posts
    2,529
    Thanks given
    166
    Thanks received
    188
    Rep Power
    571
    You're not loading a 634 fighter torso model. That's clearly a Pre-HD model..
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Nov 2012
    Posts
    773
    Thanks given
    45
    Thanks received
    42
    Rep Power
    18
    Quote Originally Posted by Dust R I P View Post
    You're not loading a 634 fighter torso model. That's clearly a Pre-HD model..
    Im using a 317 Pi With 634 items not seen this issue with other 317s?
    Reply With Quote  
     

  6. #6  
    Donator Market Banned Market Banned


    Dust R I P's Avatar
    Join Date
    Jan 2008
    Posts
    2,529
    Thanks given
    166
    Thanks received
    188
    Rep Power
    571
    Quote Originally Posted by Relentless View Post
    Im using a 317 Pi With 634 items not seen this issue with other 317s?
    I understand, but you're loading the pre 500 figher torso model.
    Reply With Quote  
     

  7. #7  
    Donator

    Join Date
    Nov 2012
    Posts
    773
    Thanks given
    45
    Thanks received
    42
    Rep Power
    18
    Quote Originally Posted by Dust R I P View Post
    I understand, but you're loading the pre 500 figher torso model.
    Thanks for your help so far. Do you know what the male and female model ids are?
    I used the 634 data from the data release thread does it use the old model or summet?
    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. Fighter Torso n Other Plates Glitchy Arms
    By WeLoveSoulXile in forum Help
    Replies: 6
    Last Post: 12-09-2014, 02:59 AM
  2. Torso, D helm, And Skill Cape Codes!
    By Jairiya in forum Tutorials
    Replies: 21
    Last Post: 06-22-2008, 11:13 PM
  3. torso minigame
    By Crysis in forum Tutorials
    Replies: 12
    Last Post: 09-16-2007, 05:00 PM
  4. Replies: 10
    Last Post: 09-15-2007, 10:14 AM
  5. My first tut -* torso game*-
    By Barkyboy 007 in forum Tutorials
    Replies: 12
    Last Post: 09-04-2007, 11:37 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
  •