mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-06-23 13:19:56 +00:00

* Move in all directions is functional * feat: add movement behaviors the following behaviors will function MoveRight MoveLeft FlyUp FlyDown MoveForward MoveBackward The behavior of the behaviors is once a move in an axis is active, that behavior must finish its movement before another one on that axis can do another movement on it. * feat: add chat behaviors Tested that models can correctly send chat messages, silently and publically. Tested as well that the filter is used by the client for behaviors and added a security check to not broadcast messages that fail the check if words are removed.
34 lines
651 B
C++
34 lines
651 B
C++
#ifndef __STATE__H__
|
|
#define __STATE__H__
|
|
|
|
#include "Strip.h"
|
|
|
|
namespace tinyxml2 {
|
|
class XMLElement;
|
|
}
|
|
|
|
class AMFArrayValue;
|
|
class ModelComponent;
|
|
|
|
class State {
|
|
public:
|
|
template <typename Msg>
|
|
void HandleMsg(Msg& msg);
|
|
|
|
void SendBehaviorBlocksToClient(AMFArrayValue& args) const;
|
|
bool IsEmpty() const;
|
|
|
|
void Serialize(tinyxml2::XMLElement& state) const;
|
|
void Deserialize(const tinyxml2::XMLElement& state);
|
|
|
|
void Update(float deltaTime, ModelComponent& modelComponent);
|
|
|
|
void OnChatMessageReceived(const std::string& sMessage);
|
|
private:
|
|
|
|
// The strips contained within this state.
|
|
std::vector<Strip> m_Strips;
|
|
};
|
|
|
|
#endif //!__STATE__H__
|