summaryrefslogtreecommitdiff
path: root/extractor/rsm_format.gd
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/rsm_format.gd')
-rw-r--r--extractor/rsm_format.gd12
1 files changed, 6 insertions, 6 deletions
diff --git a/extractor/rsm_format.gd b/extractor/rsm_format.gd
index c01826e..7f16368 100644
--- a/extractor/rsm_format.gd
+++ b/extractor/rsm_format.gd
@@ -92,17 +92,17 @@ static func from_bytes(bytes: ByteStream) -> RSMFormat:
rsm_format.texture_names = [] as Array[String]
for _n in rsm_format.texture_count:
- rsm_format.texture_names.append(bytes.get_string_from_ascii(40))
+ rsm_format.texture_names.append(bytes.get_string_from_ro(40))
if version.lower_than(2, 2):
- rsm_format.root_node_name = bytes.get_string_from_ascii(40)
+ rsm_format.root_node_name = bytes.get_string_from_ro(40)
if version.higher_than(2, 1): # >= 2.2
rsm_format.root_node_count = bytes.decode_u32()
rsm_format.root_node_names = [] as Array[String]
for _n in rsm_format.root_node_count:
- rsm_format.root_node_names.append(bytes.get_string_from_ascii(40))
+ rsm_format.root_node_names.append(bytes.get_string_from_ro(40))
rsm_format.node_count = bytes.decode_u32()
rsm_format.nodes = [] as Array[ModelNode]
@@ -253,7 +253,7 @@ class ModelNode:
var node = ModelNode.new()
node.node_name = bytes.get_string_from_utf8(40)
- node.parent_node_name = bytes.get_string_from_ascii(40)
+ node.parent_node_name = bytes.get_string_from_ro(40)
if version.lower_than(2, 3): # < 2.3
node.texture_count = bytes.decode_u32()
@@ -267,7 +267,7 @@ class ModelNode:
node.texture_names = [] as Array[String]
for _n in node.texture_name_count:
- node.texture_names.append(bytes.get_string_from_ascii(40))
+ node.texture_names.append(bytes.get_string_from_ro(40))
node.offset_matrix = [] as Array[Vector3]
for _in in 3:
@@ -362,7 +362,7 @@ class ModelNode:
node.translate(translation_2)
if rotation_axis != Vector3.ZERO:
- node.rotation = rotation_axis * rotation_angle
+ node.rotation = (rotation_axis * rotation_angle) * Vector3(1,-1,1)
node.scale = scale