mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add intent-driven strafe animation selection and movement state hooks
This commit is contained in:
parent
871172d63e
commit
dfc29cad10
5 changed files with 105 additions and 18 deletions
|
|
@ -1165,6 +1165,26 @@ bool CharacterRenderer::getAnimationState(uint32_t instanceId, uint32_t& animati
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CharacterRenderer::hasAnimation(uint32_t instanceId, uint32_t animationId) const {
|
||||
auto it = instances.find(instanceId);
|
||||
if (it == instances.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto modelIt = models.find(it->second.modelId);
|
||||
if (modelIt == models.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& sequences = modelIt->second.data.sequences;
|
||||
for (const auto& seq : sequences) {
|
||||
if (seq.id == animationId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CharacterRenderer::attachWeapon(uint32_t charInstanceId, uint32_t attachmentId,
|
||||
const pipeline::M2Model& weaponModel, uint32_t weaponModelId,
|
||||
const std::string& texturePath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue