Update to new API

This commit is contained in:
wincent
2024-01-16 21:46:44 +01:00
parent a91cf3adc7
commit 7b7c0622b3
8 changed files with 35 additions and 157 deletions

View File

@@ -82,6 +82,7 @@
#include "CollectibleComponent.h"
#include "ItemComponent.h"
#include "GhostComponent.h"
#include "Recorder.h"
// Table includes
#include "CDComponentsRegistryTable.h"
@@ -2142,4 +2143,18 @@ void Entity::ProcessPositionUpdate(PositionUpdate& update) {
Game::entityManager->QueueGhostUpdate(GetObjectID());
if (updateChar) Game::entityManager->SerializeEntity(this);
auto* recorder = Cinema::Recording::Recorder::GetRecorder(GetObjectID());
if (recorder != nullptr) {
recorder->AddRecord(new Cinema::Recording::MovementRecord(
update.position,
update.rotation,
update.velocity,
update.angularVelocity,
update.onGround,
update.velocity != NiPoint3::ZERO,
update.angularVelocity != NiPoint3::ZERO
));
}
}