fix: prevent dying while using spectate & freecam (#179)
This commit is contained in:
parent
525b4d6459
commit
07bdd6a927
@ -18,8 +18,8 @@ namespace big
|
||||
|
||||
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(false, -1);
|
||||
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(false, -1);
|
||||
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), false);
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID()), false);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -29,9 +29,9 @@ namespace big
|
||||
|
||||
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(true, target);
|
||||
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(true, target);
|
||||
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), true);
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID()), true);
|
||||
|
||||
bReset = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ namespace big
|
||||
vecPosition = CAM::GET_GAMEPLAY_CAM_COORD();
|
||||
vecRot = CAM::GET_GAMEPLAY_CAM_ROT(2);
|
||||
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID()), true);
|
||||
CAM::SET_CAM_COORD(cCam, vecPosition.x, vecPosition.y, vecPosition.z);
|
||||
CAM::SET_CAM_ROT(cCam, vecRot.x, vecRot.y, vecRot.z, 2);
|
||||
CAM::SET_CAM_ACTIVE(cCam, true);
|
||||
@ -36,6 +37,7 @@ namespace big
|
||||
}
|
||||
else if (!g->self.free_cam && bLastFreeCam)
|
||||
{
|
||||
ENTITY::FREEZE_ENTITY_POSITION(PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID()), false);
|
||||
CAM::SET_CAM_ACTIVE(cCam, false);
|
||||
CAM::RENDER_SCRIPT_CAMS(false, true, 500, true, true, 0);
|
||||
CAM::DESTROY_CAM(cCam, false);
|
||||
@ -92,4 +94,4 @@ namespace big
|
||||
vecRot = CAM::GET_GAMEPLAY_CAM_ROT(2);
|
||||
CAM::SET_CAM_ROT(cCam, vecRot.x, vecRot.y, vecRot.z, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user