mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 22:17:31 +00:00
WIP
This commit is contained in:
parent
b6fb5f8173
commit
be551707b8
@ -1,14 +1,17 @@
|
||||
#include "FrictionVolume.h"
|
||||
#include "PhantomPhysicsComponent.h"
|
||||
#include "Entity.h"
|
||||
#include "dLogger.h"
|
||||
|
||||
void FrictionVolume::OnStartup(Entity* self) {
|
||||
Game::logger->Log("FrictionVolume", "LOT %i", self->GetLOT());
|
||||
auto frictionAmount = self->GetVarAs<float>(m_FrictionVariable);
|
||||
Game::logger->Log("FrictionVolume", "Lvl friction %f", frictionAmount);
|
||||
if (!frictionAmount) frictionAmount = m_DefaultFriction;
|
||||
auto* phanPhys = self->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!phanPhys) return;
|
||||
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!phantomPhysicsComponent) return;
|
||||
|
||||
phanPhys->SetPhysicsEffectActive(true);
|
||||
phanPhys->SetEffectType(4); // this should be noted in a enum somewhere
|
||||
phanPhys->SetDirectionalMultiplier(frictionAmount);
|
||||
phantomPhysicsComponent->SetPhysicsEffectActive(true);
|
||||
phantomPhysicsComponent->SetEffectType(4); // this should be noted in a enum somewhere
|
||||
phantomPhysicsComponent->SetDirectionalMultiplier(frictionAmount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user