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:
Aaron Kimbrell
2023-05-02 17:39:21 -05:00
committed by GitHub
parent e8590a5853
commit 6aa90ad5b2
161 changed files with 960 additions and 776 deletions

View File

@@ -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) {