mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
Warning fixes and small bug fix to anim stats
This commit is contained in:
parent
29de8a8d9f
commit
c35640f739
3 changed files with 16 additions and 5 deletions
|
@ -118,7 +118,7 @@ void AnimStats::updateStats(bool force) {
|
|||
|
||||
auto prevIter = _prevDebugAlphaMap.find(key);
|
||||
if (prevIter != _prevDebugAlphaMap.end()) {
|
||||
float prevAlpha = std::get<0>(iter.second);
|
||||
float prevAlpha = std::get<0>(prevIter->second);
|
||||
if (prevAlpha != alpha) {
|
||||
// change detected: reset timer
|
||||
_animAlphaValueChangedTimers[key] = now;
|
||||
|
|
|
@ -54,22 +54,22 @@ const AnimPoseVec& AnimBlendDirectional::evaluate(const AnimVariantMap& animVars
|
|||
if (_alpha.x > 0.0f) {
|
||||
if (_alpha.y > 0.0f) {
|
||||
// quadrant 0
|
||||
indices = { _childIndices[0][2], _childIndices[0][1], _childIndices[1][1], _childIndices[1][2] };
|
||||
indices = {{_childIndices[0][2], _childIndices[0][1], _childIndices[1][1], _childIndices[1][2]}};
|
||||
} else {
|
||||
// quadrant 3
|
||||
indices = { _childIndices[1][2], _childIndices[1][1], _childIndices[2][1], _childIndices[2][2] };
|
||||
indices = {{_childIndices[1][2], _childIndices[1][1], _childIndices[2][1], _childIndices[2][2]}};
|
||||
// shift alpha up so both alpha.x and alpha.y are in the (0, 1) range.
|
||||
alpha.y += 1.0f;
|
||||
}
|
||||
} else {
|
||||
if (_alpha.y > 0.0f) {
|
||||
// quadrant 1
|
||||
indices = { _childIndices[0][1], _childIndices[0][0], _childIndices[1][0], _childIndices[1][1] };
|
||||
indices = {{_childIndices[0][1], _childIndices[0][0], _childIndices[1][0], _childIndices[1][1]}};
|
||||
// shift alpha right so both alpha.x and alpha.y are in the (0, 1) range.
|
||||
alpha.x += 1.0f;
|
||||
} else {
|
||||
// quadrant 2
|
||||
indices = { _childIndices[1][1], _childIndices[1][0], _childIndices[2][0], _childIndices[2][1] };
|
||||
indices = {{_childIndices[1][1], _childIndices[1][0], _childIndices[2][0], _childIndices[2][1]}};
|
||||
// shift alpha up and right so both alpha.x and alpha.y are in the (0, 1) range.
|
||||
alpha.x += 1.0f;
|
||||
alpha.y += 1.0f;
|
||||
|
@ -98,6 +98,14 @@ const AnimPoseVec& AnimBlendDirectional::evaluate(const AnimVariantMap& animVars
|
|||
_poses.resize(minSize);
|
||||
blend4(minSize, &poseVecs[0][0], &poseVecs[1][0], &poseVecs[2][0], &poseVecs[3][0], &alphas[0], &_poses[0]);
|
||||
|
||||
// animation stack debug stats
|
||||
for (int i = 0; i < 9; i++) {
|
||||
context.setDebugAlpha(_children[i]->getID(), 0.0f, _children[i]->getType());
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
context.setDebugAlpha(_children[indices[i]]->getID(), alphas[i] * parentDebugAlpha, _children[indices[i]]->getType());
|
||||
}
|
||||
|
||||
} else {
|
||||
for (auto&& pose : _poses) {
|
||||
pose = AnimPose::identity;
|
||||
|
|
|
@ -171,6 +171,8 @@ void ClientTraitsHandler::processTraitOverride(QSharedPointer<ReceivedMessage> m
|
|||
return;
|
||||
}
|
||||
|
||||
// AJT: DON'T CHECK THIS IN, disable model URL overrides.
|
||||
/*
|
||||
// only accept an override if this is for a trait type we override
|
||||
// and the version matches what we last sent for skeleton
|
||||
if (traitType == AvatarTraits::SkeletonModelURL
|
||||
|
@ -192,6 +194,7 @@ void ClientTraitsHandler::processTraitOverride(QSharedPointer<ReceivedMessage> m
|
|||
} else {
|
||||
message->seek(message->getPosition() + traitBinarySize);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue