mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 14:38:09 +00:00
R to freeroam, idle anims, weapon and cam enum fix
This commit is contained in:
@ -308,7 +308,7 @@ CCam::Process(void)
|
||||
}
|
||||
|
||||
if(Mode == MODE_SNIPER || Mode == MODE_ROCKETLAUNCHER || Mode == MODE_M16_1STPERSON ||
|
||||
Mode == MODE_1STPERSON || Mode == MODE_HELICANNON_1STPERSON || GetWeaponFirstPersonOn())
|
||||
Mode == MODE_1STPERSON || Mode == MODE_HELICANNON_1STPERSON || Mode == MODE_CAMERA || GetWeaponFirstPersonOn())
|
||||
ClipIfPedInFrontOfPlayer();
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
MODE_SPECIAL_FIXED_FOR_SYPHON,
|
||||
MODE_FIGHT_CAM,
|
||||
MODE_TOP_DOWN_PED,
|
||||
MODE_LIGHTHOUSE,
|
||||
MODE_SNIPER_RUNABOUT,
|
||||
MODE_ROCKETLAUNCHER_RUNABOUT,
|
||||
MODE_1STPERSON_RUNABOUT,
|
||||
@ -92,7 +93,6 @@ public:
|
||||
MODE_FIGHT_CAM_RUNABOUT,
|
||||
MODE_EDITOR,
|
||||
MODE_HELICANNON_1STPERSON,
|
||||
MODE_45,
|
||||
MODE_CAMERA,
|
||||
};
|
||||
|
||||
|
@ -3470,6 +3470,24 @@ CMenuManager::ProcessButtonPresses(void)
|
||||
bool assumeIncrease = false;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEBUG_SCRIPT_LOADER
|
||||
if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_NEW_GAME || m_nCurrScreen == MENUPAGE_NEW_GAME_RELOAD) {
|
||||
#ifdef RW_GL3
|
||||
if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_R) == GLFW_PRESS) {
|
||||
scriptToLoad = 1;
|
||||
DoSettingsBeforeStartingAGame();
|
||||
return;
|
||||
}
|
||||
#elif defined _WIN32
|
||||
if (GetAsyncKeyState('R') & 0x8000) {
|
||||
scriptToLoad = 1;
|
||||
DoSettingsBeforeStartingAGame();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!m_bShowMouse && (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY)) {
|
||||
m_bShowMouse = true;
|
||||
}
|
||||
@ -4894,6 +4912,9 @@ CMenuManager::ProcessFileActions()
|
||||
}
|
||||
if (m_nCurrScreen == MENUPAGE_LOADING_IN_PROGRESS) {
|
||||
if (CheckSlotDataValid(m_nCurrSaveSlot)) {
|
||||
#ifdef USE_DEBUG_SCRIPT_LOADER
|
||||
scriptToLoad = 0;
|
||||
#endif
|
||||
DoSettingsBeforeStartingAGame();
|
||||
m_bWantToLoad = true;
|
||||
}
|
||||
|
@ -378,15 +378,13 @@ void AltDodoCheat(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||
bool
|
||||
CControllerState::IsAnyButtonPressed(void)
|
||||
CControllerState::CheckForInput(void)
|
||||
{
|
||||
return !!LeftStickX || !!LeftStickY || !!RightStickX || !!RightStickY || !!LeftShoulder1 || !!LeftShoulder2 || !!RightShoulder1 || !!RightShoulder2 ||
|
||||
!!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight || !!Start || !!Select || !!Square || !!Triangle || !!Cross || !!Circle || !!LeftShock ||
|
||||
!!RightShock || !!NetworkTalk;
|
||||
!!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight || !!Start || !!Select || !!Square || !!Triangle || !!Cross || !!Circle || !!LeftShock ||
|
||||
!!RightShock;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
CControllerState::Clear(void)
|
||||
@ -484,6 +482,11 @@ void CPad::Clear(bool bResetPlayerControls)
|
||||
AverageEntries = 0;
|
||||
}
|
||||
|
||||
uint32 CPad::InputHowLongAgo()
|
||||
{
|
||||
return CTimer::GetTimeInMilliseconds() - LastTimeTouched;
|
||||
}
|
||||
|
||||
void CPad::ClearMouseHistory()
|
||||
{
|
||||
PCTempMouseControllerState.Clear();
|
||||
@ -1155,7 +1158,7 @@ void CPad::UpdatePads(void)
|
||||
CapturePad(0);
|
||||
#endif
|
||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||
if (GetPad(0)->PCTempJoyState.IsAnyButtonPressed())
|
||||
if (GetPad(0)->PCTempJoyState.CheckForInput())
|
||||
IsAffectedByController = true;
|
||||
else {
|
||||
#endif
|
||||
@ -1165,11 +1168,11 @@ void CPad::UpdatePads(void)
|
||||
|
||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||
}
|
||||
if (IsAffectedByController && (GetPad(0)->PCTempKeyState.IsAnyButtonPressed() || GetPad(0)->PCTempMouseState.IsAnyButtonPressed()))
|
||||
if (IsAffectedByController && (GetPad(0)->PCTempKeyState.CheckForInput() || GetPad(0)->PCTempMouseState.CheckForInput()))
|
||||
IsAffectedByController = false;
|
||||
#endif
|
||||
|
||||
if ( CReplay::IsPlayingBackFromFile() )
|
||||
if ( CReplay::IsPlayingBackFromFile() && !FrontEndMenuManager.m_bMenuActive )
|
||||
bUpdate = false;
|
||||
|
||||
if ( bUpdate )
|
||||
@ -1209,6 +1212,9 @@ void CPad::Update(int16 unk)
|
||||
PCTempMouseState.Clear();
|
||||
|
||||
ProcessPCSpecificStuff();
|
||||
|
||||
if (NewState.CheckForInput())
|
||||
LastTimeTouched = CTimer::GetTimeInMilliseconds();
|
||||
|
||||
if ( ++iCurrHornHistory >= HORNHISTORY_SIZE )
|
||||
iCurrHornHistory = 0;
|
||||
|
@ -29,9 +29,7 @@ public:
|
||||
float GetRightStickX(void) { return RightStickX/32767.0f; };
|
||||
float GetRightStickY(void) { return RightStickY/32767.0f; };
|
||||
|
||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||
bool IsAnyButtonPressed();
|
||||
#endif
|
||||
bool CheckForInput();
|
||||
void Clear(void);
|
||||
};
|
||||
VALIDATE_SIZE(CControllerState, 0x2A);
|
||||
@ -260,6 +258,7 @@ public:
|
||||
static void ResetCheats(void);
|
||||
static char *EditString(char *pStr, int32 nSize);
|
||||
static int32 *EditCodesForControls(int32 *pRsKeys, int32 nSize);
|
||||
uint32 InputHowLongAgo(void);
|
||||
|
||||
#ifdef XINPUT
|
||||
void AffectFromXinput(uint32 pad);
|
||||
|
Reference in New Issue
Block a user