mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Breakout rest of the enums from dCommonVars and clean it up (#1061)
* Breakout rest of the enums from dcommonvars so we don't have to deal with merge conflicts ePlayerFlags is not a scoped enum, yet, due to it's complexity * address feedback * make player flag types consistent * fix typo
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "eObjectBits.h"
|
||||
#include "eGameMasterLevel.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eReplicaPacketType.h"
|
||||
|
||||
EntityManager* EntityManager::m_Address = nullptr;
|
||||
|
||||
@@ -197,8 +198,8 @@ void EntityManager::UpdateEntities(const float deltaTime) {
|
||||
stream.Write(static_cast<char>(ID_REPLICA_MANAGER_SERIALIZE));
|
||||
stream.Write(static_cast<unsigned short>(entity->GetNetworkId()));
|
||||
|
||||
entity->WriteBaseReplicaData(&stream, PACKET_TYPE_SERIALIZATION);
|
||||
entity->WriteComponents(&stream, PACKET_TYPE_SERIALIZATION);
|
||||
entity->WriteBaseReplicaData(&stream, eReplicaPacketType::SERIALIZATION);
|
||||
entity->WriteComponents(&stream, eReplicaPacketType::SERIALIZATION);
|
||||
|
||||
if (entity->GetIsGhostingCandidate()) {
|
||||
for (auto* player : Player::GetAllPlayers()) {
|
||||
@@ -218,9 +219,9 @@ void EntityManager::UpdateEntities(const float deltaTime) {
|
||||
if (!entity) continue;
|
||||
|
||||
if (entity->GetScheduledKiller()) {
|
||||
entity->Smash(entity->GetScheduledKiller()->GetObjectID(), SILENT);
|
||||
entity->Smash(entity->GetScheduledKiller()->GetObjectID(), eKillType::SILENT);
|
||||
} else {
|
||||
entity->Smash(LWOOBJID_EMPTY, SILENT);
|
||||
entity->Smash(LWOOBJID_EMPTY, eKillType::SILENT);
|
||||
}
|
||||
}
|
||||
m_EntitiesToKill.clear();
|
||||
@@ -352,8 +353,8 @@ void EntityManager::ConstructEntity(Entity* entity, const SystemAddress& sysAddr
|
||||
stream.Write(true);
|
||||
stream.Write(static_cast<unsigned short>(entity->GetNetworkId()));
|
||||
|
||||
entity->WriteBaseReplicaData(&stream, PACKET_TYPE_CONSTRUCTION);
|
||||
entity->WriteComponents(&stream, PACKET_TYPE_CONSTRUCTION);
|
||||
entity->WriteBaseReplicaData(&stream, eReplicaPacketType::CONSTRUCTION);
|
||||
entity->WriteComponents(&stream, eReplicaPacketType::CONSTRUCTION);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) {
|
||||
if (skipChecks) {
|
||||
|
Reference in New Issue
Block a user