aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Model/XSMLoader.gd
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-09-17 21:38:13 +0200
committer GitHub <noreply@github.com>2024-09-17 21:38:13 +0200
commit110a6ad29fb84e4507698897e97aab3f36b24242 (patch)
tree0a4cfae4a54c7b8499f66a695ed38f836c574c4e /game/src/Game/Model/XSMLoader.gd
parentc1aeff2ceb179155e49ed9a518956ec85d5ac6cf (diff)
parent0c301c66a028c2e006c0e26378d83db113d19310 (diff)
Merge pull request #273 from Nemrav/model_fixes
Model loader Fixes
Diffstat (limited to 'game/src/Game/Model/XSMLoader.gd')
-rw-r--r--game/src/Game/Model/XSMLoader.gd10
1 files changed, 4 insertions, 6 deletions
diff --git a/game/src/Game/Model/XSMLoader.gd b/game/src/Game/Model/XSMLoader.gd
index 332bbec..bc85f9b 100644
--- a/game/src/Game/Model/XSMLoader.gd
+++ b/game/src/Game/Model/XSMLoader.gd
@@ -46,7 +46,8 @@ static func _load_xsm_animation(source_file : String) -> Animation:
0xC9: #Metadata
metadataChunk = readMetadataChunk(file)
0xCA: #Bone Animation
- boneAnimationChunks.push_back(readBoneAnimationChunk(file, metadataChunk.use_quat_16()))
+ # v1 is float32 quaternions, v2 is int16 quaternions
+ boneAnimationChunks.push_back(readBoneAnimationChunk(file, version == 2))
_:
push_error(">> INVALID XSM CHUNK TYPE %X" % type)
break
@@ -155,11 +156,8 @@ class MetadataChunk:
func debugPrint() -> void:
print("FileName: %s, sourceApp: %s, exportDate: %s, ExporterV:%d.%d" %
[origFileName, sourceApp, exportDate, exporterMajorVersion, exporterMinorVersion])
- print("MotionName: %s, fps: %d, MaxError: %s, Use 16-bit int Quaternions?:%s" %
- [motionName, fps, fMaxAcceptableError, use_quat_16()])
-
- func use_quat_16() -> bool:
- return pad == 0x0
+ print("MotionName: %s, fps: %d, MaxError: %s" %
+ [motionName, fps, fMaxAcceptableError])
static func readPosKey(file : FileAccess) -> PosKey:
return PosKey.new(FileAccessUtils.read_pos(file), file.get_float())