@@ -1374,6 +1374,26 @@ void CClientPed::WarpIntoVehicle ( CClientVehicle* pVehicle, unsigned int uiSeat
1374
1374
SetSunbathing ( false );
1375
1375
KillAnimation ();
1376
1376
1377
+ if ( m_pPlayerPed )
1378
+ {
1379
+ // Fall tasks
1380
+ KillTask ( TASK_PRIORITY_EVENT_RESPONSE_TEMP );
1381
+ // Swim tasks
1382
+ KillTask ( TASK_PRIORITY_EVENT_RESPONSE_NONTEMP );
1383
+ // Jump & vehicle enter/exit & custom animation tasks
1384
+ KillTask ( TASK_PRIORITY_PRIMARY );
1385
+
1386
+ KillTaskSecondary ( TASK_SECONDARY_ATTACK );
1387
+
1388
+ // check we aren't in the fall and get up task
1389
+ CTask * pTaskPhysicalResponse = m_pTaskManager->GetTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
1390
+ // check our physical response task
1391
+ if ( pTaskPhysicalResponse && strcmp ( pTaskPhysicalResponse->GetTaskName ( ), " TASK_COMPLEX_FALL_AND_GET_UP" ) == 0 )
1392
+ {
1393
+ m_pTaskManager->RemoveTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
1394
+ }
1395
+ }
1396
+
1377
1397
// Eventually remove us from a previous vehicle
1378
1398
RemoveFromVehicle ();
1379
1399
// m_uiOccupyingSeat = uiSeat;
@@ -4057,17 +4077,6 @@ void CClientPed::InternalWarpIntoVehicle ( CVehicle* pGameVehicle )
4057
4077
{
4058
4078
if ( m_pPlayerPed )
4059
4079
{
4060
- // Reset whatever task
4061
- m_pTaskManager->RemoveTask ( TASK_PRIORITY_PRIMARY );
4062
-
4063
- // check we aren't in the fall and get up task
4064
- CTask * pTaskPhysicalResponse = m_pTaskManager->GetTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
4065
- // check our physical response task
4066
- if ( pTaskPhysicalResponse && strcmp ( pTaskPhysicalResponse->GetTaskName ( ), " TASK_COMPLEX_FALL_AND_GET_UP" ) == 0 )
4067
- {
4068
- m_pTaskManager->RemoveTask ( TASK_PRIORITY_PHYSICAL_RESPONSE );
4069
- }
4070
-
4071
4080
// Create a task to warp the player in and execute it
4072
4081
CTaskSimpleCarSetPedInAsDriver* pInTask = g_pGame->GetTasks ()->CreateTaskSimpleCarSetPedInAsDriver ( pGameVehicle );
4073
4082
if ( pInTask )
0 commit comments