File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
MTA10_Server/mods/deathmatch/logic Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1494,7 +1494,7 @@ void CClientPed::ResetToOutOfVehicleWeapon ( void )
14941494}
14951495
14961496
1497- CClientVehicle * CClientPed::RemoveFromVehicle ( bool bIgnoreIfGettingOut )
1497+ CClientVehicle * CClientPed::RemoveFromVehicle ( bool bSkipWarpIfGettingOut )
14981498{
14991499 SetDoingGangDriveby ( false );
15001500
@@ -1523,8 +1523,12 @@ CClientVehicle * CClientPed::RemoveFromVehicle ( bool bIgnoreIfGettingOut )
15231523 CVehicle* pGameVehicle = pVehicle->m_pVehicle ;
15241524 if ( pGameVehicle )
15251525 {
1526+ // If vehicle was deleted during exit, don't skip warp. Fixes player getting stuck and going invisible.
1527+ if ( pVehicle->IsBeingDeleted () )
1528+ bSkipWarpIfGettingOut = false ;
1529+
15261530 // Jax: this should be safe, doesn't remove the player if he's getting dragged out already (fix for getting stuck on back after being jacked)
1527- if ( !bIgnoreIfGettingOut || ( !IsGettingOutOfVehicle () ) )
1531+ if ( !bSkipWarpIfGettingOut || ( !IsGettingOutOfVehicle () ) )
15281532 {
15291533 // Warp the player out
15301534 InternalRemoveFromVehicle ( pGameVehicle );
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ CVehicle::~CVehicle ( void )
137137 pPlayer->SetOccupiedVehicle ( NULL , 0 );
138138 pPlayer->SetVehicleAction ( CPlayer::VEHICLEACTION_NONE );
139139
140- // Tell everyone he can start exiting the vehicle
141- CVehicleInOutPacket Reply ( GetID ( ), ucOccupiedSeat, 4 );
140+ // Tell everyone he can has exited the vehicle
141+ CVehicleInOutPacket Reply ( GetID ( ), ucOccupiedSeat, CGame::VEHICLE_NOTIFY_OUT_RETURN );
142142 Reply.SetSourceElement ( pPlayer );
143143 g_pGame->GetPlayerManager ( )->BroadcastOnlyJoined ( Reply );
144144 }
You can’t perform that action at this time.
0 commit comments