A few more steps toward anim queue handling

This commit is contained in:
2023-09-15 00:21:31 -04:00
parent afa0cfbe6d
commit 1bdaf47b23
2 changed files with 12 additions and 16 deletions

View File

@@ -31,11 +31,11 @@ enum EAnimValueType {
////////////////////////////////////////////////
struct FAnimStep {
uint32 Hash;
uint64 Hash;
std::string_view Body;
FAnimStep() : Hash(0), Body("") {}
FAnimStep(uint32 h, std::string_view b) : Hash(h), Body(b) {}
FAnimStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
};
struct FAnimStoredStep {
@@ -43,7 +43,7 @@ struct FAnimStoredStep {
std::string Body;
FAnimStoredStep() : Hash(0), Body("") {}
FAnimStoredStep(uint32 h, std::string_view b) : Hash(h), Body(b) {}
FAnimStoredStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
};
////////////////////////////////////////////////

View File

@@ -113,19 +113,15 @@ void AIntegrationGameModeBase::UpdateTangibles() {
for (int64 id : TangibleManager.GetNear()) {
TangibleManager.MakeTangible(id);
}
IdArray live = TangibleManager.GetLive();
StringViewVec aqueues = w.GetAnimationQueues(live);
for (int i = 0; i < aqueues.Num(); i++) {
FString debugq = FAnimQueueDecoder::DebugString(aqueues[i]);
}
// Tick all the tangibles.
if (EngineSeconds > NextRotateCube) {
for (int i = 0; i < live.Num(); i++) {
UTangible *t = TangibleManager.GetTangible(live[i]);
check(t != nullptr);
ITangibleInterface::Execute_TurnFromCXX(t->Actor);
}
NextRotateCube += 0.5;
// Update animation queues of live tangibles.
IdArray tanids = TangibleManager.GetLive();
StringViewVec aqueues = w.GetAnimationQueues(tanids);
for (int i = 0; i < tanids.Num(); i++) {
uint64_t tanid = tanids[i];
std::string_view aqueue = aqueues[i];
UTangible* t = TangibleManager.GetTangible(tanid);
check(t != nullptr);
t->AnimTracker.Update(aqueue);
}
}