mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Remove inlines
Clean up macros more tomorrow Cleanup and optimize CDActivities table Remove unused include Further work on CDActivityRewards Update MasterServer.cpp Further animations work Activities still needs work for a better PK. fix type All of these replacements worked Create internal interface for animations Allows for user to just call GetAnimationTIme or PlayAnimation rather than passing in arbitrary true false statements
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user