7 #ifndef CAFU_ENGINE_ENTITY_HPP_INCLUDED
8 #define CAFU_ENGINE_ENTITY_HPP_INCLUDED
10 #include "../Games/PlayerCommand.hpp"
11 #include "Math3D/Vector3.hpp"
12 #include "Network/State.hpp"
13 #include "Templates/Pointer.hpp"
17 namespace cf {
namespace GameSys {
class EntityT; } }
46 void PreThink(
unsigned long ServerFrameNr);
52 void Think(
float FrameTime,
unsigned long ServerFrameNr);
59 void WriteNewBaseLine(
unsigned long SentClientBaseLineFrameNr,
ArrayT<
ArrayT<char> >& OutDatas)
const;
69 bool WriteDeltaEntity(
bool SendFromBaseLine,
unsigned long ClientFrameNr,
NetDataT& OutData,
bool ForceInfo)
const;
89 bool ParseServerDeltaUpdateMessage(
unsigned long DeltaFrameNr,
unsigned long ServerFrameNr,
const ArrayT<uint8_t>* DeltaMessage);
113 unsigned long EntityStateFrameNr;
116 const unsigned long m_BaseLineFrameNr;
Definition: EngineEntity.hpp:20
This struct represents per-frame player inputs for controlling human player entities.
Definition: PlayerCommand.hpp:32
void Predict(const PlayerCommandT &PlayerCommand)
Updates the (predicted) state of this entity according to the PlayerCommand.
Definition: EngineEntity.cpp:247
IntrusivePtrT< cf::GameSys::EntityT > GetEntity() const
Returns the GameSys entity related to this EngineEntityT.
Definition: EngineEntity.hpp:29
Class that allows easy and portable handling, sending and receiving of data over a network...
Definition: Network.hpp:181
This class holds the serialized state of another object (typically a game entity).
Definition: State.hpp:46
Definition: Renderer.hpp:16