mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 22:17:31 +00:00
2ca61c3e57
* rigid as heck * abstract physics creation to separate function * loading Update FvRacePillarDServer.cpp consolidate abcd pillar logic modularization Update SimplePhysicsComponent.cpp Update EntityManager.cpp Update MovingPlatformComponent.cpp still need another pass * geiser works * columns working finally * consolidate logic * constiness * Update PhantomPhysicsComponent.cpp * Update PhysicsComponent.cpp * revert testing code * add versions info --------- Co-authored-by: Aaron Kimbre <aronwk.aaron@gmail.com>
38 lines
942 B
C++
38 lines
942 B
C++
// Darkflame Universe
|
|
// Copyright 2024
|
|
|
|
#ifndef RIGIDBODYPHANTOMPHYSICS_H
|
|
#define RIGIDBODYPHANTOMPHYSICS_H
|
|
|
|
#include "BitStream.h"
|
|
#include "dCommonVars.h"
|
|
#include "NiPoint3.h"
|
|
#include "NiQuaternion.h"
|
|
#include "PhysicsComponent.h"
|
|
#include "eReplicaComponentType.h"
|
|
|
|
class dpEntity;
|
|
|
|
/**
|
|
* Component that handles rigid bodies that can be interacted with, mostly client-side rendered. An example is the
|
|
* bananas that fall from trees in GF.
|
|
*/
|
|
class RigidbodyPhantomPhysicsComponent : public PhysicsComponent {
|
|
public:
|
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS;
|
|
|
|
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
|
|
|
void Update(const float deltaTime) override;
|
|
|
|
void Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) override;
|
|
|
|
void SpawnVertices() const;
|
|
private:
|
|
float m_Scale{};
|
|
|
|
dpEntity* m_dpEntity{};
|
|
};
|
|
|
|
#endif // RIGIDBODYPHANTOMPHYSICS_H
|