[Scummvm-git-logs] scummvm master -> 08747054cdef79ce45ba3b008ccc1d794e442a72
mduggan
noreply at scummvm.org
Tue Mar 7 02:34:58 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
08747054cd TETRAEDGE: Fix character orientation calculation
Commit: 08747054cdef79ce45ba3b008ccc1d794e442a72
https://github.com/scummvm/scummvm/commit/08747054cdef79ce45ba3b008ccc1d794e442a72
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-03-07T11:34:17+09:00
Commit Message:
TETRAEDGE: Fix character orientation calculation
Changed paths:
engines/tetraedge/game/lua_binds.cpp
diff --git a/engines/tetraedge/game/lua_binds.cpp b/engines/tetraedge/game/lua_binds.cpp
index 749e47af820..80a5fe6dab3 100644
--- a/engines/tetraedge/game/lua_binds.cpp
+++ b/engines/tetraedge/game/lua_binds.cpp
@@ -867,10 +867,10 @@ static void SetCharacterOrientation(const Common::String &charname, float x, flo
Character *c = game->scene().character(charname);
if (c) {
const TeVector3f32 pos = c->_model->position();
- TeVector3f32 euler(0, atan2f(abs(x - pos.x()), y - pos.z()), 0);
+ const TeVector3f32 euler(0, atan2f(-(x - pos.x()), y - pos.z()), 0);
c->_model->setRotation(TeQuaternion::fromEuler(euler));
} else {
- warning("[SetCharacterRotation] Character not found %s", charname.c_str());
+ warning("[SetCharacterOrientation] Character not found %s", charname.c_str());
}
}
More information about the Scummvm-git-logs
mailing list