mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
c1e8546d48
add final missing scripts for nt also fix the turnin for the breadcrumb missions not showing the completion window. Fix another missing script Add another script fix include guards Fix dirt clouds not appearing on mission accept
20 lines
695 B
C++
20 lines
695 B
C++
#include "FrictionVolumeServer.h"
|
|
#include "PhantomPhysicsComponent.h"
|
|
#include "ePhysicsEffectType.h"
|
|
#include "Game.h"
|
|
#include "EntityManager.h"
|
|
|
|
void FrictionVolumeServer::OnStartup(Entity* self) {
|
|
auto frictionAmount = self->GetVar<float>(u"FrictionAmt");
|
|
if (frictionAmount == 0.0f) frictionAmount = DefaultFrictionAmount;
|
|
|
|
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
|
if (!phantomPhysicsComponent) return;
|
|
|
|
phantomPhysicsComponent->SetEffectType(ePhysicsEffectType::FRICTION);
|
|
phantomPhysicsComponent->SetDirectionalMultiplier(frictionAmount);
|
|
phantomPhysicsComponent->SetPhysicsEffectActive(true);
|
|
|
|
Game::entityManager->SerializeEntity(self);
|
|
}
|