mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Update to new API
This commit is contained in:
@@ -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
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,11 @@
|
||||
set(DGAME_DCINEMA_SOURCES "Recorder.cpp"
|
||||
"Prefab.cpp"
|
||||
"Scene.cpp"
|
||||
"Play.cpp"
|
||||
PARENT_SCOPE)
|
||||
"Play.cpp")
|
||||
|
||||
add_library(dCinema STATIC ${DGAME_DCINEMA_SOURCES})
|
||||
target_precompile_headers(dCinema REUSE_FROM dGameBase)
|
||||
target_link_libraries(dCinema
|
||||
PUBLIC dPhysics dDatabase
|
||||
INTERFACE dUtilities dCommon dBehaviors dChatFilter dMission dInventory dComponents
|
||||
)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#include "../../dWorldServer/ObjectIDManager.h"
|
||||
#include "ObjectIDManager.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "RenderComponent.h"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include "ControllablePhysicsComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "InventoryComponent.h"
|
||||
#include "../dWorldServer/ObjectIDManager.h"
|
||||
#include "ObjectIDManager.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "EntityManager.h"
|
||||
#include "EntityInfo.h"
|
||||
@@ -679,7 +679,7 @@ EquipRecord::EquipRecord(LOT item) {
|
||||
void EquipRecord::Act(Entity* actor) {
|
||||
auto* inventoryComponent = actor->GetComponent<InventoryComponent>();
|
||||
|
||||
const LWOOBJID id = ObjectIDManager::Instance()->GenerateObjectID();
|
||||
const LWOOBJID id = ObjectIDManager::GenerateObjectID();
|
||||
|
||||
const auto& info = Inventory::FindItemComponent(item);
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include "EntityInfo.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "dConfig.h"
|
||||
#include "PlayerManager.h"
|
||||
|
||||
using namespace Cinema;
|
||||
|
||||
@@ -153,7 +154,7 @@ void Cinema::Scene::CheckForShowings() {
|
||||
|
||||
// I don't care
|
||||
Game::entityManager->GetZoneControlEntity()->AddCallbackTimer(1.0f, [this]() {
|
||||
for (auto* player : Player::GetAllPlayers()) {
|
||||
for (auto* player : PlayerManager::GetAllPlayers()) {
|
||||
if (m_Audience.find(player->GetObjectID()) != m_Audience.end()) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ set(DGAME_DUTILITIES_SOURCES "BrickDatabase.cpp"
|
||||
"Preconditions.cpp"
|
||||
"SlashCommandHandler.cpp"
|
||||
"ServerPreconditions.cpp"
|
||||
"VanityUtilities.cpp" PARENT_SCOPE)
|
||||
"VanityUtilities.cpp")
|
||||
|
||||
add_library(dUtilities STATIC ${DGAME_DUTILITIES_SOURCES})
|
||||
target_precompile_headers(dUtilities REUSE_FROM dGameBase)
|
||||
|
Reference in New Issue
Block a user