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 { struct FAnimStep {
uint32 Hash; uint64 Hash;
std::string_view Body; std::string_view Body;
FAnimStep() : Hash(0), 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 { struct FAnimStoredStep {
@@ -43,7 +43,7 @@ struct FAnimStoredStep {
std::string Body; std::string Body;
FAnimStoredStep() : Hash(0), 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()) { for (int64 id : TangibleManager.GetNear()) {
TangibleManager.MakeTangible(id); TangibleManager.MakeTangible(id);
} }
IdArray live = TangibleManager.GetLive(); // Update animation queues of live tangibles.
StringViewVec aqueues = w.GetAnimationQueues(live); IdArray tanids = TangibleManager.GetLive();
for (int i = 0; i < aqueues.Num(); i++) { StringViewVec aqueues = w.GetAnimationQueues(tanids);
FString debugq = FAnimQueueDecoder::DebugString(aqueues[i]); for (int i = 0; i < tanids.Num(); i++) {
} uint64_t tanid = tanids[i];
// Tick all the tangibles. std::string_view aqueue = aqueues[i];
if (EngineSeconds > NextRotateCube) { UTangible* t = TangibleManager.GetTangible(tanid);
for (int i = 0; i < live.Num(); i++) { check(t != nullptr);
UTangible *t = TangibleManager.GetTangible(live[i]); t->AnimTracker.Update(aqueue);
check(t != nullptr);
ITangibleInterface::Execute_TurnFromCXX(t->Actor);
}
NextRotateCube += 0.5;
} }
} }