1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 17:30:00 +00:00
This commit is contained in:
eray orçunus 2020-01-11 20:36:46 +03:00
parent 6af77d8514
commit 5d119cf985
4 changed files with 17 additions and 17 deletions

View file

@ -812,7 +812,7 @@ void CMenuManager::Draw()
textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsDMA ? "FEM_ON" : "FEM_OFF"); textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsDMA ? "FEM_ON" : "FEM_OFF");
break; break;
case MENUACTION_MOUSESTEER: case MENUACTION_MOUSESTEER:
textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_bDisableMouseSteering ? "FEM_ON" : "FEM_OFF"); textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_bDisableMouseSteering ? "FEM_OFF" : "FEM_ON");
break; break;
} }

View file

@ -75,7 +75,7 @@ void CTimer::Shutdown(void)
; ;
} }
#if 1 #if 0
WRAPPER void CTimer::Update(void) { EAXJMP(0x4ACF70); } WRAPPER void CTimer::Update(void) { EAXJMP(0x4ACF70); }
#else #else
void CTimer::Update(void) void CTimer::Update(void)
@ -87,22 +87,22 @@ void CTimer::Update(void)
LARGE_INTEGER pc; LARGE_INTEGER pc;
QueryPerformanceCounter(&pc); QueryPerformanceCounter(&pc);
int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF; int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless
_oldPerfCounter = pc; _oldPerfCounter = pc;
double updInCyclesScaled = (double)updInCycles * ms_fTimeScale; float updInCyclesScaled = updInCycles * ms_fTimeScale;
double upd = updInCyclesScaled / (double)_nCyclesPerMS; double upd = updInCyclesScaled / (double)_nCyclesPerMS;
m_snTimeInMillisecondsPauseMode = (Int64)(m_snTimeInMillisecondsPauseMode + upd); m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd;
if ( GetIsPaused() ) if ( GetIsPaused() )
ms_fTimeStep = 0.0f; ms_fTimeStep = 0.0f;
else else
{ {
m_snTimeInMilliseconds = (Int64)(m_snTimeInMilliseconds + upd); m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd;
m_snTimeInMillisecondsNonClipped = (Int64)(m_snTimeInMillisecondsNonClipped + upd); m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd;
ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0; ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0;
} }
} }
@ -116,14 +116,14 @@ void CTimer::Update(void)
oldPcTimer = timer; oldPcTimer = timer;
m_snTimeInMillisecondsPauseMode = (Int64)(m_snTimeInMillisecondsPauseMode + upd); m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd;
if ( GetIsPaused() ) if ( GetIsPaused() )
ms_fTimeStep = 0.0f; ms_fTimeStep = 0.0f;
else else
{ {
m_snTimeInMilliseconds = (Int64)(m_snTimeInMilliseconds + upd); m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd;
m_snTimeInMillisecondsNonClipped = (Int64)(m_snTimeInMillisecondsNonClipped + upd); m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd;
ms_fTimeStep = upd / 1000.0f * 50.0f; ms_fTimeStep = upd / 1000.0f * 50.0f;
} }
} }
@ -192,7 +192,7 @@ uint32 CTimer::GetCurrentTimeInCycles(void)
{ {
LARGE_INTEGER pc; LARGE_INTEGER pc;
QueryPerformanceCounter(&pc); QueryPerformanceCounter(&pc);
return (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF; return (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless
} }
else else
return RsTimer() - oldPcTimer; return RsTimer() - oldPcTimer;
@ -218,7 +218,7 @@ void CTimer::EndUserPause(void)
m_UserPause = false; m_UserPause = false;
} }
#if 0 #if 1
STARTPATCHES STARTPATCHES
InjectHook(0x4ACE60, CTimer::Initialise, PATCH_JUMP); InjectHook(0x4ACE60, CTimer::Initialise, PATCH_JUMP);
InjectHook(0x4ACF60, CTimer::Shutdown, PATCH_JUMP); InjectHook(0x4ACF60, CTimer::Shutdown, PATCH_JUMP);

View file

@ -573,8 +573,6 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed)
if (CDarkel::FrenzyOnGoing()) if (CDarkel::FrenzyOnGoing())
goto switchDetectDone; goto switchDetectDone;
// The fact that m_nSelectedWepSlot is int8 makes below loops circular loop.
if (padUsed->CycleWeaponRightJustDown() && !m_pPointGunAt) { if (padUsed->CycleWeaponRightJustDown() && !m_pPointGunAt) {
if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON
@ -596,12 +594,14 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed)
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER && TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER
&& TheCamera.PlayerWeaponMode.Mode != CCam::MODE_ROCKETLAUNCHER) { && TheCamera.PlayerWeaponMode.Mode != CCam::MODE_ROCKETLAUNCHER) {
for (m_nSelectedWepSlot = m_currentWeapon - 1; m_nSelectedWepSlot >= 0; --m_nSelectedWepSlot) { for (m_nSelectedWepSlot = m_currentWeapon - 1; ; --m_nSelectedWepSlot) {
if (m_nSelectedWepSlot < WEAPONTYPE_UNARMED)
m_nSelectedWepSlot = WEAPONTYPE_DETONATOR;
if (HasWeapon(m_nSelectedWepSlot) && GetWeapon(m_nSelectedWepSlot).HasWeaponAmmoToBeUsed()) { if (HasWeapon(m_nSelectedWepSlot) && GetWeapon(m_nSelectedWepSlot).HasWeaponAmmoToBeUsed()) {
goto switchDetectDone; goto switchDetectDone;
} }
} }
m_nSelectedWepSlot = WEAPONTYPE_DETONATOR;
} }
} else if (CWeaponInfo::GetWeaponInfo((eWeaponType)m_currentWeapon)->m_eWeaponFire != WEAPON_FIRE_MELEE) { } else if (CWeaponInfo::GetWeaponInfo((eWeaponType)m_currentWeapon)->m_eWeaponFire != WEAPON_FIRE_MELEE) {
if (GetWeapon(m_currentWeapon).m_nAmmoTotal <= 0) { if (GetWeapon(m_currentWeapon).m_nAmmoTotal <= 0) {

View file

@ -13,7 +13,7 @@ public:
float m_fCurrentStamina; float m_fCurrentStamina;
float m_fMaxStamina; float m_fMaxStamina;
float m_fStaminaProgress; float m_fStaminaProgress;
uint8 m_nSelectedWepSlot; // eWeaponType int8 m_nSelectedWepSlot; // eWeaponType
bool m_bSpeedTimerFlag; bool m_bSpeedTimerFlag;
bool m_bShouldEvade; bool m_bShouldEvade;
int8 field_1367; int8 field_1367;