aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Model/XSMLoader.gd
diff options
context:
space:
mode:
author Nemrav <>2024-09-16 21:22:49 +0200
committer Nemrav <>2024-09-16 21:22:49 +0200
commit0c301c66a028c2e006c0e26378d83db113d19310 (patch)
treef9c33d70827260310e5fb05aa870255f52e2d553 /game/src/Game/Model/XSMLoader.gd
parentdc0b0ede2368b43ab6c91a5e24d76ec34e91cf46 (diff)
fix unit culling and arab helmet
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())