mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
ad003634f4
* Make serialize actually virtual yep * Abstract to PhysicsComponent Move shared functionality of all physics related classes to a base class. Tested that there were no failed to unserialize errors when in main gameplay in Gnarled Forest or in a race. Tested that 2 players were able to see each other in the above scenarios just fine as well. * Update PhantomPhysicsComponent.cpp * Add SimplePhysicsTest * Add construction test * Update SimplePhysicsComponentTests.cpp * remove flags and fix override * Update VendorComponent.h
30 lines
810 B
C++
30 lines
810 B
C++
/*
|
|
* Darkflame Universe
|
|
* Copyright 2023
|
|
*/
|
|
|
|
#ifndef __RIGIDBODYPHANTOMPHYSICS_H__
|
|
#define __RIGIDBODYPHANTOMPHYSICS_H__
|
|
|
|
#include "BitStream.h"
|
|
#include "dCommonVars.h"
|
|
#include "NiPoint3.h"
|
|
#include "NiQuaternion.h"
|
|
#include "PhysicsComponent.h"
|
|
#include "eReplicaComponentType.h"
|
|
|
|
/**
|
|
* 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 const eReplicaComponentType ComponentType = eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS;
|
|
|
|
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
|
|
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
|
};
|
|
|
|
#endif // __RIGIDBODYPHANTOMPHYSICS_H__
|