File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Client/mods/deathmatch/logic Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -180,27 +180,31 @@ void CClientMarker::SetMarkerType(CClientMarker::eMarkerType eType)
180
180
{
181
181
// Just change the type
182
182
static_cast <CClientCheckpoint*>(m_pMarker)->SetCheckpointType (CClientCheckpoint::TYPE_RING);
183
+ return ;
183
184
}
184
185
185
186
// Or current type is a ring and new type is a checkpoint?
186
187
if (eCurrentType == MARKER_RING && eType == MARKER_CHECKPOINT)
187
188
{
188
189
// Just change the type
189
190
static_cast <CClientCheckpoint*>(m_pMarker)->SetCheckpointType (CClientCheckpoint::TYPE_NORMAL);
191
+ return ;
190
192
}
191
193
192
194
// Current type is a cylinder and new type is an arrow
193
195
if (eCurrentType == MARKER_CYLINDER && eType == MARKER_ARROW)
194
196
{
195
197
// Just change the type
196
198
static_cast <CClient3DMarker*>(m_pMarker)->Set3DMarkerType (CClient3DMarker::TYPE_ARROW);
199
+ return ;
197
200
}
198
201
199
202
// Current type is an arrow and new type is an cylinder
200
203
if (eCurrentType == MARKER_ARROW && eType == MARKER_CYLINDER)
201
204
{
202
205
// Just change the type
203
206
static_cast <CClient3DMarker*>(m_pMarker)->Set3DMarkerType (CClient3DMarker::TYPE_CYLINDER);
207
+ return ;
204
208
}
205
209
206
210
// No easy way of changing the type. Different classes. Remember position and color and recreate it.
@@ -218,6 +222,9 @@ void CClientMarker::SetMarkerType(CClientMarker::eMarkerType eType)
218
222
// Create a new one of the correct type
219
223
CreateOfType (eType);
220
224
225
+ // Reset stored position to re-apply last position (fixes issue #2194)
226
+ m_vecPosition = {};
227
+
221
228
// Set the properties back
222
229
SetPosition (vecPosition);
223
230
SetSize (fSize );
You can’t perform that action at this time.
0 commit comments