summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-06-21 15:00:17 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-06-21 15:00:17 +0200
commit7a71a47f743b1496c069cf5c4f2765877aea412b (patch)
treec8f3183ea7af47d9d01fb5b661b359d92fb56440 /src/core
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar.gz
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar.bz2
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar.lz
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar.xz
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.tar.zst
re3-7a71a47f743b1496c069cf5c4f2765877aea412b.zip
Diffstat (limited to '')
-rw-r--r--src/core/Cam.cpp6
-rw-r--r--src/core/Camera.cpp4
-rw-r--r--src/core/Pad.h14
-rw-r--r--src/core/PlayerInfo.cpp4
4 files changed, 16 insertions, 12 deletions
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index ede5741e..1194a12d 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -3834,7 +3834,11 @@ CCam::Process_Debug(const CVector&, float, float, float)
Source.y += 1.0f;
GetVectorsReadyForRW();
- CPad::GetPad(0)->DisablePlayerControls = PLAYERCONTROL_DISABLED_1;
+#ifdef FIX_BUGS
+ CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CAMERA);
+#else
+ CPad::GetPad(0)->DisablePlayerControls = PLAYERCONTROL_CAMERA;
+#endif
if(CPad::GetPad(1)->GetLeftShockJustDown() && gbBigWhiteDebugLightSwitchedOn)
CShadows::StoreShadowToBeRendered(SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &Source,
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index af62e180..f3f369f2 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -781,7 +781,7 @@ CCamera::CamControl(void)
m_bFailedCullZoneTestPreviously = CCullZones::CamCloseInForPlayer();
if(m_bLookingAtPlayer){
- CPad::GetPad(0)->DisablePlayerControls &= ~PLAYERCONTROL_DISABLED_1;
+ CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CAMERA);
FindPlayerPed()->bIsVisible = true;
}
@@ -1049,7 +1049,7 @@ CCamera::CamControl(void)
m_bFirstPersonBeingUsed = false;
if(m_bFirstPersonBeingUsed){
ReqMode = CCam::MODE_1STPERSON;
- CPad::GetPad(0)->DisablePlayerControls |= PLAYERCONTROL_DISABLED_1;
+ CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CAMERA);
}
// Zoom value
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 1f29aa60..06bce073 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -2,14 +2,14 @@
enum {
PLAYERCONTROL_ENABLED = 0,
- PLAYERCONTROL_DISABLED_1 = 1, // used by first person camera
- PLAYERCONTROL_DISABLED_2 = 2,
+ PLAYERCONTROL_CAMERA = 1,
+ PLAYERCONTROL_UNK2 = 2,
PLAYERCONTROL_GARAGE = 4,
- PLAYERCONTROL_DISABLED_8 = 8,
- PLAYERCONTROL_DISABLED_10 = 16,
- PLAYERCONTROL_DISABLED_20 = 32, // used on CPlayerInfo::MakePlayerSafe
- PLAYERCONTROL_DISABLED_40 = 64, // used on phone calls
- PLAYERCONTROL_DISABLED_80 = 128,// used on cutscenes
+ PLAYERCONTROL_UNK8 = 8,
+ PLAYERCONTROL_UNK10 = 16,
+ PLAYERCONTROL_PLAYERINFO = 32,
+ PLAYERCONTROL_PHONE = 64,
+ PLAYERCONTROL_CUTSCENE = 128,
};
class CControllerState
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index c3cc0960..128b22b4 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -174,7 +174,7 @@ CPlayerInfo::MakePlayerSafe(bool toggle)
CTheScripts::ResetCountdownToMakePlayerUnsafe();
m_pPed->m_pWanted->m_bIgnoredByEveryone = true;
CWorld::StopAllLawEnforcersInTheirTracks();
- CPad::GetPad(0)->DisablePlayerControls |= PLAYERCONTROL_DISABLED_20;
+ CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PLAYERINFO);
CPad::StopPadsShaking();
m_pPed->bBulletProof = true;
m_pPed->bFireProof = true;
@@ -194,7 +194,7 @@ CPlayerInfo::MakePlayerSafe(bool toggle)
} else if (!CGame::playingIntro && !CTheScripts::IsCountdownToMakePlayerUnsafeOn()) {
m_pPed->m_pWanted->m_bIgnoredByEveryone = false;
- CPad::GetPad(0)->DisablePlayerControls &= ~PLAYERCONTROL_DISABLED_20;
+ CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_PLAYERINFO);
m_pPed->bBulletProof = false;
m_pPed->bFireProof = false;
m_pPed->bCollisionProof = false;