Merge remote-tracking branch 'upstream/main' into first-draft-leaderboard-re-write

This commit is contained in:
EmosewaMC
2023-05-30 04:11:53 -07:00
177 changed files with 3066 additions and 3101 deletions

View File

@@ -5,6 +5,8 @@
#include "PhantomPhysicsComponent.h"
#include "RenderComponent.h"
#include "eReplicaComponentType.h"
#include "RenderComponent.h"
#include "Entity.h"
void AgFans::OnStartup(Entity* self) {
self->SetVar<bool>(u"alive", true);
@@ -34,7 +36,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
if (fanVolumes.size() == 0 || !self->GetVar<bool>(u"alive")) return;
if (self->GetVar<bool>(u"on")) {
GameMessages::SendPlayAnimation(self, u"fan-off");
RenderComponent::PlayAnimation(self, u"fan-off");
renderComponent->StopEffect("fanOn");
self->SetVar<bool>(u"on", false);
@@ -46,11 +48,11 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
EntityManager::Instance()->SerializeEntity(volume);
if (!hit) {
Entity* fxObj = EntityManager::Instance()->GetEntitiesInGroup(fanGroup + "fx")[0];
GameMessages::SendPlayAnimation(fxObj, u"trigger");
RenderComponent::PlayAnimation(fxObj, u"trigger");
}
}
} else if (!self->GetVar<bool>(u"on") && self->GetVar<bool>(u"alive")) {
GameMessages::SendPlayAnimation(self, u"fan-on");
RenderComponent::PlayAnimation(self, u"fan-on");
renderComponent->PlayEffect(495, u"fanOn", "fanOn");
self->SetVar<bool>(u"on", true);
@@ -62,7 +64,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
EntityManager::Instance()->SerializeEntity(volume);
if (!hit) {
Entity* fxObj = EntityManager::Instance()->GetEntitiesInGroup(fanGroup + "fx")[0];
GameMessages::SendPlayAnimation(fxObj, u"idle");
RenderComponent::PlayAnimation(fxObj, u"idle");
}
}
}

View File

@@ -3,6 +3,7 @@
#include "EntityManager.h"
#include "SkillComponent.h"
#include "eReplicaComponentType.h"
#include "RenderComponent.h"
void AgJetEffectServer::OnUse(Entity* self, Entity* user) {
if (inUse || self->GetLOT() != 6859) return;
@@ -23,7 +24,7 @@ void AgJetEffectServer::OnRebuildComplete(Entity* self, Entity* target) {
if (self->GetLOT() != 6209) return;
auto entities = EntityManager::Instance()->GetEntitiesInGroup("Jet_FX");
if (entities.empty()) return;
GameMessages::SendPlayAnimation(entities.at(0), u"jetFX");
RenderComponent::PlayAnimation(entities.at(0), u"jetFX");
// So we can give kill credit to person who build this
builder = target->GetObjectID();

View File

@@ -1,11 +1,10 @@
#include "AgSalutingNpcs.h"
#include "GameMessages.h"
#include "RenderComponent.h"
void AgSalutingNpcs::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
if (emote != 356) {
return;
}
GameMessages::SendPlayAnimation(self, u"salutePlayer");
RenderComponent::PlayAnimation(self, u"salutePlayer");
}

View File

@@ -1,5 +1,7 @@
#include "AgShipPlayerShockServer.h"
#include "GameMessages.h"
#include "RenderComponent.h"
#include "Entity.h"
#include "eTerminateType.h"
void AgShipPlayerShockServer::OnUse(Entity* self, Entity* user) {
@@ -8,7 +10,7 @@ void AgShipPlayerShockServer::OnUse(Entity* self, Entity* user) {
return;
}
active = true;
GameMessages::SendPlayAnimation(user, shockAnim);
RenderComponent::PlayAnimation(user, shockAnim);
GameMessages::SendKnockback(user->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, NiPoint3(-20, 10, -20));
GameMessages::SendPlayFXEffect(self, 1430, u"create", "console_sparks", LWOOBJID_EMPTY, 1.0, 1.0, true);

View File

@@ -3,6 +3,8 @@
#include "GeneralUtils.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "RenderComponent.h"
#include "Entity.h"
void AgSpaceStuff::OnStartup(Entity* self) {
self->AddTimer("FloaterScale", 5.0f);
@@ -27,13 +29,13 @@ void AgSpaceStuff::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "FloaterScale") {
int scaleType = GeneralUtils::GenerateRandomNumber<int>(1, 5);
GameMessages::SendPlayAnimation(self, u"scale_0" + GeneralUtils::to_u16string(scaleType));
RenderComponent::PlayAnimation(self, u"scale_0" + GeneralUtils::to_u16string(scaleType));
self->AddTimer("FloaterPath", 0.4);
} else if (timerName == "FloaterPath") {
int pathType = GeneralUtils::GenerateRandomNumber<int>(1, 4);
int randTime = GeneralUtils::GenerateRandomNumber<int>(20, 25);
GameMessages::SendPlayAnimation(self, u"path_0" + (GeneralUtils::to_u16string(pathType)));
RenderComponent::PlayAnimation(self, u"path_0" + (GeneralUtils::to_u16string(pathType)));
self->AddTimer("FloaterScale", randTime);
} else if (timerName == "ShipShakeExplode") {
DoShake(self, true);
@@ -76,16 +78,16 @@ void AgSpaceStuff::DoShake(Entity* self, bool explodeIdle) {
auto* shipFxObject2 = GetEntityInGroup(ShipFX2);
if (shipFxObject2)
GameMessages::SendPlayAnimation(shipFxObject2, u"explosion");
RenderComponent::PlayAnimation(shipFxObject2, u"explosion");
} else {
auto* shipFxObject = GetEntityInGroup(ShipFX);
auto* shipFxObject2 = GetEntityInGroup(ShipFX2);
if (shipFxObject)
GameMessages::SendPlayAnimation(shipFxObject, u"idle");
RenderComponent::PlayAnimation(shipFxObject, u"idle");
if (shipFxObject2)
GameMessages::SendPlayAnimation(shipFxObject2, u"idle");
RenderComponent::PlayAnimation(shipFxObject2, u"idle");
}
}

View File

@@ -1,6 +1,8 @@
#include "FvDragonSmashingGolemQb.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "RenderComponent.h"
#include "Entity.h"
#include "eRebuildState.h"
void FvDragonSmashingGolemQb::OnStartup(Entity* self) {
@@ -15,7 +17,7 @@ void FvDragonSmashingGolemQb::OnTimerDone(Entity* self, std::string timerName) {
void FvDragonSmashingGolemQb::OnRebuildNotifyState(Entity* self, eRebuildState state) {
if (state == eRebuildState::COMPLETED) {
GameMessages::SendPlayAnimation(self, u"dragonsmash");
RenderComponent::PlayAnimation(self, u"dragonsmash");
const auto dragonId = self->GetVar<LWOOBJID>(u"Dragon");

View File

@@ -3,6 +3,7 @@
#include "EntityManager.h"
#include "SkillComponent.h"
#include "GeneralUtils.h"
#include "RenderComponent.h"
void FvFlyingCreviceDragon::OnStartup(Entity* self) {
self->AddTimer("waypoint", 5);
@@ -67,10 +68,10 @@ void FvFlyingCreviceDragon::OnArrived(Entity* self) {
auto point = self->GetVar<int32_t>(u"waypoint");
if (point == 4) {
GameMessages::SendPlayAnimation(self, u"attack1", 2);
RenderComponent::PlayAnimation(self, u"attack1", 2.0f);
self->AddTimer("platform1attack", 1.75f);
} else if (point == 12) {
GameMessages::SendPlayAnimation(self, u"attack2", 2);
RenderComponent::PlayAnimation(self, u"attack2", 2.0f);
const auto& group2 = EntityManager::Instance()->GetEntitiesInGroup("dragonFireballs2");
@@ -101,7 +102,7 @@ void FvFlyingCreviceDragon::OnArrived(Entity* self) {
}
}
} else if (point == 16) {
GameMessages::SendPlayAnimation(self, u"attack3", 2);
RenderComponent::PlayAnimation(self, u"attack3", 2.0f);
self->AddTimer("platform3attack", 0.5f);
}
}

View File

@@ -1,6 +1,8 @@
#include "FvNinjaGuard.h"
#include "GameMessages.h"
#include "MissionComponent.h"
#include "RenderComponent.h"
#include "EntityManager.h"
void FvNinjaGuard::OnStartup(Entity* self) {
if (self->GetLOT() == 7412) {
@@ -12,24 +14,24 @@ void FvNinjaGuard::OnStartup(Entity* self) {
void FvNinjaGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
if (emote != 392) {
GameMessages::SendPlayAnimation(self, u"no");
RenderComponent::PlayAnimation(self, u"no");
return;
}
GameMessages::SendPlayAnimation(self, u"scared");
RenderComponent::PlayAnimation(self, u"scared");
if (self->GetLOT() == 7412) {
auto* rightGuard = EntityManager::Instance()->GetEntity(m_RightGuard);
if (rightGuard != nullptr) {
GameMessages::SendPlayAnimation(rightGuard, u"laugh_rt");
RenderComponent::PlayAnimation(rightGuard, u"laugh_rt");
}
} else if (self->GetLOT() == 11128) {
auto* leftGuard = EntityManager::Instance()->GetEntity(m_LeftGuard);
if (leftGuard != nullptr) {
GameMessages::SendPlayAnimation(leftGuard, u"laugh_lt");
RenderComponent::PlayAnimation(leftGuard, u"laugh_lt");
}
}
}

View File

@@ -2,6 +2,7 @@
#include "Entity.h"
#include "GameMessages.h"
#include "MissionComponent.h"
#include "RenderComponent.h"
#include "eMissionState.h"
void LegoDieRoll::OnStartup(Entity* self) {
@@ -17,23 +18,23 @@ void LegoDieRoll::OnTimerDone(Entity* self, std::string timerName) {
switch (dieRoll) {
case 1:
GameMessages::SendPlayAnimation(self, u"roll-die-1");
RenderComponent::PlayAnimation(self, u"roll-die-1");
break;
case 2:
GameMessages::SendPlayAnimation(self, u"roll-die-2");
RenderComponent::PlayAnimation(self, u"roll-die-2");
break;
case 3:
GameMessages::SendPlayAnimation(self, u"roll-die-3");
RenderComponent::PlayAnimation(self, u"roll-die-3");
break;
case 4:
GameMessages::SendPlayAnimation(self, u"roll-die-4");
RenderComponent::PlayAnimation(self, u"roll-die-4");
break;
case 5:
GameMessages::SendPlayAnimation(self, u"roll-die-5");
RenderComponent::PlayAnimation(self, u"roll-die-5");
break;
case 6:
{
GameMessages::SendPlayAnimation(self, u"roll-die-6");
RenderComponent::PlayAnimation(self, u"roll-die-6");
// tracking the It's Truly Random Achievement
auto* owner = self->GetOwner();
auto* missionComponent = owner->GetComponent<MissionComponent>();

View File

@@ -1,5 +1,7 @@
#include "GfOrgan.h"
#include "GameMessages.h"
#include "Entity.h"
#include "RenderComponent.h"
void GfOrgan::OnUse(Entity* self, Entity* user) {
if (self->GetBoolean(u"bIsInUse")) {
@@ -11,7 +13,7 @@ void GfOrgan::OnUse(Entity* self, Entity* user) {
self->SetBoolean(u"bIsInUse", true);
self->AddTimer("reset", 5.0f);
GameMessages::SendPlayAnimation(user, u"jig");
RenderComponent::PlayAnimation(user, u"jig");
}
void GfOrgan::OnTimerDone(Entity* self, std::string timerName) {

View File

@@ -15,6 +15,7 @@
#include "InventoryComponent.h"
#include "eMissionTaskType.h"
#include "eReplicaComponentType.h"
#include "RenderComponent.h"
#include "eGameActivity.h"
void SGCannon::OnStartup(Entity* self) {
@@ -135,38 +136,26 @@ void SGCannon::OnActivityStateChangeRequest(Entity* self, LWOOBJID senderID, int
}
}
void SGCannon::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier,
const std::u16string& userData) {
void SGCannon::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) {
auto* player = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(PlayerIDVariable));
if (player != nullptr) {
if (button == 1 && identifier == u"Shooting_Gallery_Stop") {
if (!player) return;
if (identifier == u"Scoreboardinfo") {
GameMessages::SendDisplayMessageBox(player->GetObjectID(), true,
dZoneManager::Instance()->GetZoneControlObject()->GetObjectID(),
u"Shooting_Gallery_Retry", 2, u"Retry?",
u"", player->GetSystemAddress());
} else {
if ((button == 1 && (identifier == u"Shooting_Gallery_Retry" || identifier == u"RePlay")) || identifier == u"SG1" || button == 0) {
if (IsPlayerInActivity(self, player->GetObjectID())) return;
self->SetNetworkVar<bool>(ClearVariable, true);
StartGame(self);
} else if (button == 0 && ((identifier == u"Shooting_Gallery_Retry" || identifier == u"RePlay"))){
RemovePlayer(player->GetObjectID());
UpdatePlayer(self, player->GetObjectID(), true);
} else if (button == 1 && identifier == u"Shooting_Gallery_Exit") {
UpdatePlayer(self, player->GetObjectID(), true);
RemovePlayer(player->GetObjectID());
StopGame(self, true);
return;
}
if (identifier == u"Scoreboardinfo") {
GameMessages::SendDisplayMessageBox(player->GetObjectID(), true,
dZoneManager::Instance()->GetZoneControlObject()->GetObjectID(),
u"Shooting_Gallery_Retry?", 2, u"Retry?",
u"", player->GetSystemAddress());
} else {
if ((button == 1 && (identifier == u"Shooting_Gallery_Retry" || identifier == u"RePlay"))
|| identifier == u"SG1" || button == 0) {
if (identifier == u"RePlay") {
static_cast<Player*>(player)->SendToZone(1300);
return;
}
self->SetNetworkVar<bool>(ClearVariable, true);
StartGame(self);
} else if (button == 1 && identifier == u"Shooting_Gallery_Exit") {
UpdatePlayer(self, player->GetObjectID(), true);
RemovePlayer(player->GetObjectID());
}
}
}
}
@@ -267,13 +256,17 @@ void SGCannon::OnActivityTimerDone(Entity* self, const std::string& name) {
if (self->GetVar<bool>(GameStartedVariable)) {
const auto spawnNumber = (uint32_t)std::stoi(name.substr(7));
const auto& activeSpawns = self->GetVar<std::vector<SGEnemy>>(ActiveSpawnsVariable);
if (activeSpawns.size() < spawnNumber) {
Game::logger->Log("SGCannon", "Trying to spawn %i when spawns size is only %i", spawnNumber, activeSpawns.size());
return;
}
const auto& toSpawn = activeSpawns.at(spawnNumber);
const auto pathIndex = GeneralUtils::GenerateRandomNumber<float_t>(0, toSpawn.spawnPaths.size() - 1);
const auto* path = dZoneManager::Instance()->GetZone()->GetPath(
toSpawn.spawnPaths.at(pathIndex)
);
const auto* path = dZoneManager::Instance()->GetZone()->GetPath(toSpawn.spawnPaths.at(pathIndex));
if (!path) {
Game::logger->Log("SGCannon", "Path %s at index %i is null", toSpawn.spawnPaths.at(pathIndex).c_str(), pathIndex);
return;
}
auto info = EntityInfo{};
info.lot = toSpawn.lot;
@@ -294,32 +287,30 @@ void SGCannon::OnActivityTimerDone(Entity* self, const std::string& name) {
auto* enemy = EntityManager::Instance()->CreateEntity(info, nullptr, self);
EntityManager::Instance()->ConstructEntity(enemy);
if (true) {
auto* movementAI = new MovementAIComponent(enemy, {});
auto* movementAI = new MovementAIComponent(enemy, {});
enemy->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAI);
enemy->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAI);
movementAI->SetSpeed(toSpawn.initialSpeed);
movementAI->SetCurrentSpeed(toSpawn.initialSpeed);
movementAI->SetHaltDistance(0.0f);
movementAI->SetSpeed(toSpawn.initialSpeed);
movementAI->SetCurrentSpeed(toSpawn.initialSpeed);
movementAI->SetHaltDistance(0.0f);
std::vector<NiPoint3> pathWaypoints;
std::vector<NiPoint3> pathWaypoints;
for (const auto& waypoint : path->pathWaypoints) {
pathWaypoints.push_back(waypoint.position);
}
if (GeneralUtils::GenerateRandomNumber<float_t>(0, 1) < 0.5f) {
std::reverse(pathWaypoints.begin(), pathWaypoints.end());
}
movementAI->SetPath(pathWaypoints);
enemy->AddDieCallback([this, self, enemy, name]() {
RegisterHit(self, enemy, name);
});
for (const auto& waypoint : path->pathWaypoints) {
pathWaypoints.push_back(waypoint.position);
}
if (GeneralUtils::GenerateRandomNumber<float_t>(0, 1) < 0.5f) {
std::reverse(pathWaypoints.begin(), pathWaypoints.end());
}
movementAI->SetPath(pathWaypoints);
enemy->AddDieCallback([this, self, enemy, name]() {
RegisterHit(self, enemy, name);
});
// Save the enemy and tell it to start pathing
if (enemy != nullptr) {
const_cast<std::vector<LWOOBJID>&>(self->GetVar<std::vector<LWOOBJID>>(SpawnedObjects)).push_back(enemy->GetObjectID());
@@ -338,6 +329,7 @@ SGCannon::OnActivityTimerUpdate(Entity* self, const std::string& name, float_t t
}
void SGCannon::StartGame(Entity* self) {
if (self->GetVar<bool>(GameStartedVariable)) return;
self->SetNetworkVar<uint32_t>(TimeLimitVariable, self->GetVar<uint32_t>(TimeLimitVariable));
self->SetNetworkVar<bool>(AudioStartIntroVariable, true);
self->SetVar<LOT>(CurrentRewardVariable, LOT_NULL);
@@ -444,6 +436,14 @@ void SGCannon::RemovePlayer(LWOOBJID playerID) {
}
}
void SGCannon::OnRequestActivityExit(Entity* self, LWOOBJID player, bool canceled){
if (canceled){
StopGame(self, canceled);
RemovePlayer(player);
}
}
void SGCannon::StartChargedCannon(Entity* self, uint32_t optionalTime) {
optionalTime = optionalTime == 0 ? constants.chargedTime : optionalTime;
self->SetVar<bool>(SuperChargePausedVariable, false);
@@ -509,17 +509,17 @@ void SGCannon::RecordPlayerScore(Entity* self) {
void SGCannon::PlaySceneAnimation(Entity* self, const std::u16string& animationName, bool onCannon, bool onPlayer, float_t priority) {
for (auto* cannon : EntityManager::Instance()->GetEntitiesInGroup("cannongroup")) {
GameMessages::SendPlayAnimation(cannon, animationName, priority);
RenderComponent::PlayAnimation(cannon, animationName, priority);
}
if (onCannon) {
GameMessages::SendPlayAnimation(self, animationName, priority);
RenderComponent::PlayAnimation(self, animationName, priority);
}
if (onPlayer) {
auto* player = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(PlayerIDVariable));
if (player != nullptr) {
GameMessages::SendPlayAnimation(player, animationName, priority);
RenderComponent::PlayAnimation(player, animationName, priority);
}
}
}
@@ -578,7 +578,7 @@ void SGCannon::StopGame(Entity* self, bool cancel) {
self->SetNetworkVar<std::u16string>(u"UI_Rewards",
GeneralUtils::to_u16string(self->GetVar<uint32_t>(TotalScoreVariable)) + u"_0_0_0_0_0_0"
);
);
GameMessages::SendRequestActivitySummaryLeaderboardData(
player->GetObjectID(),

View File

@@ -63,12 +63,11 @@ public:
void OnStartup(Entity* self) override;
void OnPlayerLoaded(Entity* self, Entity* player) override;
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) override;
void OnActivityStateChangeRequest(Entity* self, LWOOBJID senderID, int32_t value1,
int32_t value2, const std::u16string& stringValue) override;
void OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier,
const std::u16string& userData) override;
void OnActivityStateChangeRequest(Entity* self, LWOOBJID senderID, int32_t value1, int32_t value2, const std::u16string& stringValue) override;
void OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) override;
void OnActivityTimerDone(Entity* self, const std::string& name) override;
void OnActivityTimerUpdate(Entity* self, const std::string& name, float_t timeRemaining, float_t elapsedTime) override;
void OnRequestActivityExit(Entity* self, LWOOBJID player, bool canceled) override;
private:
static std::vector<std::vector<SGEnemy>> GetWaves();
static SGConstants GetConstants();

View File

@@ -9,6 +9,7 @@
#include "MissionComponent.h"
#include "eMissionState.h"
#include "eMissionTaskType.h"
#include "RenderComponent.h"
// Constants are at the bottom
@@ -122,7 +123,7 @@ void NsConcertInstrument::StartPlayingInstrument(Entity* self, Entity* player) {
player->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
GameMessages::SendPlayCinematic(player->GetObjectID(), cinematics.at(instrumentLot), UNASSIGNED_SYSTEM_ADDRESS);
self->AddCallbackTimer(1.0f, [player, instrumentLot]() {
GameMessages::SendPlayAnimation(player, animations.at(instrumentLot), 2.0f);
RenderComponent::PlayAnimation(player, animations.at(instrumentLot), 2.0f);
});
for (auto* soundBox : EntityManager::Instance()->GetEntitiesInGroup("Audio-Concert")) {
@@ -153,7 +154,7 @@ void NsConcertInstrument::StopPlayingInstrument(Entity* self, Entity* player) {
}
GameMessages::SendEndCinematic(player->GetObjectID(), cinematics.at(instrumentLot), UNASSIGNED_SYSTEM_ADDRESS, 1.0f);
GameMessages::SendPlayAnimation(player, smashAnimations.at(instrumentLot), 2.0f);
RenderComponent::PlayAnimation(player, smashAnimations.at(instrumentLot), 2.0f);
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"stopCheckingMovement", 0, 0,
player->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
}

View File

@@ -4,6 +4,8 @@
#include "GameMessages.h"
#include "EntityManager.h"
#include "PhantomPhysicsComponent.h"
#include "RenderComponent.h"
#include "Entity.h"
void WhFans::OnStartup(Entity* self) {
self->SetVar<bool>(u"alive", true);
@@ -30,7 +32,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
if (fanVolumes.size() == 0 || !self->GetVar<bool>(u"alive")) return;
if (self->GetVar<bool>(u"on")) {
GameMessages::SendPlayAnimation(self, u"fan-off");
RenderComponent::PlayAnimation(self, u"fan-off");
renderComponent->StopEffect("fanOn");
self->SetVar<bool>(u"on", false);
@@ -42,7 +44,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
EntityManager::Instance()->SerializeEntity(volume);
}
} else if (!self->GetVar<bool>(u"on") && self->GetVar<bool>(u"alive")) {
GameMessages::SendPlayAnimation(self, u"fan-on");
RenderComponent::PlayAnimation(self, u"fan-on");
self->SetVar<bool>(u"on", true);

View File

@@ -39,7 +39,7 @@ void AgPropguards::OnMissionDialogueOK(Entity* self, Entity* target, int mission
}
}
uint32_t AgPropguards::GetFlagForMission(uint32_t missionID) {
int32_t AgPropguards::GetFlagForMission(uint32_t missionID) {
switch (missionID) {
case 872:
return 97;

View File

@@ -4,5 +4,5 @@
class AgPropguards : public CppScripts::Script {
void OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) override;
private:
static uint32_t GetFlagForMission(uint32_t missionID);
static int32_t GetFlagForMission(uint32_t missionID);
};

View File

@@ -1,6 +1,7 @@
#include "WildAmbients.h"
#include "GameMessages.h"
#include "RenderComponent.h"
void WildAmbients::OnUse(Entity* self, Entity* user) {
GameMessages::SendPlayAnimation(self, u"interact");
RenderComponent::PlayAnimation(self, u"interact");
}