summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/3d/skeleton.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index ef60a2151d..aaa378bb68 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -160,14 +160,14 @@ void Skeleton::_notification(int p_what) {
//if moved, just update transforms
VisualServer *vs = VisualServer::get_singleton();
- Bone *bonesptr = &bones[0];
+ const Bone *bonesptr = bones.ptr();
int len = bones.size();
Transform global_transform = get_global_transform();
Transform global_transform_inverse = global_transform.affine_inverse();
for (int i = 0; i < len; i++) {
- Bone &b = bonesptr[i];
+ const Bone &b = bonesptr[i];
vs->skeleton_bone_set_transform(skeleton, i, global_transform * (b.transform_final * global_transform_inverse));
}
} break;