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