From d67d2e2370f730e5f380d9cedf5fcf90a163389c Mon Sep 17 00:00:00 2001 From: vts Date: Sat, 5 May 2012 23:10:25 +0000 Subject: [PATCH] Updated some documentation in CmpObstructionManager This was SVN commit r11766. --- .../mods/public/maps/scenarios/WallTest.pmp | 3 ++ .../mods/public/maps/scenarios/WallTest.xml | 3 ++ .../components/CCmpObstruction.cpp | 28 +++++++++++++------ 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 binaries/data/mods/public/maps/scenarios/WallTest.pmp create mode 100644 binaries/data/mods/public/maps/scenarios/WallTest.xml diff --git a/binaries/data/mods/public/maps/scenarios/WallTest.pmp b/binaries/data/mods/public/maps/scenarios/WallTest.pmp new file mode 100644 index 0000000000..4b83888fd5 --- /dev/null +++ b/binaries/data/mods/public/maps/scenarios/WallTest.pmp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e0ae4ad1ff84e75daf05a524af0651886f6ef7a6db4d2f12f9cece45d604593 +size 656423 diff --git a/binaries/data/mods/public/maps/scenarios/WallTest.xml b/binaries/data/mods/public/maps/scenarios/WallTest.xml new file mode 100644 index 0000000000..3dca9b9fa6 --- /dev/null +++ b/binaries/data/mods/public/maps/scenarios/WallTest.xml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1535844a837a7b424f2df0bfade2a2dffe7e71e4e5d0a0c3271568b3b1249ecf +size 4848 diff --git a/source/simulation2/components/CCmpObstruction.cpp b/source/simulation2/components/CCmpObstruction.cpp index 93133dcc67..4f7d19f18f 100644 --- a/source/simulation2/components/CCmpObstruction.cpp +++ b/source/simulation2/components/CCmpObstruction.cpp @@ -56,23 +56,33 @@ public: // Dynamic state: - /// Whether the obstruction is actively obstructing or just an inactive placeholder - bool m_Active; + /// Whether the obstruction is actively obstructing or just an inactive placeholder. + bool m_Active; + /// Whether the entity associated with this obstruction is currently moving. Only applicable for + /// UNIT-type obstructions. bool m_Moving; /** - * Unique identifier for grouping obstruction shapes, typically to have member shapes ignore - * each other during obstruction tests. Defaults to the entity ID. - * - * TODO: if needed, perhaps add a mask to specify with respect to which flags members of the - * group should ignore each other. + * Primary control group identifier. Indicates to which control group this entity's shape belongs. + * Typically used in combination with obstruction test filters to have member shapes ignore each + * other during obstruction tests. Defaults to the entity's ID. Must never be set to INVALID_ENTITY. */ entity_id_t m_ControlGroup; + + /** + * Optional secondary control group identifier. Similar to m_ControlGroup; if set to a valid value, + * then this field identifies an additional, secondary control group to which this entity's shape + * belongs. Set to INVALID_ENTITY to not assign any secondary group. Defaults to INVALID_ENTITY. + * + * These are only necessary in case it is not sufficient for an entity to belong to only one control + * group. Otherwise, they can be ignored. + */ entity_id_t m_ControlGroup2; - /// Identifier of this entity's obstruction shape. Contains structure, but should be treated - /// as opaque here. + /// Identifier of this entity's obstruction shape, as registered in the obstruction manager. Contains + /// structure, but should be treated as opaque here. tag_t m_Tag; + /// Set of flags affecting the behaviour of this entity's obstruction shape. flags_t m_Flags;