fixes, mostly from miami

This commit is contained in:
eray orçunus 2020-06-04 06:03:12 +03:00
parent 2578880e1c
commit 016ebc0b00
13 changed files with 191 additions and 171 deletions

View File

@ -1554,27 +1554,23 @@ cAudioManager::UsesSirenSwitching(int32 model) const
} }
} }
void bool
cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params) cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
{ {
const float SOUND_INTENSITY = 110.0f; const float SOUND_INTENSITY = 110.0f;
if (params->m_fDistance < SQR(SOUND_INTENSITY)) { if (params->m_fDistance < SQR(SOUND_INTENSITY)) {
CVehicle *veh = params->m_pVehicle; CVehicle *veh = params->m_pVehicle;
if (veh->m_bSirenOrAlarm == false && veh->m_nAlarmState <= 0) if (veh->m_bSirenOrAlarm == false && !veh->IsAlarmOn())
return; return true;
#ifdef FIX_BUGS
if (params->m_pVehicle->GetStatus() == STATUS_WRECKED)
return;
#endif
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance); CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, SOUND_INTENSITY, m_sQueueSample.m_fDistance); m_sQueueSample.m_nVolume = ComputeVolume(80, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume != 0) { if (m_sQueueSample.m_nVolume != 0) {
m_sQueueSample.m_nCounter = 5; m_sQueueSample.m_nCounter = 5;
if (UsesSiren(params->m_nIndex)) { if (UsesSiren(params->m_nIndex)) {
if (params->m_pVehicle->GetStatus() == STATUS_ABANDONED) if (params->m_pVehicle->GetStatus() == STATUS_ABANDONED)
return; return true;
if (veh->m_nCarHornTimer && params->m_nIndex != FIRETRUK) { if (veh->m_nCarHornTimer && params->m_nIndex != FIRETRUK) {
m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST; m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST;
if (params->m_nIndex == FBICAR) if (params->m_nIndex == FBICAR)
@ -1604,8 +1600,11 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
m_sQueueSample.m_bReverbFlag = true; m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false; m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue(); AddSampleToRequestedQueue();
} return true;
} } else
return true;
} else
return false;
} }
bool bool
@ -2046,7 +2045,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
maxDist = SQR(SOUND_INTENSITY); maxDist = SQR(SOUND_INTENSITY);
break; break;
} }
case SOUND_17: { case SOUND_BOAT_SLOWDOWN: {
const float SOUND_INTENSITY = 50.0f; const float SOUND_INTENSITY = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_THUMB_OFF; m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_THUMB_OFF;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN;
@ -2059,8 +2058,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
maxDist = SQR(SOUND_INTENSITY); maxDist = SQR(SOUND_INTENSITY);
break; break;
} }
case SOUND_18: case SOUND_TRAIN_DOOR_CLOSE:
case SOUND_19: { case SOUND_TRAIN_DOOR_OPEN: {
const float SOUND_INTENSITY = 35.0f; const float SOUND_INTENSITY = 35.0f;
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES; m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN; m_sQueueSample.m_nBankIndex = SAMPLEBANK_MAIN;
@ -2414,7 +2413,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_IDLE; m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_IDLE;
if (LastAccel > 20) { if (LastAccel > 20) {
oneShotVol = LastVol; oneShotVol = LastVol;
PlayOneShot(m_sQueueSample.m_nEntityIndex, SOUND_17, oneShotVol); PlayOneShot(m_sQueueSample.m_nEntityIndex, SOUND_BOAT_SLOWDOWN, oneShotVol);
} }
} else { } else {
emittingVol = 105 * padAccelerate / 255 + 15; emittingVol = 105 * padAccelerate / 255 + 15;
@ -8002,7 +8001,7 @@ cAudioManager::ProcessFrontEnd()
processedPickup = true; processedPickup = true;
stereo = true; stereo = true;
break; break;
case SOUND_4A: case SOUND_PICKUP_ERROR:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT; m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
processedPickup = true; processedPickup = true;
stereo = true; stereo = true;
@ -8037,19 +8036,19 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nSampleIndex = SFX_START_BUTTON_LEFT; m_sQueueSample.m_nSampleIndex = SFX_START_BUTTON_LEFT;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_MENU_COMPLETED: case SOUND_FRONTEND_MENU_NEW_PAGE:
m_sQueueSample.m_nSampleIndex = SFX_PAGE_CHANGE_AND_BACK_LEFT; m_sQueueSample.m_nSampleIndex = SFX_PAGE_CHANGE_AND_BACK_LEFT;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_MENU_DENIED: case SOUND_FRONTEND_MENU_NAVIGATION:
m_sQueueSample.m_nSampleIndex = SFX_HIGHLIGHT_LEFT; m_sQueueSample.m_nSampleIndex = SFX_HIGHLIGHT_LEFT;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_MENU_SUCCESS: case SOUND_FRONTEND_MENU_SETTING_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_SELECT_LEFT; m_sQueueSample.m_nSampleIndex = SFX_SELECT_LEFT;
stereo = true; stereo = true;
break; break;
case SOUND_FRONTEND_EXIT: case SOUND_FRONTEND_MENU_BACK:
m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT; m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
stereo = true; stereo = true;
break; break;
@ -8071,7 +8070,7 @@ cAudioManager::ProcessFrontEnd()
case SOUND_FRONTEND_RADIO_CHANGE: case SOUND_FRONTEND_RADIO_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK; m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK;
break; break;
case SOUND_A0: case SOUND_HUD:
m_sQueueSample.m_nSampleIndex = SFX_INFO; m_sQueueSample.m_nSampleIndex = SFX_INFO;
break; break;
default: default:

View File

@ -420,7 +420,7 @@ public:
void ProcessVehicleOneShots(cVehicleParams *params); void ProcessVehicleOneShots(cVehicleParams *params);
bool ProcessVehicleReverseWarning(cVehicleParams *params); bool ProcessVehicleReverseWarning(cVehicleParams *params);
bool ProcessVehicleRoadNoise(cVehicleParams *params); bool ProcessVehicleRoadNoise(cVehicleParams *params);
void ProcessVehicleSirenOrAlarm(cVehicleParams *params); bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
void ProcessVehicleSkidding(cVehicleParams *params); void ProcessVehicleSkidding(cVehicleParams *params);
void ProcessWaterCannon(int32); void ProcessWaterCannon(int32);
void ProcessWeather(int32 id); void ProcessWeather(int32 id);

View File

@ -25,9 +25,9 @@ enum eSound : uint16
SOUND_CAR_HYDRAULIC_3, SOUND_CAR_HYDRAULIC_3,
SOUND_CAR_JERK, SOUND_CAR_JERK,
SOUND_CAR_SPLASH, SOUND_CAR_SPLASH,
SOUND_17, SOUND_BOAT_SLOWDOWN,
SOUND_18, SOUND_TRAIN_DOOR_CLOSE,
SOUND_19, SOUND_TRAIN_DOOR_OPEN,
SOUND_CAR_TANK_TURRET_ROTATE, SOUND_CAR_TANK_TURRET_ROTATE,
SOUND_CAR_BOMB_TICK, SOUND_CAR_BOMB_TICK,
SOUND_PLANE_ON_GROUND, SOUND_PLANE_ON_GROUND,
@ -76,7 +76,7 @@ enum eSound : uint16
SOUND_PICKUP_WEAPON_BOUGHT, SOUND_PICKUP_WEAPON_BOUGHT,
SOUND_PICKUP_WEAPON, SOUND_PICKUP_WEAPON,
SOUND_PICKUP_HEALTH, SOUND_PICKUP_HEALTH,
SOUND_4A, SOUND_PICKUP_ERROR,
SOUND_4B, SOUND_4B,
SOUND_PICKUP_ADRENALINE, SOUND_PICKUP_ADRENALINE,
SOUND_PICKUP_ARMOUR, SOUND_PICKUP_ARMOUR,
@ -99,25 +99,25 @@ enum eSound : uint16
SOUND_EVIDENCE_PICKUP, SOUND_EVIDENCE_PICKUP,
SOUND_UNLOAD_GOLD, SOUND_UNLOAD_GOLD,
SOUND_PAGER, SOUND_PAGER,
SOUND_PED_DEATH, // 103 in VC SOUND_PED_DEATH,
SOUND_PED_DAMAGE, // 104 in VC SOUND_PED_DAMAGE,
SOUND_PED_HIT, // 105 in VC SOUND_PED_HIT,
SOUND_PED_LAND, // hopefully 106 in VC SOUND_PED_LAND,
SOUND_PED_BULLET_HIT, SOUND_PED_BULLET_HIT,
SOUND_PED_BOMBER, SOUND_PED_BOMBER,
SOUND_PED_BURNING, // 108 in VC SOUND_PED_BURNING,
SOUND_PED_ARREST_FBI, SOUND_PED_ARREST_FBI,
SOUND_PED_ARREST_SWAT, SOUND_PED_ARREST_SWAT,
SOUND_PED_ARREST_COP, SOUND_PED_ARREST_COP,
SOUND_PED_HELI_PLAYER_FOUND, SOUND_PED_HELI_PLAYER_FOUND,
SOUND_PED_HANDS_UP, SOUND_PED_HANDS_UP,
SOUND_PED_HANDS_COWER, SOUND_PED_HANDS_COWER,
SOUND_PED_FLEE_SPRINT, // 120 in VC SOUND_PED_FLEE_SPRINT,
SOUND_PED_CAR_JACKING, SOUND_PED_CAR_JACKING,
SOUND_PED_MUGGING, SOUND_PED_MUGGING,
SOUND_PED_CAR_JACKED, SOUND_PED_CAR_JACKED,
SOUND_PED_ROBBED, SOUND_PED_ROBBED,
SOUND_PED_TAXI_WAIT, // 137 in VC SOUND_PED_TAXI_WAIT,
SOUND_PED_ATTACK, SOUND_PED_ATTACK,
SOUND_PED_DEFEND, SOUND_PED_DEFEND,
SOUND_PED_PURSUIT_ARMY, SOUND_PED_PURSUIT_ARMY,
@ -127,9 +127,9 @@ enum eSound : uint16
SOUND_PED_HEALING, SOUND_PED_HEALING,
SOUND_PED_7B, SOUND_PED_7B,
SOUND_PED_LEAVE_VEHICLE, SOUND_PED_LEAVE_VEHICLE,
SOUND_PED_EVADE, // 142 in VC SOUND_PED_EVADE,
SOUND_PED_FLEE_RUN, SOUND_PED_FLEE_RUN,
SOUND_PED_CAR_COLLISION, // 144-145-146 in VC SOUND_PED_CAR_COLLISION,
SOUND_PED_SOLICIT, SOUND_PED_SOLICIT,
SOUND_PED_EXTINGUISHING_FIRE, SOUND_PED_EXTINGUISHING_FIRE,
SOUND_PED_WAIT_DOUBLEBACK, SOUND_PED_WAIT_DOUBLEBACK,
@ -152,17 +152,17 @@ enum eSound : uint16
SOUND_CLOCK_TICK, SOUND_CLOCK_TICK,
SOUND_PART_MISSION_COMPLETE, SOUND_PART_MISSION_COMPLETE,
SOUND_FRONTEND_MENU_STARTING, SOUND_FRONTEND_MENU_STARTING,
SOUND_FRONTEND_MENU_COMPLETED, SOUND_FRONTEND_MENU_NEW_PAGE,
SOUND_FRONTEND_MENU_DENIED, SOUND_FRONTEND_MENU_NAVIGATION,
SOUND_FRONTEND_MENU_SUCCESS, SOUND_FRONTEND_MENU_SETTING_CHANGE,
SOUND_FRONTEND_EXIT, SOUND_FRONTEND_MENU_BACK,
SOUND_9A, SOUND_9A,
SOUND_9B, SOUND_9B,
SOUND_FRONTEND_AUDIO_TEST, SOUND_FRONTEND_AUDIO_TEST,
SOUND_FRONTEND_FAIL, SOUND_FRONTEND_FAIL,
SOUND_FRONTEND_NO_RADIO, SOUND_FRONTEND_NO_RADIO,
SOUND_FRONTEND_RADIO_CHANGE, SOUND_FRONTEND_RADIO_CHANGE,
SOUND_A0, SOUND_HUD,
SOUND_AMMUNATION_WELCOME_1, SOUND_AMMUNATION_WELCOME_1,
SOUND_AMMUNATION_WELCOME_2, SOUND_AMMUNATION_WELCOME_2,
SOUND_AMMUNATION_WELCOME_3, SOUND_AMMUNATION_WELCOME_3,

View File

@ -274,8 +274,9 @@ ScaleAndCenterX(float x)
#define ChangeScreen(screen, option, updateDelay, clearAlpha) \ #define ChangeScreen(screen, option, updateDelay, clearAlpha) \
do { \ do { \
m_nPrevScreen = m_nCurrScreen; \ m_nPrevScreen = m_nCurrScreen; \
int newOpt = option; \
m_nCurrScreen = screen; \ m_nCurrScreen = screen; \
m_nCurrOption = option; \ m_nCurrOption = newOpt; \
if(updateDelay) \ if(updateDelay) \
m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode(); \ m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode(); \
if(clearAlpha) \ if(clearAlpha) \
@ -351,7 +352,7 @@ CMenuManager::PageUpList(bool playSoundOnSuccess)
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
if (m_nFirstVisibleRowOnList > 0) { if (m_nFirstVisibleRowOnList > 0) {
if(playSoundOnSuccess) if(playSoundOnSuccess)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW); m_nFirstVisibleRowOnList = Max(0, m_nFirstVisibleRowOnList - MAX_VISIBLE_LIST_ROW);
m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1); m_nSelectedListRow = Min(m_nSelectedListRow, m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW - 1);
@ -369,7 +370,7 @@ CMenuManager::PageDownList(bool playSoundOnSuccess)
if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow > MAX_VISIBLE_LIST_ROW) {
if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) { if (m_nFirstVisibleRowOnList < m_nTotalListRow - MAX_VISIBLE_LIST_ROW) {
if(playSoundOnSuccess) if(playSoundOnSuccess)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW); m_nFirstVisibleRowOnList = Min(m_nFirstVisibleRowOnList + MAX_VISIBLE_LIST_ROW, m_nTotalListRow - MAX_VISIBLE_LIST_ROW);
m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList); m_nSelectedListRow = Max(m_nSelectedListRow, m_nFirstVisibleRowOnList);
@ -652,7 +653,7 @@ CMenuManager::DisplayHelperText()
case 0: case 0:
{ {
int action = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; int action = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
if (action != MENUACTION_CHANGEMENU && action != MENUACTION_REDEFCTRL && action != MENUACTION_RESTOREDEF) { if (action != MENUACTION_CHANGEMENU && action != MENUACTION_KEYBOARDCTRLS && action != MENUACTION_RESTOREDEF) {
CFont::SetColor(CRGBA(255, 255, 255, 255)); CFont::SetColor(CRGBA(255, 255, 255, 255));
CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_MIG")); CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_MIG"));
} }
@ -1255,7 +1256,7 @@ CMenuManager::Draw()
} }
if (oldOption != m_nCurrOption) { if (oldOption != m_nCurrOption) {
if (oldScreen == m_nCurrScreen && m_bShowMouse) if (oldScreen == m_nCurrScreen && m_bShowMouse)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
oldOption = m_nCurrOption; oldOption = m_nCurrOption;
oldScreen = m_nCurrScreen; oldScreen = m_nCurrScreen;
@ -1769,7 +1770,7 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE));
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
if (!m_bKeyIsOK) if (!m_bKeyIsOK)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_bKeyIsOK = true; m_bKeyIsOK = true;
} else { } else {
@ -1973,7 +1974,7 @@ CMenuManager::DrawControllerSetupScreen()
float curOptY = i * rowHeight + yStart; float curOptY = i * rowHeight + yStart;
if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) { if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) {
if (m_nPrevOption != i && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nPrevOption != i && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nPrevOption = i; m_nPrevOption = i;
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) { if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
@ -1987,7 +1988,7 @@ CMenuManager::DrawControllerSetupScreen()
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) { if (m_nMousePosX > MENU_X_LEFT_ALIGNED(0.0f) && m_nMousePosX < MENU_X_LEFT_ALIGNED(370.0f)) {
#endif #endif
if (m_nSelectedContSetupColumn != CONTSETUP_PED_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nSelectedContSetupColumn != CONTSETUP_PED_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_PED_COLUMN;
#ifdef FIX_BUGS #ifdef FIX_BUGS
@ -1996,7 +1997,7 @@ CMenuManager::DrawControllerSetupScreen()
} else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) { } else if (m_nMousePosX > MENU_X_LEFT_ALIGNED(370.0f) && m_nMousePosX < SCREEN_WIDTH) {
#endif #endif
if (m_nSelectedContSetupColumn != CONTSETUP_VEHICLE_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST) if (m_nSelectedContSetupColumn != CONTSETUP_VEHICLE_COLUMN && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
} }
@ -2694,13 +2695,13 @@ CMenuManager::DrawPlayerSetupScreen()
if (rowIdx == m_nSelectedListRow) { if (rowIdx == m_nSelectedListRow) {
m_nHoverOption = HOVEROPTION_NOT_HOVERING; m_nHoverOption = HOVEROPTION_NOT_HOVERING;
if (m_nSkinsTotal > 0) { if (m_nSkinsTotal > 0) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
strcpy(m_PrefsSkinFile, m_aSkinName); strcpy(m_PrefsSkinFile, m_aSkinName);
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile); CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
SaveSettings(); SaveSettings();
} }
} else { } else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_nSelectedListRow = rowIdx; m_nSelectedListRow = rowIdx;
m_nHoverOption = HOVEROPTION_NOT_HOVERING; m_nHoverOption = HOVEROPTION_NOT_HOVERING;
@ -2856,7 +2857,7 @@ CMenuManager::DrawPlayerSetupScreen()
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26)) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|| m_nCurrExLayer == HOVEROPTION_BACK) { || m_nCurrExLayer == HOVEROPTION_BACK) {
if (m_nHoverOption != HOVEROPTION_BACK) if (m_nHoverOption != HOVEROPTION_BACK)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nHoverOption = HOVEROPTION_BACK; m_nHoverOption = HOVEROPTION_BACK;
@ -2867,7 +2868,7 @@ CMenuManager::DrawPlayerSetupScreen()
&& m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26)) && m_nMousePosY < SCREEN_SCALE_FROM_BOTTOM(PLAYERSETUP_LIST_BOTTOM - 26))
|| m_nCurrExLayer == HOVEROPTION_USESKIN) { || m_nCurrExLayer == HOVEROPTION_USESKIN) {
if (m_nHoverOption != HOVEROPTION_USESKIN) if (m_nHoverOption != HOVEROPTION_USESKIN)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_nHoverOption = HOVEROPTION_USESKIN; m_nHoverOption = HOVEROPTION_USESKIN;
@ -3655,7 +3656,7 @@ CMenuManager::Process(void)
field_535 = true; field_535 = true;
} else { } else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i); ControlsManager.ClearSettingsAssociatedWithAction((e_ControllerAction)m_CurrCntrlAction, (eControllerType)i);
m_bKeyIsOK = false; m_bKeyIsOK = false;
@ -3782,7 +3783,7 @@ CMenuManager::ProcessButtonPresses(void)
} }
if (CPad::GetPad(0)->GetTabJustDown()) { if (CPad::GetPad(0)->GetTabJustDown()) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
m_bShowMouse = false; m_bShowMouse = false;
switch (m_nCurrExLayer) { switch (m_nCurrExLayer) {
case HOVEROPTION_BACK: case HOVEROPTION_BACK:
@ -3818,7 +3819,7 @@ CMenuManager::ProcessButtonPresses(void)
if (!m_bPressedUpOnList) { if (!m_bPressedUpOnList) {
m_bPressedUpOnList = true; m_bPressedUpOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
ScrollUpListByOne(); ScrollUpListByOne();
} }
} else { } else {
@ -3840,7 +3841,7 @@ CMenuManager::ProcessButtonPresses(void)
if (!m_bPressedDownOnList) { if (!m_bPressedDownOnList) {
m_bPressedDownOnList = true; m_bPressedDownOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
ScrollDownListByOne(); ScrollDownListByOne();
} }
} else { } else {
@ -3856,7 +3857,7 @@ CMenuManager::ProcessButtonPresses(void)
m_bPressedPgUpOnList = true; m_bPressedPgUpOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
PageUpList(false); PageUpList(false);
} }
} }
@ -3868,14 +3869,14 @@ CMenuManager::ProcessButtonPresses(void)
m_bPressedPgDnOnList = true; m_bPressedPgDnOnList = true;
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode(); lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
PageDownList(false); PageDownList(false);
} }
} }
if (CPad::GetPad(0)->GetHome()) { if (CPad::GetPad(0)->GetHome()) {
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
m_nFirstVisibleRowOnList = 0; m_nFirstVisibleRowOnList = 0;
} }
@ -3885,7 +3886,7 @@ CMenuManager::ProcessButtonPresses(void)
if (CPad::GetPad(0)->GetEnd()) { if (CPad::GetPad(0)->GetEnd()) {
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) { if (m_nTotalListRow >= MAX_VISIBLE_LIST_ROW) {
m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW; m_nFirstVisibleRowOnList = m_nTotalListRow - MAX_VISIBLE_LIST_ROW;
} }
@ -3914,7 +3915,7 @@ CMenuManager::ProcessButtonPresses(void)
break; break;
case HOVEROPTION_USESKIN: case HOVEROPTION_USESKIN:
if (m_nSkinsTotal > 0) { if (m_nSkinsTotal > 0) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin = m_pSkinListHead.nextSkin;
strcpy(m_PrefsSkinFile, m_aSkinName); strcpy(m_PrefsSkinFile, m_aSkinName);
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile); CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
@ -3983,11 +3984,11 @@ CMenuManager::ProcessButtonPresses(void)
} else { } else {
if (CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) { if (CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
goDown = true; goDown = true;
} else if (CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) { } else if (CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
goUp = true; goUp = true;
} }
@ -4018,7 +4019,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetLeftMouseJustDown()) { } else if (CPad::GetPad(0)->GetLeftMouseJustDown()) {
#ifdef TIDY_UP_PBP #ifdef TIDY_UP_PBP
if (m_nHoverOption >= HOVEROPTION_RADIO_0 && m_nHoverOption <= HOVEROPTION_RADIO_9) { if (m_nHoverOption >= HOVEROPTION_RADIO_0 && m_nHoverOption <= HOVEROPTION_RADIO_9) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0; m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4032,7 +4033,7 @@ CMenuManager::ProcessButtonPresses(void)
#else #else
switch (m_nHoverOption) { switch (m_nHoverOption) {
case HOVEROPTION_RADIO_0: case HOVEROPTION_RADIO_0:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = HEAD_RADIO; m_PrefsRadioStation = HEAD_RADIO;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4040,7 +4041,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_1: case HOVEROPTION_RADIO_1:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = DOUBLE_CLEF; m_PrefsRadioStation = DOUBLE_CLEF;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4048,7 +4049,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_2: case HOVEROPTION_RADIO_2:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = JAH_RADIO; m_PrefsRadioStation = JAH_RADIO;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4056,7 +4057,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_3: case HOVEROPTION_RADIO_3:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = RISE_FM; m_PrefsRadioStation = RISE_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4064,7 +4065,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_4: case HOVEROPTION_RADIO_4:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = LIPS_106; m_PrefsRadioStation = LIPS_106;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4072,7 +4073,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_5: case HOVEROPTION_RADIO_5:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = GAME_FM; m_PrefsRadioStation = GAME_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4080,7 +4081,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_6: case HOVEROPTION_RADIO_6:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = MSX_FM; m_PrefsRadioStation = MSX_FM;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4088,7 +4089,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_7: case HOVEROPTION_RADIO_7:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = FLASHBACK; m_PrefsRadioStation = FLASHBACK;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4096,7 +4097,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_8: case HOVEROPTION_RADIO_8:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = CHATTERBOX; m_PrefsRadioStation = CHATTERBOX;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4104,7 +4105,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED"); OutputDebugString("FRONTEND RADIO STATION CHANGED");
break; break;
case HOVEROPTION_RADIO_9: case HOVEROPTION_RADIO_9:
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
m_PrefsRadioStation = USERTRACK; m_PrefsRadioStation = USERTRACK;
SaveSettings(); SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation); DMAudio.SetRadioInCar(m_PrefsRadioStation);
@ -4234,11 +4235,11 @@ CMenuManager::ProcessButtonPresses(void)
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) { || CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action; int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST) if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
else if (option == MENUACTION_SFXVOLUME) else if (option == MENUACTION_SFXVOLUME)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
else if (option == MENUACTION_MOUSESENS) else if (option == MENUACTION_MOUSESENS)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
#ifndef TIDY_UP_PBP #ifndef TIDY_UP_PBP
@ -4298,14 +4299,14 @@ CMenuManager::ProcessButtonPresses(void)
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
if (CPad::GetPad(0)->GetLeftMouseJustDown() && hoveredBottomBarOption != -1) { if (CPad::GetPad(0)->GetLeftMouseJustDown() && hoveredBottomBarOption != -1) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
bottomBarActive = false; bottomBarActive = false;
curBottomBarOption = hoveredBottomBarOption; curBottomBarOption = hoveredBottomBarOption;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false);
return; return;
} else if (bottomBarActive) { } else if (bottomBarActive) {
if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) { if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
bottomBarActive = false; bottomBarActive = false;
// If there's a menu change with fade ongoing, finish it now // If there's a menu change with fade ongoing, finish it now
@ -4315,7 +4316,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown() } else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
|| CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) { || CPad::GetPad(0)->GetUpJustDown() || CPad::GetPad(0)->GetAnaloguePadUp() || CPad::GetPad(0)->GetDPadUpJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
if (curBottomBarOption > 0) if (curBottomBarOption > 0)
curBottomBarOption--; curBottomBarOption--;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
@ -4323,7 +4324,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown() } else if (CPad::GetPad(0)->GetRightJustDown() || CPad::GetPad(0)->GetAnaloguePadRight() || CPad::GetPad(0)->GetDPadRightJustDown()
|| CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) { || CPad::GetPad(0)->GetDownJustDown() || CPad::GetPad(0)->GetAnaloguePadDown() || CPad::GetPad(0)->GetDPadDownJustDown()) {
m_bShowMouse = false; m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
if (curBottomBarOption < bbTabCount-1) if (curBottomBarOption < bbTabCount-1)
curBottomBarOption++; curBottomBarOption++;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true); ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, true);
@ -4363,9 +4364,9 @@ CMenuManager::ProcessButtonPresses(void)
if (Slots[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot - 1] == SLOT_EMPTY) if (Slots[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_SaveSlot - 1] == SLOT_EMPTY)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
else else
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} else } else
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_COMPLETED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
} else { } else {
// This is duplicate, back button already processed below // This is duplicate, back button already processed below
#ifndef TIDY_UP_PBP #ifndef TIDY_UP_PBP
@ -4381,7 +4382,7 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
} else { } else {
if (m_nCurrScreen != MENUPAGE_NEW_GAME_RELOAD) { if (m_nCurrScreen != MENUPAGE_NEW_GAME_RELOAD) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
} }
} else if (option != MENUACTION_CHANGEMENU && option != MENUACTION_BRIGHTNESS && option != MENUACTION_DRAWDIST } else if (option != MENUACTION_CHANGEMENU && option != MENUACTION_BRIGHTNESS && option != MENUACTION_DRAWDIST
@ -4389,7 +4390,7 @@ CMenuManager::ProcessButtonPresses(void)
&& option != MENUACTION_CHECKSAVE && option != MENUACTION_UNK24 && option != MENUACTION_CHECKSAVE && option != MENUACTION_UNK24
&& option != MENUACTION_MOUSESENS && option != MENUACTION_SCREENRES) { && option != MENUACTION_MOUSESENS && option != MENUACTION_SCREENRES) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
if ((m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) || (m_nCurrScreen == MENUPAGE_SKIN_SELECT)) { if ((m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) || (m_nCurrScreen == MENUPAGE_SKIN_SELECT)) {
@ -4588,7 +4589,7 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings(); SaveSettings();
ChangeScreen(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, 0, true, true); ChangeScreen(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, 0, true, true);
break; break;
case MENUACTION_REDEFCTRL: case MENUACTION_KEYBOARDCTRLS:
ChangeScreen(MENUPAGE_KEYBOARD_CONTROLS, 0, true, true); ChangeScreen(MENUPAGE_KEYBOARD_CONTROLS, 0, true, true);
m_nSelectedListRow = 0; m_nSelectedListRow = 0;
m_nCurrExLayer = HOVEROPTION_LIST; m_nCurrExLayer = HOVEROPTION_LIST;
@ -4615,7 +4616,8 @@ CMenuManager::ProcessButtonPresses(void)
#endif #endif
break; break;
case MENUACTION_DONTCANCEL: case MENUACTION_DONTCANCEL:
ChangeScreen(aScreens[m_nCurrScreen].m_PreviousPage[1], aScreens[m_nCurrScreen].m_ParentEntry[1], true, true); ChangeScreen(!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_PreviousPage[1] : aScreens[m_nCurrScreen].m_PreviousPage[0],
GetPreviousPageOption(), true, true);
break; break;
case MENUACTION_SCREENRES: case MENUACTION_SCREENRES:
if (m_nDisplayVideoMode != m_nPrefsVideoMode) { if (m_nDisplayVideoMode != m_nPrefsVideoMode) {
@ -4631,7 +4633,7 @@ CMenuManager::ProcessButtonPresses(void)
if (selectedProvider != -1) { if (selectedProvider != -1) {
m_nPrefsAudio3DProviderIndex = DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex); m_nPrefsAudio3DProviderIndex = DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex);
if (selectedProvider == m_nPrefsAudio3DProviderIndex) { if (selectedProvider == m_nPrefsAudio3DProviderIndex) {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SetHelperText(0); SetHelperText(0);
} else { } else {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
@ -4784,7 +4786,7 @@ CMenuManager::ProcessButtonPresses(void)
if (goBack) { if (goBack) {
ResetHelperText(); ResetHelperText();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_EXIT, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_BACK, 0);
#ifdef PS2_LIKE_MENU #ifdef PS2_LIKE_MENU
if (m_nCurrScreen == MENUPAGE_PAUSE_MENU || bottomBarActive) { if (m_nCurrScreen == MENUPAGE_PAUSE_MENU || bottomBarActive) {
#else #else
@ -4897,7 +4899,7 @@ CMenuManager::ProcessButtonPresses(void)
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) { switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_RADIO: case MENUACTION_RADIO:
m_PrefsRadioStation += changeValueBy; m_PrefsRadioStation += changeValueBy;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
if (DMAudio.IsMP3RadioChannelAvailable()) { if (DMAudio.IsMP3RadioChannelAvailable()) {
if (m_PrefsRadioStation < HEAD_RADIO) if (m_PrefsRadioStation < HEAD_RADIO)
m_PrefsRadioStation = USERTRACK; m_PrefsRadioStation = USERTRACK;
@ -4925,14 +4927,14 @@ CMenuManager::ProcessButtonPresses(void)
if (m_PrefsUseWideScreen < 0) if (m_PrefsUseWideScreen < 0)
m_PrefsUseWideScreen = 2; m_PrefsUseWideScreen = 2;
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#endif #endif
case MENUACTION_SCREENRES: case MENUACTION_SCREENRES:
if (m_bGameNotLoaded) { if (m_bGameNotLoaded) {
RwChar** videoMods = _psGetVideoModeList(); RwChar** videoMods = _psGetVideoModeList();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
if (changeValueBy > 0) { if (changeValueBy > 0) {
do { do {
++m_nDisplayVideoMode; ++m_nDisplayVideoMode;
@ -4955,7 +4957,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nPrefsAudio3DProviderIndex += changeValueBy; m_nPrefsAudio3DProviderIndex += changeValueBy;
m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1); m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1);
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
break; break;
case MENUACTION_SPEAKERCONF: case MENUACTION_SPEAKERCONF:
if (m_nPrefsAudio3DProviderIndex != -1) { if (m_nPrefsAudio3DProviderIndex != -1) {
@ -4963,13 +4965,13 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2); m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2);
DMAudio.SetSpeakerConfig(m_PrefsSpeakers); DMAudio.SetSpeakerConfig(m_PrefsSpeakers);
SaveSettings(); SaveSettings();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
break; break;
case MENUACTION_CTRLMETHOD: case MENUACTION_CTRLMETHOD:
m_ControlMethod = !m_ControlMethod; m_ControlMethod = !m_ControlMethod;
CCamera::m_bUseMouse3rdPerson = !m_ControlMethod; CCamera::m_bUseMouse3rdPerson = !m_ControlMethod;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#ifdef CUSTOM_FRONTEND_OPTIONS #ifdef CUSTOM_FRONTEND_OPTIONS
@ -4993,7 +4995,7 @@ CMenuManager::ProcessButtonPresses(void)
} else if (option.type == FEOPTION_DYNAMIC) { } else if (option.type == FEOPTION_DYNAMIC) {
option.buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT); option.buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
else else
assert(0 && "Custom frontend options are borked"); assert(0 && "Custom frontend options are borked");
@ -5008,7 +5010,7 @@ CMenuManager::ProcessButtonPresses(void)
} else { } else {
m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN; m_nSelectedContSetupColumn = CONTSETUP_VEHICLE_COLUMN;
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
} }
} }
} }
@ -5024,31 +5026,31 @@ CMenuManager::ProcessOnOffMenuOptions()
CPad::GetPad(0)->StartShake(350, 150); CPad::GetPad(0)->StartShake(350, 150);
TimeToStopPadShaking = CTimer::GetTimeInMillisecondsPauseMode() + 500; TimeToStopPadShaking = CTimer::GetTimeInMillisecondsPauseMode() + 500;
} }
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_CTRLCONFIG: case MENUACTION_CTRLCONFIG:
CPad::GetPad(0)->Mode++; CPad::GetPad(0)->Mode++;
if (CPad::GetPad(0)->Mode > 3) if (CPad::GetPad(0)->Mode > 3)
CPad::GetPad(0)->Mode = 0; CPad::GetPad(0)->Mode = 0;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_CTRLDISPLAY: case MENUACTION_CTRLDISPLAY:
m_DisplayControllerOnFoot = !m_DisplayControllerOnFoot; m_DisplayControllerOnFoot = !m_DisplayControllerOnFoot;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_FRAMESYNC: case MENUACTION_FRAMESYNC:
m_PrefsVsyncDisp = !m_PrefsVsyncDisp; m_PrefsVsyncDisp = !m_PrefsVsyncDisp;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_FRAMELIMIT: case MENUACTION_FRAMELIMIT:
m_PrefsFrameLimiter = !m_PrefsFrameLimiter; m_PrefsFrameLimiter = !m_PrefsFrameLimiter;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_TRAILS: case MENUACTION_TRAILS:
CMBlur::BlurOn = !CMBlur::BlurOn; CMBlur::BlurOn = !CMBlur::BlurOn;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
if (CMBlur::BlurOn) if (CMBlur::BlurOn)
CMBlur::MotionBlurOpen(Scene.camera); CMBlur::MotionBlurOpen(Scene.camera);
@ -5057,60 +5059,60 @@ CMenuManager::ProcessOnOffMenuOptions()
break; break;
case MENUACTION_SUBTITLES: case MENUACTION_SUBTITLES:
m_PrefsShowSubtitles = !m_PrefsShowSubtitles; m_PrefsShowSubtitles = !m_PrefsShowSubtitles;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#ifndef ASPECT_RATIO_SCALE #ifndef ASPECT_RATIO_SCALE
case MENUACTION_WIDESCREEN: case MENUACTION_WIDESCREEN:
m_PrefsUseWideScreen = !m_PrefsUseWideScreen; m_PrefsUseWideScreen = !m_PrefsUseWideScreen;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
#endif #endif
case MENUACTION_SETDBGFLAG: case MENUACTION_SETDBGFLAG:
CTheScripts::InvertDebugFlag(); CTheScripts::InvertDebugFlag();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_SWITCHBIGWHITEDEBUGLIGHT: case MENUACTION_SWITCHBIGWHITEDEBUGLIGHT:
gbBigWhiteDebugLightSwitchedOn = !gbBigWhiteDebugLightSwitchedOn; gbBigWhiteDebugLightSwitchedOn = !gbBigWhiteDebugLightSwitchedOn;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_PEDROADGROUPS: case MENUACTION_PEDROADGROUPS:
gbShowPedRoadGroups = !gbShowPedRoadGroups; gbShowPedRoadGroups = !gbShowPedRoadGroups;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_CARROADGROUPS: case MENUACTION_CARROADGROUPS:
gbShowCarRoadGroups = !gbShowCarRoadGroups; gbShowCarRoadGroups = !gbShowCarRoadGroups;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_COLLISIONPOLYS: case MENUACTION_COLLISIONPOLYS:
gbShowCollisionPolys = !gbShowCollisionPolys; gbShowCollisionPolys = !gbShowCollisionPolys;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break; break;
case MENUACTION_MP_PLAYERCOLOR: case MENUACTION_MP_PLAYERCOLOR:
PickNewPlayerColour(); PickNewPlayerColour();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_SHOWHEADBOB: case MENUACTION_SHOWHEADBOB:
TheCamera.m_bHeadBob = !TheCamera.m_bHeadBob; TheCamera.m_bHeadBob = !TheCamera.m_bHeadBob;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_INVVERT: case MENUACTION_INVVERT:
MousePointerStateHelper.bInvertVertically = !MousePointerStateHelper.bInvertVertically; MousePointerStateHelper.bInvertVertically = !MousePointerStateHelper.bInvertVertically;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_DYNAMICACOUSTIC: case MENUACTION_DYNAMICACOUSTIC:
m_PrefsDMA = !m_PrefsDMA; m_PrefsDMA = !m_PrefsDMA;
DMAudio.SetDynamicAcousticModelingStatus(m_PrefsDMA); DMAudio.SetDynamicAcousticModelingStatus(m_PrefsDMA);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
case MENUACTION_MOUSESTEER: case MENUACTION_MOUSESTEER:
CVehicle::m_bDisableMouseSteering = !CVehicle::m_bDisableMouseSteering; CVehicle::m_bDisableMouseSteering = !CVehicle::m_bDisableMouseSteering;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings(); SaveSettings();
break; break;
} }
@ -5678,7 +5680,7 @@ CMenuManager::PrintMap(void)
float x = ((mapPoint.x - diffX) / (fMapSize * 2)) * 4000.0f - 2000.0f; float x = ((mapPoint.x - diffX) / (fMapSize * 2)) * 4000.0f - 2000.0f;
float y = 2000.0f - ((mapPoint.y - diffY) / (fMapSize * 2)) * 4000.0f; float y = 2000.0f - ((mapPoint.y - diffY) / (fMapSize * 2)) * 4000.0f;
CRadar::ToggleTargetMarker(x, y); CRadar::ToggleTargetMarker(x, y);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SUCCESS, 0); DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
} }
} }

View File

@ -327,7 +327,7 @@ enum eMenuAction
MENUACTION_UNK69, MENUACTION_UNK69,
MENUACTION_UNK70, MENUACTION_UNK70,
MENUACTION_FINDMP, MENUACTION_FINDMP,
MENUACTION_REDEFCTRL, MENUACTION_KEYBOARDCTRLS,
MENUACTION_UNK73, MENUACTION_UNK73,
MENUACTION_INITMP, MENUACTION_INITMP,
MENUACTION_MP_PLAYERCOLOR, MENUACTION_MP_PLAYERCOLOR,

View File

@ -61,38 +61,38 @@ CMenuScreen aScreens[] = {
// MENUPAGE_LANGUAGE_SETTINGS = 7 // MENUPAGE_LANGUAGE_SETTINGS = 7
{ "FET_LAN", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 3, 3, { "FET_LAN", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 3, 3,
MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_ENG, "FEL_ENG", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENUPAGE_CHOOSE_LOAD_SLOT = 8 // MENUPAGE_CHOOSE_LOAD_SLOT = 8
{ "FET_LG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 1, 1, { "FET_LG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 1, 1,
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL0", SAVESLOT_1, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_2, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_3, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_3, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_4, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_5, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_6, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_7, MENUPAGE_LOAD_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8, MENUPAGE_LOAD_SLOT_CONFIRM, MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_8, MENUPAGE_LOAD_SLOT_CONFIRM,
}, },
// MENUPAGE_CHOOSE_DELETE_SLOT = 9 // MENUPAGE_CHOOSE_DELETE_SLOT = 9
{ "FET_DG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 2, 2, { "FET_DG", 1, MENUPAGE_NEW_GAME, MENUPAGE_NEW_GAME, 2, 2,
MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME, MENUACTION_CHANGEMENU, "FESZ_CA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
MENUACTION_CHECKSAVE, "FEM_SL1", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL0", SAVESLOT_1, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL2", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL1", SAVESLOT_2, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL3", SAVESLOT_3, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL2", SAVESLOT_3, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL4", SAVESLOT_4, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL3", SAVESLOT_4, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL5", SAVESLOT_5, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL4", SAVESLOT_5, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL6", SAVESLOT_6, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL5", SAVESLOT_6, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL7", SAVESLOT_7, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL6", SAVESLOT_7, MENUPAGE_DELETE_SLOT_CONFIRM,
MENUACTION_CHECKSAVE, "FEM_SL8", SAVESLOT_8, MENUPAGE_DELETE_SLOT_CONFIRM, MENUACTION_CHANGEMENU, "FEM_SL7", SAVESLOT_8, MENUPAGE_DELETE_SLOT_CONFIRM,
}, },
// MENUPAGE_NEW_GAME_RELOAD = 10 // MENUPAGE_NEW_GAME_RELOAD = 10
@ -269,7 +269,7 @@ CMenuScreen aScreens[] = {
// MENUPAGE_CONTROLLER_PC = 35 // MENUPAGE_CONTROLLER_PC = 35
{ "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0, { "FET_CTL", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_CTRLMETHOD, "FET_CME", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_CHANGEMENU, "FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS, MENUACTION_KEYBOARDCTRLS,"FET_RDK", SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS,
MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS, MENUACTION_CHANGEMENU, "FET_AMS", SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC, MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
@ -330,7 +330,7 @@ CMenuScreen aScreens[] = {
// MENUPAGE_EXIT = 42 // MENUPAGE_EXIT = 42
{ "FET_QG", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 5, { "FET_QG", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 5,
MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_DONTCANCEL, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CANCELGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CANCELGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NONE,
}, },

View File

@ -397,7 +397,7 @@ CPlayerInfo::Process(void)
else else
enterOrExitVeh = CPad::GetPad(0)->GetExitVehicle(); enterOrExitVeh = CPad::GetPad(0)->GetExitVehicle();
if (enterOrExitVeh && m_pPed->m_nPedState != PED_SNIPER_MODE && m_pPed->m_nPedState != PED_ROCKET_ODE) { if (enterOrExitVeh && m_pPed->m_nPedState != PED_SNIPER_MODE && m_pPed->m_nPedState != PED_ROCKET_MODE) {
if (m_pPed->bInVehicle) { if (m_pPed->bInVehicle) {
if (!m_pRemoteVehicle) { if (!m_pRemoteVehicle) {
CEntity *surfaceBelowVeh = m_pPed->m_pMyVehicle->m_pCurGroundEntity; CEntity *surfaceBelowVeh = m_pPed->m_pMyVehicle->m_pCurGroundEntity;

View File

@ -829,6 +829,9 @@ CPed::ClearAimFlag(void)
bIsAimingGun = false; bIsAimingGun = false;
bIsRestoringGun = true; bIsRestoringGun = true;
m_pedIK.m_flags &= ~CPedIK::AIMS_WITH_ARM; m_pedIK.m_flags &= ~CPedIK::AIMS_WITH_ARM;
#ifdef VC_PED_PORTS
m_lookTimer = 0;
#endif
} }
if (IsPlayer()) if (IsPlayer())
@ -3378,9 +3381,14 @@ CPed::SetStoredState(void)
if (m_nMoveState == PEDMOVE_NONE || m_nMoveState == PEDMOVE_STILL) if (m_nMoveState == PEDMOVE_NONE || m_nMoveState == PEDMOVE_STILL)
m_nMoveState = PEDMOVE_WALK; m_nMoveState = PEDMOVE_WALK;
} }
m_nLastPedState = m_nPedState; #ifdef VC_PED_PORTS
if (m_nMoveState >= m_nPrevMoveState) if (m_nPedState != PED_IDLE)
m_nPrevMoveState = m_nMoveState; #endif
{
m_nLastPedState = m_nPedState;
if (m_nMoveState >= m_nPrevMoveState)
m_nPrevMoveState = m_nMoveState;
}
} }
void void
@ -5149,7 +5157,10 @@ CPed::SetWaitState(eWaitState state, void *time)
case WAITSTATE_DOUBLEBACK: case WAITSTATE_DOUBLEBACK:
m_headingRate = 0.0f; m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 3500; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 3500;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f); animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
break; break;
case WAITSTATE_HITWALL: case WAITSTATE_HITWALL:
m_headingRate = 2.0f; m_headingRate = 2.0f;
@ -5183,7 +5194,10 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim(); SetMoveAnim();
m_headingRate = 0.0f; m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
if (m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER && CharCreatedBy == RANDOM_CHAR && m_nPedState == PED_SEEK_CAR) { if (m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER && CharCreatedBy == RANDOM_CHAR && m_nPedState == PED_SEEK_CAR) {
ClearObjective(); ClearObjective();
@ -5196,7 +5210,11 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim(); SetMoveAnim();
m_headingRate = 0.0f; m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f); animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
break; break;
case WAITSTATE_PLAYANIM_COWER: case WAITSTATE_PLAYANIM_COWER:
waitAnim = ANIM_HANDSCOWER; waitAnim = ANIM_HANDSCOWER;
@ -5238,7 +5256,10 @@ CPed::SetWaitState(eWaitState state, void *time)
SetMoveAnim(); SetMoveAnim();
m_headingRate = 0.0f; m_headingRate = 0.0f;
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2500; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2500;
CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f);
#ifdef FIX_BUGS
animAssoc->SetFinishCallback(RestoreHeadingRateCB, this);
#endif
break; break;
default: default:
m_nWaitState = WAITSTATE_FALSE; m_nWaitState = WAITSTATE_FALSE;
@ -5730,6 +5751,9 @@ CPed::SetChat(CEntity *chatWith, uint32 time)
m_nPedState = PED_CHAT; m_nPedState = PED_CHAT;
SetMoveState(PEDMOVE_STILL); SetMoveState(PEDMOVE_STILL);
#ifdef VC_PED_PORTS
m_lookTimer = 0;
#endif
SetLookFlag(chatWith, true); SetLookFlag(chatWith, true);
m_standardTimer = CTimer::GetTimeInMilliseconds() + time; m_standardTimer = CTimer::GetTimeInMilliseconds() + time;
m_lookTimer = CTimer::GetTimeInMilliseconds() + 3000; m_lookTimer = CTimer::GetTimeInMilliseconds() + 3000;
@ -5738,10 +5762,7 @@ CPed::SetChat(CEntity *chatWith, uint32 time)
void void
CPed::SetDead(void) CPed::SetDead(void)
{ {
#ifdef VC_PED_PORTS bUsesCollision = false;
if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DROWN))
#endif
bUsesCollision = false;
m_fHealth = 0.0f; m_fHealth = 0.0f;
if (m_nPedState == PED_DRIVING) if (m_nPedState == PED_DRIVING)
@ -9236,17 +9257,6 @@ CPed::ProcessControl(void)
float oldDestRot = CGeneral::LimitRadianAngle(m_fRotationDest); float oldDestRot = CGeneral::LimitRadianAngle(m_fRotationDest);
#ifdef VC_PED_PORTS
if (m_nPedState == PED_FOLLOW_PATH) {
if (DotProduct(m_vecDamageNormal, GetForward()) < -0.866f && CanPedJumpThis(collidingEnt, &m_vecDamageNormal)) {
SetJump();
// Moved break into here, for compatibility with III
break;
}
// break;
}
#endif
if (m_pedInObjective && if (m_pedInObjective &&
(m_objective == OBJECTIVE_GOTO_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT)) { (m_objective == OBJECTIVE_GOTO_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT)) {
@ -10072,7 +10082,7 @@ CPed::ProcessControl(void)
case PED_SEEK_ENTITY: case PED_SEEK_ENTITY:
case PED_PURSUE: case PED_PURSUE:
case PED_SNIPER_MODE: case PED_SNIPER_MODE:
case PED_ROCKET_ODE: case PED_ROCKET_MODE:
case PED_DUMMY: case PED_DUMMY:
case PED_FACE_PHONE: case PED_FACE_PHONE:
case PED_MAKE_CALL: case PED_MAKE_CALL:

View File

@ -231,7 +231,7 @@ enum PedState
PED_PURSUE, PED_PURSUE,
PED_FOLLOW_PATH, PED_FOLLOW_PATH,
PED_SNIPER_MODE, PED_SNIPER_MODE,
PED_ROCKET_ODE, PED_ROCKET_MODE,
PED_DUMMY, PED_DUMMY,
PED_PAUSE, PED_PAUSE,
PED_ATTACK, PED_ATTACK,

View File

@ -1058,6 +1058,9 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
} }
#ifdef FREE_CAM #ifdef FREE_CAM
static int8 changedHeadingRate = 0;
if (changedHeadingRate == 2) changedHeadingRate = 1;
// Rotate player/arm when shooting. We don't have auto-rotation anymore // Rotate player/arm when shooting. We don't have auto-rotation anymore
if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam && if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam &&
m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) { m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) {
@ -1081,6 +1084,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
#endif #endif
} else { } else {
m_fRotationDest = limitedCam; m_fRotationDest = limitedCam;
changedHeadingRate = 2;
m_headingRate = 50.0f; m_headingRate = 50.0f;
// Anim. fix for shotgun, ak47 and m16 (we must finish rot. it quickly) // Anim. fix for shotgun, ak47 and m16 (we must finish rot. it quickly)
@ -1099,10 +1103,12 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
} }
} else if (weaponInfo->m_bCanAimWithArm) } else if (weaponInfo->m_bCanAimWithArm)
ClearPointGunAt(); ClearPointGunAt();
else
RestoreHeadingRate();
} }
} }
if (changedHeadingRate == 1) {
changedHeadingRate = 0;
RestoreHeadingRate();
}
#endif #endif
if (padUsed->GetTarget() && m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) { if (padUsed->GetTarget() && m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) {
@ -1347,7 +1353,7 @@ CPlayerPed::ProcessControl(void)
case PED_WANDER_PATH: case PED_WANDER_PATH:
case PED_PURSUE: case PED_PURSUE:
case PED_FOLLOW_PATH: case PED_FOLLOW_PATH:
case PED_ROCKET_ODE: case PED_ROCKET_MODE:
case PED_DUMMY: case PED_DUMMY:
case PED_PAUSE: case PED_PAUSE:
case PED_FACE_PHONE: case PED_FACE_PHONE:

View File

@ -1044,7 +1044,7 @@ void CHud::DrawAfterFade()
m_fHelpMessageTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f; m_fHelpMessageTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f;
if (TheCamera.m_ScreenReductionPercentage == 0.0f) if (TheCamera.m_ScreenReductionPercentage == 0.0f)
DMAudio.PlayFrontEndSound(SOUND_A0, 0); DMAudio.PlayFrontEndSound(SOUND_HUD, 0);
break; break;
case 1: case 1:
case 2: case 2:

View File

@ -197,7 +197,7 @@ CTrain::ProcessControl(void)
if(m_bTrainStopping){ if(m_bTrainStopping){
m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000; m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000;
m_nDoorState = TRAIN_DOOR_OPENING; m_nDoorState = TRAIN_DOOR_OPENING;
DMAudio.PlayOneShot(m_audioEntityId, SOUND_18, 0.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_TRAIN_DOOR_CLOSE, 0.0f);
} }
break; break;
@ -214,7 +214,7 @@ CTrain::ProcessControl(void)
if(!m_bTrainStopping){ if(!m_bTrainStopping){
m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000; m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000;
m_nDoorState = TRAIN_DOOR_CLOSING; m_nDoorState = TRAIN_DOOR_CLOSING;
DMAudio.PlayOneShot(m_audioEntityId, SOUND_19, 0.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_TRAIN_DOOR_OPEN, 0.0f);
} }
break; break;

View File

@ -265,8 +265,11 @@ public:
void InflictDamage(CEntity *damagedBy, eWeaponType weaponType, float damage); void InflictDamage(CEntity *damagedBy, eWeaponType weaponType, float damage);
void DoFixedMachineGuns(void); void DoFixedMachineGuns(void);
#ifdef FIX_BUGS
bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1 && GetStatus() != STATUS_WRECKED; }
#else
bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; } bool IsAlarmOn(void) { return m_nAlarmState != 0 && m_nAlarmState != -1; }
#endif
CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); }
bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; } bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; }
AnimationId GetDriverAnim(void) { return IsCar() && bLowVehicle ? ANIM_CAR_LSIT : (IsBoat() && GetModelIndex() != MI_SPEEDER ? ANIM_DRIVE_BOAT : ANIM_CAR_SIT); } AnimationId GetDriverAnim(void) { return IsCar() && bLowVehicle ? ANIM_CAR_LSIT : (IsBoat() && GetModelIndex() != MI_SPEEDER ? ANIM_DRIVE_BOAT : ANIM_CAR_SIT); }