mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-06 02:05:30 +01:00
Fix interpolating to identity bone overrides (#16609)
The previous code immediately dropped identity overrides, even if there still was an interpolation to be done. Also a little bit of cleanup, and setting an appropriate identity default for the scale property when interpolating. For modders: As a workaround, you can add a tiny offset so that overrides aren't identity overrides.
This commit is contained in:
@@ -312,9 +312,9 @@ std::string UnitSAO::generateUpdateBoneOverrideCommand(
|
||||
props.rotation.next.toEuler(euler_rot);
|
||||
writeV3F32(os, euler_rot * core::RADTODEG);
|
||||
writeV3F32(os, props.scale.vector);
|
||||
writeF32(os, props.position.interp_timer);
|
||||
writeF32(os, props.rotation.interp_timer);
|
||||
writeF32(os, props.scale.interp_timer);
|
||||
writeF32(os, props.position.interp_duration);
|
||||
writeF32(os, props.rotation.interp_duration);
|
||||
writeF32(os, props.scale.interp_duration);
|
||||
writeU8(os, (props.position.absolute & 1) << 0
|
||||
| (props.rotation.absolute & 1) << 1
|
||||
| (props.scale.absolute & 1) << 2);
|
||||
|
||||
Reference in New Issue
Block a user