Skip to content

Commit f71c0a2

Browse files
Fixed #9243: onElementStopSync doesn't triggered when player disconnects.
https://bugs.mtasa.com/view.php?id=9243
1 parent 37eb086 commit f71c0a2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

MTA10_Server/mods/deathmatch/logic/CPlayer.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ void CPlayer::RemoveAllSyncingVehicles ( void )
344344
for ( ; iter != m_SyncingVehicles.end (); iter++ )
345345
{
346346
(*iter)->m_pSyncer = NULL;
347+
348+
CLuaArguments Arguments;
349+
Arguments.PushElement(this);
350+
(*iter)->CallEvent("onElementStopSync", Arguments);
347351
}
348352
}
349353

@@ -389,6 +393,10 @@ void CPlayer::RemoveAllSyncingPeds ( void )
389393
for ( ; iter != m_SyncingPeds.end (); iter++ )
390394
{
391395
(*iter)->m_pSyncer = NULL;
396+
397+
CLuaArguments Arguments;
398+
Arguments.PushElement(this);
399+
(*iter)->CallEvent("onElementStopSync", Arguments);
392400
}
393401
}
394402

@@ -434,6 +442,10 @@ void CPlayer::RemoveAllSyncingObjects ( void )
434442
for ( ; iter != m_SyncingObjects.end (); iter++ )
435443
{
436444
(*iter)->m_pSyncer = NULL;
445+
446+
CLuaArguments Arguments;
447+
Arguments.PushElement(this);
448+
(*iter)->CallEvent("onElementStopSync", Arguments);
437449
}
438450
}
439451

0 commit comments

Comments
 (0)