Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup

This commit is contained in:
David Markowitz
2023-05-13 16:16:58 -07:00
319 changed files with 4872 additions and 4158 deletions

View File

@@ -18,7 +18,7 @@ void AmBlueX::OnSkillEventFired(Entity* self, Entity* caster, const std::string&
auto* character = caster->GetCharacter();
if (character != nullptr) {
character->SetPlayerFlag(self->GetVar<int32_t>(m_FlagVariable), true);
character->SetPlayerFlag(self->GetVar<uint32_t>(m_FlagVariable), true);
}
EntityInfo info{};

View File

@@ -24,5 +24,5 @@ void AmBridge::OnTimerDone(Entity* self, std::string timerName) {
return;
}
self->Smash(self->GetObjectID(), VIOLENT);
self->Smash(self->GetObjectID(), eKillType::VIOLENT);
}

View File

@@ -1,6 +1,6 @@
#include "AmConsoleTeleportServer.h"
#include "ChooseYourDestinationNsToNt.h"
#include "AMFFormat.h"
#include "Amf3.h"
void AmConsoleTeleportServer::OnStartup(Entity* self) {
self->SetVar(u"teleportAnim", m_TeleportAnim);

View File

@@ -2,6 +2,7 @@
#include "EntityManager.h"
#include "GameMessages.h"
#include "SimplePhysicsComponent.h"
#include "eTerminateType.h"
void AmDrawBridge::OnStartup(Entity* self) {
self->SetNetworkVar(u"InUse", false);
@@ -25,7 +26,7 @@ void AmDrawBridge::OnUse(Entity* self, Entity* user) {
auto* player = user;
GameMessages::SendTerminateInteraction(player->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
GameMessages::SendTerminateInteraction(player->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
}
void AmDrawBridge::OnTimerDone(Entity* self, std::string timerName) {

View File

@@ -12,7 +12,7 @@ void AmDropshipComputer::OnStartup(Entity* self) {
void AmDropshipComputer::OnUse(Entity* self, Entity* user) {
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
if (rebuildComponent == nullptr || rebuildComponent->GetState() != REBUILD_COMPLETED) {
if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) {
return;
}
@@ -27,7 +27,7 @@ void AmDropshipComputer::OnUse(Entity* self, Entity* user) {
return;
}
inventoryComponent->AddItem(m_NexusTalonDataCard, 1, eLootSourceType::LOOT_SOURCE_NONE);
inventoryComponent->AddItem(m_NexusTalonDataCard, 1, eLootSourceType::NONE);
}
void AmDropshipComputer::OnDie(Entity* self, Entity* killer) {
@@ -76,7 +76,7 @@ void AmDropshipComputer::OnTimerDone(Entity* self, std::string timerName) {
return;
}
if (timerName == "reset" && rebuildComponent->GetState() == REBUILD_OPEN) {
self->Smash(self->GetObjectID(), SILENT);
if (timerName == "reset" && rebuildComponent->GetState() == eRebuildState::OPEN) {
self->Smash(self->GetObjectID(), eKillType::SILENT);
}
}

View File

@@ -176,7 +176,7 @@ void AmShieldGeneratorQuickbuild::BuffPlayers(Entity* self) {
void AmShieldGeneratorQuickbuild::EnemyEnteredShield(Entity* self, Entity* intruder) {
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
if (rebuildComponent == nullptr || rebuildComponent->GetState() != REBUILD_COMPLETED) {
if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) {
return;
}

View File

@@ -6,6 +6,7 @@
#include "MissionComponent.h"
#include "EntityInfo.h"
#include "RenderComponent.h"
#include "eStateChangeType.h"
void AmSkullkinDrill::OnStartup(Entity* self) {
self->SetNetworkVar(u"bIsInUse", false);
@@ -247,7 +248,7 @@ void AmSkullkinDrill::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
}
}
self->Smash(attacker->GetObjectID(), SILENT);
self->Smash(attacker->GetObjectID(), eKillType::SILENT);
self->CancelAllTimers();
@@ -265,7 +266,7 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) {
auto* child = EntityManager::Instance()->GetEntity(childID);
if (child != nullptr) {
child->Smash(self->GetObjectID(), SILENT);
child->Smash(self->GetObjectID(), eKillType::SILENT);
}
self->SetNetworkVar(u"bIsInUse", false);

View File

@@ -2,6 +2,7 @@
#include "InventoryComponent.h"
#include "GameMessages.h"
#include "Item.h"
#include "eTerminateType.h"
void AmTeapotServer::OnUse(Entity* self, Entity* user) {
auto* inventoryComponent = user->GetComponent<InventoryComponent>();
@@ -18,5 +19,5 @@ void AmTeapotServer::OnUse(Entity* self, Entity* user) {
blueFlowerItem->SetCount(blueFlowerItem->GetCount() - 10);
inventoryComponent->AddItem(WU_S_IMAGINATION_TEA, 1);
}
GameMessages::SendTerminateInteraction(user->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
}