You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
if (reference.m_DoorMoveStartSound) { m_DoorMoveStartSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveStartSound->Clone()); }
83
-
if (reference.m_DoorMoveSound) { m_DoorMoveSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveSound->Clone()); }
84
-
if (reference.m_DoorDirectionChangeSound) { m_DoorDirectionChangeSound = dynamic_cast<SoundContainer*>(reference.m_DoorDirectionChangeSound->Clone()); }
85
-
if (reference.m_DoorMoveEndSound) { m_DoorMoveEndSound = dynamic_cast<SoundContainer*>(reference.m_DoorMoveEndSound->Clone()); }
82
+
if (reference.m_DoorMoveStartSound) { m_DoorMoveStartSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveStartSound->Clone())); }
83
+
if (reference.m_DoorMoveSound) { m_DoorMoveSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveSound->Clone())); }
84
+
if (reference.m_DoorDirectionChangeSound) { m_DoorDirectionChangeSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorDirectionChangeSound->Clone())); }
85
+
if (reference.m_DoorMoveEndSound) { m_DoorMoveEndSound.reset(dynamic_cast<SoundContainer*>(reference.m_DoorMoveEndSound->Clone())); }
/// Used to temporarily remove or add back the material drawing of this in the scene. Used for making pathfinding work through doors.
166
+
/// Used to temporarily remove or add back the material drawing of this in the Scene. Used for making pathfinding work through doors.
167
167
/// </summary>
168
-
/// <param name="enable">Whether to enable the override or not.</param>
169
-
voidMaterialDrawOverride(boolenable);
168
+
/// <param name="erase">Whether to erase door material (true) or draw it (false).</param>
169
+
voidTempEraseOrRedrawDoorMaterial(boolerase);
170
170
#pragma endregion
171
171
172
172
#pragma region Virtual Override Methods
@@ -235,10 +235,10 @@ namespace RTE {
235
235
bool m_DoorMaterialTempErased; //!< Whether the drawing override is enabled and the door material is erased to allow better pathfinding.
236
236
Vector m_LastDoorMaterialPos; //!< The position the door attachable had when its material was drawn to the material bitmap. This is used to erase the previous material representation.
237
237
238
-
SoundContainer *m_DoorMoveStartSound; //!< Sound played when the door starts moving from fully open/closed position towards the opposite end.
239
-
SoundContainer *m_DoorMoveSound; //!< Sound played while the door is moving between open/closed position.
240
-
SoundContainer *m_DoorDirectionChangeSound; //!< Sound played when the door is interrupted while moving and changes directions.
241
-
SoundContainer *m_DoorMoveEndSound; //!< Sound played when the door stops moving and is at fully open/closed position.
238
+
std::unique_ptr<SoundContainer> m_DoorMoveStartSound; //!< Sound played when the door starts moving from fully open/closed position towards the opposite end.
239
+
std::unique_ptr<SoundContainer> m_DoorMoveSound; //!< Sound played while the door is moving between open/closed position.
240
+
std::unique_ptr<SoundContainer> m_DoorDirectionChangeSound; //!< Sound played when the door is interrupted while moving and changes directions.
241
+
std::unique_ptr<SoundContainer> m_DoorMoveEndSound; //!< Sound played when the door stops moving and is at fully open/closed position.
242
242
243
243
private:
244
244
@@ -270,9 +270,8 @@ namespace RTE {
270
270
/// This is to get rid of the material footprint made with DrawDoorMaterial when the door part starts to move.
271
271
/// </summary>
272
272
/// <param name="updateMaterialArea">Whether to update the MaterialArea after erasing or not. Used for DrawDoorMaterial().</param>
273
-
/// <param name="keepMaterialDrawnFlag">Whether to keep the DoorMaterialDrawn flag or not. Used for MaterialDrawOverride().</param>
274
273
/// <returns>Whether the fill erasure was successful (if the same material as the door was found and erased).</returns>
0 commit comments