@@ -1391,6 +1391,26 @@ void CClientPed::WarpIntoVehicle ( CClientVehicle* pVehicle, unsigned int uiSeat
1391
1391
SetSunbathing ( false );
1392
1392
KillAnimation ();
1393
1393
1394
+ if ( m_pPlayerPed )
1395
+ {
1396
+ // Fall tasks
1397
+ KillTask ( TASK_PRIORITY_EVENT_RESPONSE_TEMP );
1398
+ // Swim tasks
1399
+ KillTask ( TASK_PRIORITY_EVENT_RESPONSE_NONTEMP );
1400
+ // Jump & vehicle enter/exit & custom animation tasks
1401
+ KillTask ( TASK_PRIORITY_PRIMARY );
1402
+
1403
+ KillTaskSecondary ( TASK_SECONDARY_ATTACK );
1404
+
1405
+ // check we aren't in the fall and get up task
1406
+ CTask * pTaskPhysicalResponse = m_pTaskManager->GetTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
1407
+ // check our physical response task
1408
+ if ( pTaskPhysicalResponse && strcmp ( pTaskPhysicalResponse->GetTaskName ( ), " TASK_COMPLEX_FALL_AND_GET_UP" ) == 0 )
1409
+ {
1410
+ m_pTaskManager->RemoveTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
1411
+ }
1412
+ }
1413
+
1394
1414
// Eventually remove us from a previous vehicle
1395
1415
RemoveFromVehicle ();
1396
1416
// m_uiOccupyingSeat = uiSeat;
@@ -4138,17 +4158,6 @@ void CClientPed::InternalWarpIntoVehicle ( CVehicle* pGameVehicle )
4138
4158
{
4139
4159
if ( m_pPlayerPed )
4140
4160
{
4141
- // Reset whatever task
4142
- m_pTaskManager->RemoveTask ( TASK_PRIORITY_PRIMARY );
4143
-
4144
- // check we aren't in the fall and get up task
4145
- CTask * pTaskPhysicalResponse = m_pTaskManager->GetTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
4146
- // check our physical response task
4147
- if ( pTaskPhysicalResponse && strcmp ( pTaskPhysicalResponse->GetTaskName ( ), " TASK_COMPLEX_FALL_AND_GET_UP" ) == 0 )
4148
- {
4149
- m_pTaskManager->RemoveTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
4150
- }
4151
-
4152
4161
// Create a task to warp the player in and execute it
4153
4162
CTaskSimpleCarSetPedInAsDriver* pInTask = g_pGame->GetTasks ()->CreateTaskSimpleCarSetPedInAsDriver ( pGameVehicle );
4154
4163
if ( pInTask )
0 commit comments