mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-25 20:02:40 +01:00
Remove string comparision from getFrameMatrix
This commit is contained in:
parent
602218579c
commit
3be84c02c1
@ -99,7 +99,8 @@ glm::mat4 Animator::getFrameMatrix(ModelFrame* frame, float alpha) const
|
||||
if(it != getAnimation()->bones.end()) {
|
||||
auto kf = it->second->getInterpolatedKeyframe(getAnimationTime(alpha));
|
||||
glm::mat4 m;
|
||||
if(it->second->type == AnimationBone::R00 || frame->getName() == "swaist") {
|
||||
bool isRoot = frame->getParent() ? !! frame->getParent() : true;
|
||||
if(it->second->type == AnimationBone::R00 || isRoot ) {
|
||||
m = glm::translate(m, frame->getDefaultTranslation());
|
||||
m = m * glm::mat4_cast(kf.rotation);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user