diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-22 12:27:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 12:27:25 +0200 |
commit | 043f09f3fb08178eaea7e07da395dcb7b710249f (patch) | |
tree | 3b0cb6f663e297ac8cef52b8803408159d9a1e19 /src/core | |
parent | FOV fix (diff) | |
parent | updated player control names (diff) | |
download | re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar.gz re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar.bz2 re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar.lz re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar.xz re3-043f09f3fb08178eaea7e07da395dcb7b710249f.tar.zst re3-043f09f3fb08178eaea7e07da395dcb7b710249f.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Cam.cpp | 6 | ||||
-rw-r--r-- | src/core/Camera.cpp | 4 | ||||
-rw-r--r-- | src/core/Pad.h | 14 | ||||
-rw-r--r-- | src/core/PlayerInfo.cpp | 4 | ||||
-rw-r--r-- | src/core/config.h | 2 |
5 files changed, 18 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 785a9d12..cc463f07 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; diff --git a/src/core/config.h b/src/core/config.h index 6835267d..f7efe694 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -233,6 +233,8 @@ enum Config { #define USE_PRECISE_MEASUREMENT_CONVERTION // makes game convert feet to meeters more precisely #define MISSION_REPLAY // mobile feature //#define SIMPLIER_MISSIONS // apply simplifications from mobile +#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT +#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log // Replay //#define DONT_FIX_REPLAY_BUGS // keeps various bugs in CReplay, some of which are fairly cool! |