Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/MessageTypes.h
/* Copyright (C) 2022 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 286 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
entity_id_t entity; | entity_id_t entity; | ||||
bool inWorld; | bool inWorld; | ||||
CVector3D pos0; | CVector3D pos0; | ||||
CVector3D pos1; | CVector3D pos1; | ||||
}; | }; | ||||
/*Sent whenever the territory type (neutral,own,enemy) differs from the former type*/ | /** | ||||
* Sent whenever the territory type (neutral, own, enemy) under an entity differs from the former type | |||||
*/ | |||||
class CMessageTerritoryPositionChanged final : public CMessage | class CMessageTerritoryPositionChanged final : public CMessage | ||||
{ | { | ||||
public: | public: | ||||
DEFAULT_MESSAGE_IMPL(TerritoryPositionChanged) | DEFAULT_MESSAGE_IMPL(TerritoryPositionChanged) | ||||
CMessageTerritoryPositionChanged(entity_id_t entity, player_id_t newTerritory) : | CMessageTerritoryPositionChanged(entity_id_t entity, player_id_t newTerritory) : | ||||
entity(entity), newTerritory(newTerritory) | entity(entity), newTerritory(newTerritory) | ||||
{ | { | ||||
} | } | ||||
entity_id_t entity; | entity_id_t entity; | ||||
player_id_t newTerritory; | player_id_t newTerritory; | ||||
}; | }; | ||||
/** | |||||
* Sent whenever the territory influence changes. | |||||
*/ | |||||
class CMessageTerritoryInfluenceChanged final : public CMessage | |||||
{ | |||||
public: | |||||
DEFAULT_MESSAGE_IMPL(TerritoryInfluenceChanged) | |||||
CMessageTerritoryInfluenceChanged(entity_id_t entity) : | |||||
entity(entity) | |||||
{ | |||||
} | |||||
entity_id_t entity; | |||||
}; | |||||
/** | /** | ||||
* Sent by CCmpUnitMotion during Update if an event happened that might interest other components. | * Sent by CCmpUnitMotion during Update if an event happened that might interest other components. | ||||
*/ | */ | ||||
class CMessageMotionUpdate final : public CMessage | class CMessageMotionUpdate final : public CMessage | ||||
{ | { | ||||
public: | public: | ||||
DEFAULT_MESSAGE_IMPL(MotionUpdate) | DEFAULT_MESSAGE_IMPL(MotionUpdate) | ||||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | public: | ||||
{ | { | ||||
} | } | ||||
u32 ticket; | u32 ticket; | ||||
WaypointPath path; | WaypointPath path; | ||||
}; | }; | ||||
/** | /** | ||||
* Sent by aura manager when a value of a certain entity's component is changed | * Sent by techs / aura / ... when the value of a certain modified has changed. | ||||
*/ | */ | ||||
class CMessageValueModification final : public CMessage | class CMessageValueModification final : public CMessage | ||||
{ | { | ||||
public: | public: | ||||
DEFAULT_MESSAGE_IMPL(ValueModification) | DEFAULT_MESSAGE_IMPL(ValueModification) | ||||
CMessageValueModification(const std::vector<entity_id_t>& entities, std::wstring component, const std::vector<std::wstring>& valueNames) : | CMessageValueModification(const std::vector<entity_id_t>& entities, std::wstring component, const std::vector<std::wstring>& valueNames) : | ||||
entities(entities), | entities(entities), | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator