mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 02:34:04 +00:00
Organize dScripts (#814)
* Organize dScripts whitespace Remove parent scope Remove parent scope from initial setter Remove debug Remove helper programs * Fix NtImagimeterVisibility script Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
This commit is contained in:
20
dScripts/ai/AG/AgShipPlayerShockServer.cpp
Normal file
20
dScripts/ai/AG/AgShipPlayerShockServer.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "AgShipPlayerShockServer.h"
|
||||
#include "GameMessages.h"
|
||||
|
||||
void AgShipPlayerShockServer::OnUse(Entity* self, Entity* user) {
|
||||
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());
|
||||
if (active) {
|
||||
return;
|
||||
}
|
||||
active = true;
|
||||
GameMessages::SendPlayAnimation(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);
|
||||
self->AddTimer("FXTime", fxTime);
|
||||
}
|
||||
|
||||
void AgShipPlayerShockServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
GameMessages::SendStopFXEffect(self, true, "console_sparks");
|
||||
active = false;
|
||||
}
|
Reference in New Issue
Block a user