mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-21 14:14:22 +00:00
feat: add the lightning orb script* (#2011)
* feat: add the lightning orb script* Doesn't do anything because MPC don't work... * Update LightningOrbServer.cpp
This commit is contained in:
@@ -6,6 +6,7 @@ set(DSCRIPTS_SOURCES_02_SERVER_MAP_NJHUB
|
||||
"EnemySkeletonSpawner.cpp"
|
||||
"FallingTile.cpp"
|
||||
"FlameJetServer.cpp"
|
||||
"LightningOrbServer.cpp"
|
||||
"ImaginationShrineServer.cpp"
|
||||
"Lieutenant.cpp"
|
||||
"MonCoreNookDoors.cpp"
|
||||
|
||||
12
dScripts/02_server/Map/njhub/LightningOrbServer.cpp
Normal file
12
dScripts/02_server/Map/njhub/LightningOrbServer.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "LightningOrbServer.h"
|
||||
|
||||
void LightningOrbServer::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
GameMessages::GetPosition playerPos;
|
||||
playerPos.Send(target->GetObjectID());
|
||||
GameMessages::GetPosition selfPos;
|
||||
selfPos.Send(self->GetObjectID());
|
||||
const NiPoint3 newVec((playerPos.pos.x - selfPos.pos.x) * 2.5, 15, (playerPos.pos.z - selfPos.pos.z) * 2.5);
|
||||
// ahhhh aron said to put a TODO here moving platforms don't work lol. disable this so people can actually do the puzzle
|
||||
// GameMessages::SendKnockback(target->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, newVec);
|
||||
// GameMessages::SendPlayFXEffect(target->GetObjectID(), -1, u"knockback", "knockback");
|
||||
}
|
||||
8
dScripts/02_server/Map/njhub/LightningOrbServer.h
Normal file
8
dScripts/02_server/Map/njhub/LightningOrbServer.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
class LightningOrbServer : public CppScripts::Script
|
||||
{
|
||||
public:
|
||||
void OnCollisionPhantom(Entity* self, Entity* target) override;
|
||||
};
|
||||
Reference in New Issue
Block a user