18 #include "precompiled.h"
46 return "<a:component type='system'/><empty/>";
87 g_Renderer.GetWaterManager()->m_NeedInfoUpdate =
true;
An entity initialisation parameter node.
void SubscribeToMessageType(MessageTypeId mtid)
Subscribe the current component type to the given message type.
entity_pos_t m_WaterHeight
A simple fixed-point number class.
#define REGISTER_COMPONENT_TYPE(cname)
void NumberFixed_Unbounded(const char *name, fixed value)
Serialize a number.
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
void MakeDirty(ssize_t i0, ssize_t j0, ssize_t i1, ssize_t j1, int dirtyFlags)
Serialization interface; see serialization overview.
static std::string GetSchema()
virtual void Init(const CParamNode ¶mNode)
#define RENDERDATA_UPDATE_VERTICES
Sent when terrain (texture or elevation) has been changed.
virtual float GetExactWaterLevel(float x, float z)
Get the current water level at the given point.
virtual void NumberFixed_Unbounded(const char *name, fixed &out)
virtual void Deserialize(const CParamNode ¶mNode, IDeserializer &deserialize)
float deltaSimTime
Elapsed simulation time since previous interpolate, in seconds.
static void ClassInit(CComponentManager &componentManager)
virtual void HandleMessage(const CMessage &msg, bool global)
virtual int GetType() const =0
float ToFloat() const
Convert to float. May be lossy - float can't represent all values.
#define DEFAULT_COMPONENT_ALLOCATOR(cname)
const CSimContext & GetSimContext() const
static bool IsInitialised()
virtual void SetWaterLevel(entity_pos_t h)
Set the height of the water level, as a constant value across the whole map.
static CFixed FromInt(int n)
virtual entity_pos_t GetWaterLevel(entity_pos_t x, entity_pos_t z)
Get the current water level at the given point.
Prepare for rendering a new frame (set up model positions etc).
CTerrain & GetTerrain() const
Deserialization interface; see serialization overview.
Class WaterManager: Maintain water settings and textures.
virtual void Serialize(ISerializer &serialize)