Skip to content

Commit

Permalink
Update Chunks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Dec 4, 2023
1 parent 3856d7a commit 3db661a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,17 @@ def PROP(chunk, rbxm):
matricies=createTable(sizeof)
for i in range(sizeof):
rawOrientation=ord(buffer.read())
if rawOrientation > 0:
if rawOrientation>0:
orientID = rawOrientation - 1
R0=Vector3.fromNormalId(orientID // 6)
R1=Vector3.fromNormalId(orientID % 6)
R2=R0.Cross(R1)
R0=orientID // 6
R1=orientID % 6
R2=[R0,R1]
matricies[i]=[R0, R1, R2]
else:
r00, r01, r02=buffer.readNumber("<f"), buffer.readNumber("<f"), buffer.readNumber("<f")
r10, r11, r12=buffer.readNumber("<f"), buffer.readNumber("<f"), buffer.readNumber("<f")
r20, r21, r22=buffer.readNumber("<f"), buffer.readNumber("<f"), buffer.readNumber("<f")
matricies[i]=[r00, r10, r20,r01, r11, r21,r02, r12, r22]
matricies[i]=[r00, r10, r20, r01, r11, r21, r02, r12, r22]
##endif
##end
elif (typeID=0x11):
Expand All @@ -206,13 +206,14 @@ def PROP(chunk, rbxm):
'z': buffer.readNumber("<f"),
'w': buffer.readNumber("<f")
})
##end
cfX=basicTypes.RbxF32Array(buffer, sizeof)
cfY=basicTypes.RbxF32Array(buffer, sizeof)
cfZ=basicTypes.RbxF32Array(buffer, sizeof)
properties=[]
for i in range(sizeof):
q=quaternions[i-1]
properties[i-1]=(CFrame.new(cfX[i], cfY[i], cfZ[i], q['x'], q['y'], q['z'], q['w']))
properties.append([cfX[i], cfY[i], cfZ[i], q['x'], q['y'], q['z'], q['w']])
##end
##endif
##end
Expand Down

0 comments on commit 3db661a

Please sign in to comment.