mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
b432a3f5da
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
24 lines
593 B
C++
24 lines
593 B
C++
#include "GfOrgan.h"
|
|
#include "GameMessages.h"
|
|
#include "Entity.h"
|
|
#include "RenderComponent.h"
|
|
|
|
void GfOrgan::OnUse(Entity* self, Entity* user) {
|
|
if (self->GetBoolean(u"bIsInUse")) {
|
|
m_canUse = false;
|
|
return;
|
|
}
|
|
|
|
GameMessages::SendPlayNDAudioEmitter(self, UNASSIGNED_SYSTEM_ADDRESS, "{15d5f8bd-139a-4c31-8904-970c480cd70f}");
|
|
self->SetBoolean(u"bIsInUse", true);
|
|
self->AddTimer("reset", 5.0f);
|
|
|
|
RenderComponent::PlayAnimation(user, u"jig");
|
|
}
|
|
|
|
void GfOrgan::OnTimerDone(Entity* self, std::string timerName) {
|
|
if (timerName == "reset") {
|
|
self->SetBoolean(u"bIsInUse", false);
|
|
}
|
|
}
|