Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/MessageTypes.h
Show First 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | public: | ||||
{ | { | ||||
} | } | ||||
entity_id_t entity; | entity_id_t entity; | ||||
player_id_t newTerritory; | player_id_t newTerritory; | ||||
}; | }; | ||||
/** | /** | ||||
* Sent by CCmpUnitMotion during Update, whenever the motion status has changed | * Sent by CCmpUnitMotion as a hint whenever the unit stops moving | ||||
* since the previous update. | * Thus it will be sent if the unit's path is blocked, or if it's reached its destination. | ||||
*/ | */ | ||||
class CMessageMotionChanged : public CMessage | class CMessageMovePaused : public CMessage | ||||
fatherbushido: Perhaps MoveStarted is better? | |||||
Not Done Inline ActionsIIRC I chose BeginMove because this is also sent when the move is restarted (unit stopped moving from an obstruction but now moves again), and I felt moveStarted was more of a "I just started pathing". wraitii: IIRC I chose BeginMove because this is also sent when the move is restarted (unit stopped… | |||||
{ | { | ||||
public: | public: | ||||
DEFAULT_MESSAGE_IMPL(MotionChanged) | DEFAULT_MESSAGE_IMPL(MovePaused) | ||||
CMessageMotionChanged(bool starting, bool error) : | CMessageMovePaused() | ||||
starting(starting), error(error) | |||||
{ | { | ||||
} | } | ||||
}; | |||||
/** | |||||
* Sent by CCmpUnitMotion when a unit has determined it has no chance | |||||
* of ever reaching its assigned destination. This is a catastrophic error. | |||||
*/ | |||||
class CMessageMoveFailure : public CMessage | |||||
{ | |||||
public: | |||||
DEFAULT_MESSAGE_IMPL(MoveFailure) | |||||
bool starting; // whether this is a start or end of movement | CMessageMoveFailure() | ||||
bool error; // whether we failed to start moving (couldn't find any path) | { | ||||
} | |||||
}; | }; | ||||
/** | /** | ||||
* Sent when water height has been changed. | * Sent when water height has been changed. | ||||
*/ | */ | ||||
class CMessageWaterChanged : public CMessage | class CMessageWaterChanged : public CMessage | ||||
{ | { | ||||
public: | public: | ||||
DEFAULT_MESSAGE_IMPL(WaterChanged) | DEFAULT_MESSAGE_IMPL(WaterChanged) | ||||
Done Inline ActionsMovePaused? fatherbushido: MovePaused? | |||||
Not Done Inline ActionsFor consistenty with the others I inverted it. wraitii: For consistenty with the others I inverted it. | |||||
CMessageWaterChanged() | CMessageWaterChanged() | ||||
{ | { | ||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* Sent when terrain (texture or elevation) has been changed. | * Sent when terrain (texture or elevation) has been changed. | ||||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Perhaps MoveStarted is better?