Skip to content

Commit

Permalink
fix Pier 69 crash when talking to Cesar on rooftop
Browse files Browse the repository at this point in the history
fixes #30
  • Loading branch information
headshot2017 committed Sep 12, 2024
1 parent dbe1a92 commit 312c21e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mario.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ void marioTick(float dt)
bool leavingCar = (leaveCarTask && leaveCarTask->m_nNumGettingInSet);

CTaskSimpleUseGun* useGunTask = (CTaskSimpleUseGun*)ped->m_pIntelligence->m_TaskMgr.FindActiveTaskByType(TASK_SIMPLE_USE_GUN);
bool aimingHeavyGun = (useGunTask && !useGunTask->m_pWeaponInfo->m_nFlags.bAimWithArm);
bool aimingHeavyGun = (useGunTask && useGunTask->m_pWeaponInfo && !useGunTask->m_pWeaponInfo->m_nFlags.bAimWithArm);

bool fallingToVoid = (ped->GetPosition().z <= -100);

Expand Down
2 changes: 1 addition & 1 deletion mario_ped_tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ void marioPedTasksMaxFPS(CPlayerPed* ped, const int& marioId)
static float armsShoot = 0;
static float torsoShoot = 0;

if (task->m_pWeaponInfo->m_nFlags.bAimWithArm)
if (task->m_pWeaponInfo && task->m_pWeaponInfo->m_nFlags.bAimWithArm)
{
// used with normal pistol, sawed-off shotgun and uzi/tec9
bool reloading = (activeWeapon.m_nState == WEAPONSTATE_RELOADING);
Expand Down

0 comments on commit 312c21e

Please sign in to comment.