1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 00:10:01 +00:00

Merge branch 'master' of https://github.com/GTAmodding/re3 into erorcun

This commit is contained in:
eray orçunus 2020-08-24 22:36:03 +03:00
commit cb813bd1ab
21 changed files with 254 additions and 228 deletions

View file

@ -374,7 +374,7 @@ CCutsceneMgr::DeleteCutsceneData(void)
DMAudio.ChangeMusicMode(MUSICMODE_GAME); DMAudio.ChangeMusicMode(MUSICMODE_GAME);
} }
CTimer::Stop(); CTimer::Stop();
CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == 2); CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2);
CTimer::Update(); CTimer::Update();
} }

View file

@ -4169,7 +4169,7 @@ cAudioManager::GetNormalMaleTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_NORMAL_MALE_RUN_FROM_FIGHT_1, 5); GetPhrase(&sfx, &lastSfx, SFX_NORMAL_MALE_RUN_FROM_FIGHT_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_NORMAL_MALE_DRIVER_ABUSE_1, 12); GetPhrase(&sfx, &lastSfx, SFX_NORMAL_MALE_DRIVER_ABUSE_1, 12);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4197,7 +4197,7 @@ cAudioManager::GetTaxiDriverTalkSfx(int16 sound)
case SOUND_PED_CAR_JACKED: case SOUND_PED_CAR_JACKED:
GetPhrase(&sfx, &lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_CARJACKED_1, 7); GetPhrase(&sfx, &lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_CARJACKED_1, 7);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
default: default:
@ -4226,7 +4226,7 @@ cAudioManager::GetPimpTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_PIMP_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_PIMP_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_PIMP_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_PIMP_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4260,7 +4260,7 @@ cAudioManager::GetMafiaTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_MAFIA_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_MAFIA_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_MAFIA_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_MAFIA_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4297,7 +4297,7 @@ cAudioManager::GetTriadTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_TRIAD_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_TRIAD_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_TRIAD_MALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_TRIAD_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4338,7 +4338,7 @@ cAudioManager::GetDiabloTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_DIABLO_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_DIABLO_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_DIABLO_MALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_DIABLO_MALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4372,7 +4372,7 @@ cAudioManager::GetYakuzaTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_YAKUZA_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_YAKUZA_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_YAKUZA_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_YAKUZA_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -4406,7 +4406,7 @@ cAudioManager::GetYardieTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_YARDIE_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_YARDIE_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_YARDIE_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_YARDIE_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4440,7 +4440,7 @@ cAudioManager::GetColumbianTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_COLUMBIAN_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_COLUMBIAN_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_COLUMBIAN_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_COLUMBIAN_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4477,7 +4477,7 @@ cAudioManager::GetHoodTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_HOOD_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_HOOD_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_HOOD_MALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_HOOD_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4516,7 +4516,7 @@ cAudioManager::GetBlackCriminalTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_CRIMINAL_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_CRIMINAL_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_CRIMINAL_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_CRIMINAL_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
default: default:
@ -4548,7 +4548,7 @@ cAudioManager::GetWhiteCriminalTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_CRIMINAL_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_WHITE_CRIMINAL_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_CRIMINAL_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_CRIMINAL_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
default: default:
@ -4577,7 +4577,7 @@ cAudioManager::GetMaleNo2TalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_CASUAL_MALE_OLD_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_CASUAL_MALE_OLD_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_CASUAL_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_CASUAL_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4614,7 +4614,7 @@ cAudioManager::GetBlackProjectMaleTalkSfx(int16 sound, int32 model)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -4647,7 +4647,7 @@ cAudioManager::GetWhiteFatMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DODGE_1, 9); GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DODGE_1, 9);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 9); GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 9);
break; break;
case SOUND_PED_WAIT_DOUBLEBACK: case SOUND_PED_WAIT_DOUBLEBACK:
@ -4677,7 +4677,7 @@ cAudioManager::GetBlackFatMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DODGE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DODGE_1, 7);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_WAIT_DOUBLEBACK: case SOUND_PED_WAIT_DOUBLEBACK:
@ -4714,7 +4714,7 @@ cAudioManager::GetBlackCasualFemaleTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_FEMALE_1_VOICE_1_RUN_FROM_FIGHT_1, 2); GetPhrase(&sfx, &lastSfx, SFX_FEMALE_1_VOICE_1_RUN_FROM_FIGHT_1, 2);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_FEMALE_1_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_FEMALE_1_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4751,7 +4751,7 @@ cAudioManager::GetWhiteCasualFemaleTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_CASUAL_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 2); GetPhrase(&sfx, &lastSfx, SFX_WHITE_CASUAL_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 2);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_CASUAL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8); GetPhrase(&sfx, &lastSfx, SFX_WHITE_CASUAL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4788,7 +4788,7 @@ cAudioManager::GetFemaleNo3TalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_FEMALE_3_VOICE_1_RUN_FROM_FIGHT_1, 4); GetPhrase(&sfx, &lastSfx, SFX_FEMALE_3_VOICE_1_RUN_FROM_FIGHT_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_FEMALE_3_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_FEMALE_3_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4822,7 +4822,7 @@ cAudioManager::GetBlackFatFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4853,7 +4853,7 @@ cAudioManager::GetWhiteFatFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8); GetPhrase(&sfx, &lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8);
break; break;
case SOUND_PED_WAIT_DOUBLEBACK: case SOUND_PED_WAIT_DOUBLEBACK:
@ -4890,7 +4890,7 @@ cAudioManager::GetBlackFemaleProstituteTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DODGE_1, 3); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DODGE_1, 3);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_SOLICIT: case SOUND_PED_SOLICIT:
@ -4921,7 +4921,7 @@ cAudioManager::GetWhiteFemaleProstituteTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DODGE_1, 3); GetPhrase(&sfx, &lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DODGE_1, 3);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_SOLICIT: case SOUND_PED_SOLICIT:
@ -4955,7 +4955,7 @@ cAudioManager::GetBlackProjectFemaleOldTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_RUN_FROM_FIGHT_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_RUN_FROM_FIGHT_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -4989,7 +4989,7 @@ cAudioManager::GetBlackProjectFemaleYoungTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5023,7 +5023,7 @@ cAudioManager::GetChinatownMaleOldTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5057,7 +5057,7 @@ cAudioManager::GetChinatownMaleYoungTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5088,7 +5088,7 @@ cAudioManager::GetChinatownFemaleOldTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5119,7 +5119,7 @@ cAudioManager::GetChinatownFemaleYoungTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5156,7 +5156,7 @@ cAudioManager::GetLittleItalyMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5184,7 +5184,7 @@ cAudioManager::GetLittleItalyFemaleOldTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5215,7 +5215,7 @@ cAudioManager::GetLittleItalyFemaleYoungTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DODGE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DODGE_1, 7);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5246,7 +5246,7 @@ cAudioManager::GetWhiteDockerMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5277,7 +5277,7 @@ cAudioManager::GetBlackDockerMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_DOCKER_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_DOCKER_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5311,7 +5311,7 @@ cAudioManager::GetScumMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_SCUM_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_SCUM_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_SCUM_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_SCUM_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_WAIT_DOUBLEBACK: case SOUND_PED_WAIT_DOUBLEBACK:
@ -5348,7 +5348,7 @@ cAudioManager::GetScumFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_SCUM_FEMALE_VOICE_1_DODGE_1, 8); GetPhrase(&sfx, &lastSfx, SFX_SCUM_FEMALE_VOICE_1_DODGE_1, 8);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_SCUM_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_SCUM_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5376,7 +5376,7 @@ cAudioManager::GetWhiteWorkerMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5407,7 +5407,7 @@ cAudioManager::GetBlackWorkerMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DODGE_1, 3); GetPhrase(&sfx, &lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DODGE_1, 3);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5447,7 +5447,7 @@ cAudioManager::GetBusinessMaleYoungTalkSfx(int16 sound, int32 model)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_RUN_FROM_FIGHT_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_RUN_FROM_FIGHT_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5487,7 +5487,7 @@ cAudioManager::GetBusinessMaleOldTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MRUN_FROM_FIGHT_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MRUN_FROM_FIGHT_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5521,7 +5521,7 @@ cAudioManager::GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_BUSINESS_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_BUSINESS_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_BUSINESS_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_WHITE_BUSINESS_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5561,7 +5561,7 @@ cAudioManager::GetBlackBusinessFemaleTalkSfx(int16 sound)
case SOUND_PED_FLEE_RUN: case SOUND_PED_FLEE_RUN:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_BUSINESS_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 6); GetPhrase(&sfx, &lastSfx, SFX_BLACK_BUSINESS_FEMALE_VOICE_1_RUN_FROM_FIGHT_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_BUSINESS_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_BLACK_BUSINESS_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5595,7 +5595,7 @@ cAudioManager::GetSupermodelMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_MODEL_MALE_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_MODEL_MALE_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_MODEL_MALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_MODEL_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5626,7 +5626,7 @@ cAudioManager::GetSupermodelFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_MODEL_FEMALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_MODEL_FEMALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_MODEL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_MODEL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5657,7 +5657,7 @@ cAudioManager::GetStewardMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_STEWARD_MALE_VOICE_1_DODGE_1, 3); GetPhrase(&sfx, &lastSfx, SFX_STEWARD_MALE_VOICE_1_DODGE_1, 3);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_STEWARD_MALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_STEWARD_MALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5682,7 +5682,7 @@ cAudioManager::GetStewardFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_STEWARD_FEMALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_STEWARD_FEMALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_STEWARD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_STEWARD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5707,7 +5707,7 @@ cAudioManager::GetFanMaleTalkSfx(int16 sound, int32 model)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_MALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_MALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5738,7 +5738,7 @@ cAudioManager::GetFanFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_FEMALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_FEMALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_FOOTBALL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5769,7 +5769,7 @@ cAudioManager::GetHospitalMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_MALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_MALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5791,7 +5791,7 @@ cAudioManager::GetHospitalFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_FEMALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_FEMALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_HOSPITAL_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_CHAT: case SOUND_PED_CHAT:
@ -5822,7 +5822,7 @@ cAudioManager::GetWhiteConstructionWorkerTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_MALE_CONSTRUCTION_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_WHITE_MALE_CONSTRUCTION_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_WHITE_MALE_CONSTRUCTION_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_WHITE_MALE_CONSTRUCTION_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5856,7 +5856,7 @@ cAudioManager::GetBlackConstructionWorkerTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_CONSTRUCTION_MALE_VOICE_1_DODGE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_CONSTRUCTION_MALE_VOICE_1_DODGE_1, 5);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_BLACK_CONSTRUCTION_MALE_VOICE_1_DRIVER_ABUSE_1, 5); GetPhrase(&sfx, &lastSfx, SFX_BLACK_CONSTRUCTION_MALE_VOICE_1_DRIVER_ABUSE_1, 5);
break; break;
case SOUND_PED_CHAT_SEXY: case SOUND_PED_CHAT_SEXY:
@ -5887,7 +5887,7 @@ cAudioManager::GetShopperFemaleTalkSfx(int16 sound, int32 model)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_SHOPPER_VOICE_1_DODGE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_SHOPPER_VOICE_1_DODGE_1, 6);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_SHOPPER_VOICE_1_DRIVER_ABUSE_1, 7); GetPhrase(&sfx, &lastSfx, SFX_SHOPPER_VOICE_1_DRIVER_ABUSE_1, 7);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5927,7 +5927,7 @@ cAudioManager::GetStudentMaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_STUDENT_MALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_STUDENT_MALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_STUDENT_MALE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_STUDENT_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -5961,7 +5961,7 @@ cAudioManager::GetStudentFemaleTalkSfx(int16 sound)
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
GetPhrase(&sfx, &lastSfx, SFX_STUDENT_FEMALE_VOICE_1_DODGE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_STUDENT_FEMALE_VOICE_1_DODGE_1, 4);
break; break;
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_STUDENT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 4); GetPhrase(&sfx, &lastSfx, SFX_STUDENT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 4);
break; break;
case SOUND_PED_CHAT_EVENT: case SOUND_PED_CHAT_EVENT:
@ -6141,7 +6141,7 @@ cAudioManager::GetSecurityGuardTalkSfx(int16 sound)
sfx = SFX_SECURITY_GUARD_VOICE_1_GUN_PANIC_1; sfx = SFX_SECURITY_GUARD_VOICE_1_GUN_PANIC_1;
break; break;
case SOUND_PED_CAR_JACKED: case SOUND_PED_CAR_JACKED:
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
GetPhrase(&sfx, &lastSfx, SFX_SECURITY_GUARD_VOICE_1_DRIVER_ABUSE_1, 6); GetPhrase(&sfx, &lastSfx, SFX_SECURITY_GUARD_VOICE_1_DRIVER_ABUSE_1, 6);
break; break;
case SOUND_PED_ATTACK: case SOUND_PED_ATTACK:

View file

@ -4,6 +4,16 @@
#include "Pools.h" #include "Pools.h"
#include "DMAudio.h" #include "DMAudio.h"
cAudioScriptObject::cAudioScriptObject()
{
Reset();
};
cAudioScriptObject::~cAudioScriptObject()
{
Reset();
};
void void
cAudioScriptObject::Reset() cAudioScriptObject::Reset()
{ {

View file

@ -7,6 +7,9 @@ public:
CVector Posn; CVector Posn;
int32 AudioEntity; int32 AudioEntity;
cAudioScriptObject();
~cAudioScriptObject();
void Reset(); /// ok void Reset(); /// ok
static void* operator new(size_t); static void* operator new(size_t);

View file

@ -203,7 +203,7 @@ cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
int32 int32
cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject) cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
{ {
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject); int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) ) if ( AEHANDLE_IS_OK(audioEntity) )
AudioManager.SetEntityStatus(audioEntity, true); AudioManager.SetEntityStatus(audioEntity, true);
@ -220,7 +220,7 @@ cDMAudio::DestroyLoopingScriptObject(int32 audioEntity)
void void
cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject) cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
{ {
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, (CPhysical *)scriptObject); int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) ) if ( AEHANDLE_IS_OK(audioEntity) )
{ {

View file

@ -129,7 +129,7 @@ enum eSound : uint16
SOUND_PED_LEAVE_VEHICLE, SOUND_PED_LEAVE_VEHICLE,
SOUND_PED_EVADE, SOUND_PED_EVADE,
SOUND_PED_FLEE_RUN, SOUND_PED_FLEE_RUN,
SOUND_PED_CAR_COLLISION, SOUND_PED_ANNOYED_DRIVER,
SOUND_PED_SOLICIT, SOUND_PED_SOLICIT,
SOUND_PED_EXTINGUISHING_FIRE, SOUND_PED_EXTINGUISHING_FIRE,
SOUND_PED_WAIT_DOUBLEBACK, SOUND_PED_WAIT_DOUBLEBACK,

View file

@ -208,7 +208,10 @@ void CControllerConfigManager::InitDefaultControlConfiguration()
SetControllerKeyAssociatedWithAction (PED_FIREWEAPON, rsPADINS, KEYBOARD); SetControllerKeyAssociatedWithAction (PED_FIREWEAPON, rsPADINS, KEYBOARD);
SetControllerKeyAssociatedWithAction (PED_FIREWEAPON, rsLCTRL, OPTIONAL_EXTRA); SetControllerKeyAssociatedWithAction (PED_FIREWEAPON, rsLCTRL, OPTIONAL_EXTRA);
#ifdef BIND_VEHICLE_FIREWEAPON
SetControllerKeyAssociatedWithAction (VEHICLE_FIREWEAPON, rsPADINS, KEYBOARD);
SetControllerKeyAssociatedWithAction (VEHICLE_FIREWEAPON, rsLCTRL, OPTIONAL_EXTRA);
#endif
SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_LEFT, rsPADDEL, KEYBOARD); SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_LEFT, rsPADDEL, KEYBOARD);
SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_RIGHT, rsPADENTER, OPTIONAL_EXTRA); // BUG: must be KEYBOARD ? SetControllerKeyAssociatedWithAction (PED_CYCLE_WEAPON_RIGHT, rsPADENTER, OPTIONAL_EXTRA); // BUG: must be KEYBOARD ?
@ -276,6 +279,9 @@ void CControllerConfigManager::InitDefaultControlConfigMouse(CMouseControllerSta
{ {
m_bMouseAssociated = true; m_bMouseAssociated = true;
SetMouseButtonAssociatedWithAction(PED_FIREWEAPON, 1); SetMouseButtonAssociatedWithAction(PED_FIREWEAPON, 1);
#ifdef BIND_VEHICLE_FIREWEAPON
SetMouseButtonAssociatedWithAction(VEHICLE_FIREWEAPON, 1);
#endif
} }
if (availableButtons.RMB) if (availableButtons.RMB)
@ -361,6 +367,9 @@ void CControllerConfigManager::InitDefaultControlConfigJoyPad(uint32 buttons)
SetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, 3, JOYSTICK); SetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, 3, JOYSTICK);
case 2: case 2:
SetControllerKeyAssociatedWithAction(PED_FIREWEAPON, 2, JOYSTICK); SetControllerKeyAssociatedWithAction(PED_FIREWEAPON, 2, JOYSTICK);
#ifdef BIND_VEHICLE_FIREWEAPON
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, 2, JOYSTICK);
#endif
case 1: case 1:
SetControllerKeyAssociatedWithAction(VEHICLE_ENTER_EXIT, 1, JOYSTICK); SetControllerKeyAssociatedWithAction(VEHICLE_ENTER_EXIT, 1, JOYSTICK);
/*******************************************************************************************/ /*******************************************************************************************/
@ -411,6 +420,9 @@ void CControllerConfigManager::InitDefaultControlConfigJoyPad(uint32 buttons)
SetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, 2, JOYSTICK); SetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, 2, JOYSTICK);
case 1: case 1:
SetControllerKeyAssociatedWithAction(PED_FIREWEAPON, 1, JOYSTICK); SetControllerKeyAssociatedWithAction(PED_FIREWEAPON, 1, JOYSTICK);
#ifdef BIND_VEHICLE_FIREWEAPON
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, 1, JOYSTICK);
#endif
/*******************************************************************************************/ /*******************************************************************************************/
} }
} }
@ -449,6 +461,9 @@ void CControllerConfigManager::InitialiseControllerActionNameArray()
SETACTIONNAME(SHOW_MOUSE_POINTER_TOGGLE); SETACTIONNAME(SHOW_MOUSE_POINTER_TOGGLE);
SETACTIONNAME(CAMERA_CHANGE_VIEW_ALL_SITUATIONS); SETACTIONNAME(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
SETACTIONNAME(PED_FIREWEAPON); SETACTIONNAME(PED_FIREWEAPON);
#ifdef BIND_VEHICLE_FIREWEAPON
SETACTIONNAME(VEHICLE_FIREWEAPON);
#endif
SETACTIONNAME(VEHICLE_ENTER_EXIT); SETACTIONNAME(VEHICLE_ENTER_EXIT);
SETACTIONNAME(GO_LEFT); SETACTIONNAME(GO_LEFT);
SETACTIONNAME(GO_RIGHT); SETACTIONNAME(GO_RIGHT);
@ -644,6 +659,10 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown(int32 button,
void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32 button, eControllerType type, CControllerState &state) void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32 button, eControllerType type, CControllerState &state)
{ {
#ifdef BIND_VEHICLE_FIREWEAPON
if (button == GetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, type))
state.Circle = 255;
#endif
if (button == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKBEHIND, type)) if (button == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKBEHIND, type))
{ {
state.LeftShoulder2 = 255; state.LeftShoulder2 = 255;
@ -788,7 +807,11 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_ThirdPersonOnl
void CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstAndThirdPersonOnly(int32 button, eControllerType type, CControllerState &state) void CControllerConfigManager::AffectControllerStateOn_ButtonDown_FirstAndThirdPersonOnly(int32 button, eControllerType type, CControllerState &state)
{ {
CPad *pad = CPad::GetPad(PAD1); CPad *pad = CPad::GetPad(PAD1);
#ifdef BIND_VEHICLE_FIREWEAPON
if (button == GetControllerKeyAssociatedWithAction(PED_FIREWEAPON, type))
state.Circle = 255;
#endif
if (button == GetControllerKeyAssociatedWithAction(PED_LOCK_TARGET, type)) if (button == GetControllerKeyAssociatedWithAction(PED_LOCK_TARGET, type))
state.RightShoulder1 = 255; state.RightShoulder1 = 255;
@ -870,8 +893,11 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_AllStates(int3
{ {
if (button == GetControllerKeyAssociatedWithAction(CAMERA_CHANGE_VIEW_ALL_SITUATIONS, type)) if (button == GetControllerKeyAssociatedWithAction(CAMERA_CHANGE_VIEW_ALL_SITUATIONS, type))
state.Select = 255; state.Select = 255;
#ifndef BIND_VEHICLE_FIREWEAPON
if (button == GetControllerKeyAssociatedWithAction(PED_FIREWEAPON, type)) if (button == GetControllerKeyAssociatedWithAction(PED_FIREWEAPON, type))
state.Circle = 255; state.Circle = 255;
#endif
if (button == GetControllerKeyAssociatedWithAction(GO_LEFT, type)) if (button == GetControllerKeyAssociatedWithAction(GO_LEFT, type))
{ {
@ -1587,28 +1613,25 @@ bool CControllerConfigManager::GetIsMouseButtonUp(RsKeyCodes keycode)
return false; return false;
} }
#define CLEAR_ACTION_IF_NEEDED(action) \
if (key == GetControllerKeyAssociatedWithAction(action, type))\
ClearSettingsAssociatedWithAction(action, type);
void CControllerConfigManager::DeleteMatchingCommonControls(e_ControllerAction action, int32 key, eControllerType type) void CControllerConfigManager::DeleteMatchingCommonControls(e_ControllerAction action, int32 key, eControllerType type)
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(CAMERA_CHANGE_VIEW_ALL_SITUATIONS,type)) CLEAR_ACTION_IF_NEEDED(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
ClearSettingsAssociatedWithAction(CAMERA_CHANGE_VIEW_ALL_SITUATIONS, type); #ifndef BIND_VEHICLE_FIREWEAPON
if (key == GetControllerKeyAssociatedWithAction(PED_FIREWEAPON, type)) CLEAR_ACTION_IF_NEEDED(PED_FIREWEAPON);
ClearSettingsAssociatedWithAction(PED_FIREWEAPON, type); #endif
if (key == GetControllerKeyAssociatedWithAction(GO_LEFT, type)) CLEAR_ACTION_IF_NEEDED(GO_LEFT);
ClearSettingsAssociatedWithAction(GO_LEFT, type); CLEAR_ACTION_IF_NEEDED(GO_RIGHT);
if (key == GetControllerKeyAssociatedWithAction(GO_RIGHT, type)) CLEAR_ACTION_IF_NEEDED(NETWORK_TALK);
ClearSettingsAssociatedWithAction(GO_RIGHT, type); CLEAR_ACTION_IF_NEEDED(SWITCH_DEBUG_CAM_ON);
if (key == GetControllerKeyAssociatedWithAction(NETWORK_TALK, type)) CLEAR_ACTION_IF_NEEDED(TOGGLE_DPAD);
ClearSettingsAssociatedWithAction(NETWORK_TALK, type); CLEAR_ACTION_IF_NEEDED(TAKE_SCREEN_SHOT);
if (key == GetControllerKeyAssociatedWithAction(SWITCH_DEBUG_CAM_ON, type)) CLEAR_ACTION_IF_NEEDED(SHOW_MOUSE_POINTER_TOGGLE);
ClearSettingsAssociatedWithAction(SWITCH_DEBUG_CAM_ON, type);
if (key == GetControllerKeyAssociatedWithAction(TOGGLE_DPAD, type))
ClearSettingsAssociatedWithAction(TOGGLE_DPAD, type);
if (key == GetControllerKeyAssociatedWithAction(TAKE_SCREEN_SHOT, type))
ClearSettingsAssociatedWithAction(TAKE_SCREEN_SHOT, type);
if (key == GetControllerKeyAssociatedWithAction(SHOW_MOUSE_POINTER_TOGGLE, type))
ClearSettingsAssociatedWithAction(SHOW_MOUSE_POINTER_TOGGLE, type);
} }
} }
@ -1616,25 +1639,17 @@ void CControllerConfigManager::DeleteMatching3rdPersonControls(e_ControllerActio
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(PED_LOOKBEHIND, type)) CLEAR_ACTION_IF_NEEDED(PED_LOOKBEHIND);
ClearSettingsAssociatedWithAction(PED_LOOKBEHIND, type); CLEAR_ACTION_IF_NEEDED(PED_CYCLE_WEAPON_LEFT);
if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_WEAPON_LEFT, type)) CLEAR_ACTION_IF_NEEDED(PED_CYCLE_WEAPON_RIGHT);
ClearSettingsAssociatedWithAction(PED_CYCLE_WEAPON_LEFT, type); CLEAR_ACTION_IF_NEEDED(PED_JUMPING);
if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_WEAPON_RIGHT, type)) CLEAR_ACTION_IF_NEEDED(PED_SPRINT);
ClearSettingsAssociatedWithAction(PED_CYCLE_WEAPON_RIGHT, type);
if (key == GetControllerKeyAssociatedWithAction(PED_JUMPING, type))
ClearSettingsAssociatedWithAction(PED_JUMPING, type);
if (key == GetControllerKeyAssociatedWithAction(PED_SPRINT, type))
ClearSettingsAssociatedWithAction(PED_SPRINT, type);
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC) if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
{ {
if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type)) CLEAR_ACTION_IF_NEEDED(PED_CYCLE_TARGET_LEFT);
ClearSettingsAssociatedWithAction(PED_CYCLE_TARGET_LEFT, type); CLEAR_ACTION_IF_NEEDED(PED_CYCLE_TARGET_RIGHT);
if (key == GetControllerKeyAssociatedWithAction(PED_CYCLE_TARGET_RIGHT, type)) CLEAR_ACTION_IF_NEEDED(PED_CENTER_CAMERA_BEHIND_PLAYER);
ClearSettingsAssociatedWithAction(PED_CYCLE_TARGET_RIGHT, type);
if (key == GetControllerKeyAssociatedWithAction(PED_CENTER_CAMERA_BEHIND_PLAYER, type))
ClearSettingsAssociatedWithAction(PED_CENTER_CAMERA_BEHIND_PLAYER, type);
} }
} }
} }
@ -1643,23 +1658,19 @@ void CControllerConfigManager::DeleteMatching1rst3rdPersonControls(e_ControllerA
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(PED_LOCK_TARGET, type)) #ifdef BIND_VEHICLE_FIREWEAPON
ClearSettingsAssociatedWithAction(PED_LOCK_TARGET, type); CLEAR_ACTION_IF_NEEDED(PED_FIREWEAPON);
if (key == GetControllerKeyAssociatedWithAction(GO_FORWARD, type)) #endif
ClearSettingsAssociatedWithAction(GO_FORWARD, type); CLEAR_ACTION_IF_NEEDED(PED_LOCK_TARGET);
if (key == GetControllerKeyAssociatedWithAction(GO_BACK, type)) CLEAR_ACTION_IF_NEEDED(GO_FORWARD);
ClearSettingsAssociatedWithAction(GO_BACK, type); CLEAR_ACTION_IF_NEEDED(GO_BACK);
if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC) if (CMenuManager::m_ControlMethod == CONTROL_CLASSIC)
{ {
if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_LEFT, type)) CLEAR_ACTION_IF_NEEDED(PED_1RST_PERSON_LOOK_LEFT);
ClearSettingsAssociatedWithAction(PED_1RST_PERSON_LOOK_LEFT, type); CLEAR_ACTION_IF_NEEDED(PED_1RST_PERSON_LOOK_RIGHT);
if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_RIGHT, type)) CLEAR_ACTION_IF_NEEDED(PED_1RST_PERSON_LOOK_DOWN);
ClearSettingsAssociatedWithAction(PED_1RST_PERSON_LOOK_RIGHT, type); CLEAR_ACTION_IF_NEEDED(PED_1RST_PERSON_LOOK_UP);
if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_DOWN, type))
ClearSettingsAssociatedWithAction(PED_1RST_PERSON_LOOK_DOWN, type);
if (key == GetControllerKeyAssociatedWithAction(PED_1RST_PERSON_LOOK_UP, type))
ClearSettingsAssociatedWithAction(PED_1RST_PERSON_LOOK_UP, type);
} }
} }
} }
@ -1668,34 +1679,23 @@ void CControllerConfigManager::DeleteMatchingVehicleControls(e_ControllerAction
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKBEHIND, type)) #ifdef BIND_VEHICLE_FIREWEAPON
ClearSettingsAssociatedWithAction(VEHICLE_LOOKBEHIND, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_FIREWEAPON);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKLEFT, type)) #endif
ClearSettingsAssociatedWithAction(VEHICLE_LOOKLEFT, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKBEHIND);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKRIGHT, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKLEFT);
ClearSettingsAssociatedWithAction(VEHICLE_LOOKRIGHT, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKRIGHT);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_LOOKBEHIND, type)) // note: dublicate CLEAR_ACTION_IF_NEEDED(VEHICLE_LOOKBEHIND); // note: duplicate
ClearSettingsAssociatedWithAction(VEHICLE_LOOKBEHIND, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_HORN);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_HORN, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_HANDBRAKE);
ClearSettingsAssociatedWithAction(VEHICLE_HORN, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_ACCELERATE);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_HANDBRAKE, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_BRAKE);
ClearSettingsAssociatedWithAction(VEHICLE_HANDBRAKE, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_CHANGE_RADIO_STATION);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_ACCELERATE, type)) CLEAR_ACTION_IF_NEEDED(TOGGLE_SUBMISSIONS);
ClearSettingsAssociatedWithAction(VEHICLE_ACCELERATE, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETLEFT);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_BRAKE, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETRIGHT);
ClearSettingsAssociatedWithAction(VEHICLE_BRAKE, type); CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETUP);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_CHANGE_RADIO_STATION, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_TURRETDOWN);
ClearSettingsAssociatedWithAction(VEHICLE_CHANGE_RADIO_STATION, type);
if (key == GetControllerKeyAssociatedWithAction(TOGGLE_SUBMISSIONS, type))
ClearSettingsAssociatedWithAction(TOGGLE_SUBMISSIONS, type);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_TURRETLEFT, type))
ClearSettingsAssociatedWithAction(VEHICLE_TURRETLEFT, type);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_TURRETRIGHT, type))
ClearSettingsAssociatedWithAction(VEHICLE_TURRETRIGHT, type);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_TURRETUP, type))
ClearSettingsAssociatedWithAction(VEHICLE_TURRETUP, type);
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_TURRETDOWN, type))
ClearSettingsAssociatedWithAction(VEHICLE_TURRETDOWN, type);
} }
} }
@ -1703,8 +1703,7 @@ void CControllerConfigManager::DeleteMatchingVehicle_3rdPersonControls(e_Control
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(VEHICLE_ENTER_EXIT, type)) CLEAR_ACTION_IF_NEEDED(VEHICLE_ENTER_EXIT);
ClearSettingsAssociatedWithAction(VEHICLE_ENTER_EXIT, type);
} }
} }
@ -1712,13 +1711,13 @@ void CControllerConfigManager::DeleteMatching1rstPersonControls(e_ControllerActi
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
{ {
if (key == GetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_IN, type)) CLEAR_ACTION_IF_NEEDED(PED_SNIPER_ZOOM_IN);
ClearSettingsAssociatedWithAction(PED_SNIPER_ZOOM_IN, type); CLEAR_ACTION_IF_NEEDED(PED_SNIPER_ZOOM_OUT);
if (key == GetControllerKeyAssociatedWithAction(PED_SNIPER_ZOOM_OUT, type))
ClearSettingsAssociatedWithAction(PED_SNIPER_ZOOM_OUT, type);
} }
} }
#undef CLEAR_ACTION_IF_NEEDED
void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type) void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type)
{ {
if (!GetIsKeyBlank(key, type)) if (!GetIsKeyBlank(key, type))
@ -1797,7 +1796,9 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
switch (action) switch (action)
{ {
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS: case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
#ifndef BIND_VEHICLE_FIREWEAPON
case PED_FIREWEAPON: case PED_FIREWEAPON:
#endif
case GO_LEFT: case GO_LEFT:
case GO_RIGHT: case GO_RIGHT:
case NETWORK_TALK: case NETWORK_TALK:
@ -1819,6 +1820,9 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
return ACTIONTYPE_3RDPERSON; return ACTIONTYPE_3RDPERSON;
break; break;
#ifdef BIND_VEHICLE_FIREWEAPON
case VEHICLE_FIREWEAPON:
#endif
case VEHICLE_LOOKBEHIND: case VEHICLE_LOOKBEHIND:
case VEHICLE_LOOKLEFT: case VEHICLE_LOOKLEFT:
case VEHICLE_LOOKRIGHT: case VEHICLE_LOOKRIGHT:
@ -1839,6 +1843,9 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
return ACTIONTYPE_VEHICLE_3RDPERSON; return ACTIONTYPE_VEHICLE_3RDPERSON;
break; break;
#ifdef BIND_VEHICLE_FIREWEAPON
case PED_FIREWEAPON:
#endif
case PED_LOCK_TARGET: case PED_LOCK_TARGET:
case GO_FORWARD: case GO_FORWARD:
case GO_BACK: case GO_BACK:

View file

@ -32,6 +32,9 @@ enum e_ControllerAction
PED_JUMPING, PED_JUMPING,
PED_SPRINT, PED_SPRINT,
PED_LOOKBEHIND, PED_LOOKBEHIND,
#ifdef BIND_VEHICLE_FIREWEAPON
VEHICLE_FIREWEAPON,
#endif
VEHICLE_ACCELERATE, VEHICLE_ACCELERATE,
VEHICLE_BRAKE, VEHICLE_BRAKE,
VEHICLE_CHANGE_RADIO_STATION, VEHICLE_CHANGE_RADIO_STATION,

View file

@ -1721,7 +1721,11 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
} else if (column == CONTSETUP_VEHICLE_COLUMN) { } else if (column == CONTSETUP_VEHICLE_COLUMN) {
switch (optionIdx) { switch (optionIdx) {
case 0: case 0:
controllerAction = PED_FIREWEAPON; #ifdef BIND_VEHICLE_FIREWEAPON
controllerAction = VEHICLE_FIREWEAPON;
#else
controllerAction = PED_FIREWEAPON;
#endif
break; break;
case 1: case 1:
case 2: case 2:

View file

@ -273,8 +273,12 @@ CStreaming::Shutdown(void)
{ {
RwFreeAlign(ms_pStreamingBuffer[0]); RwFreeAlign(ms_pStreamingBuffer[0]);
ms_streamingBufferSize = 0; ms_streamingBufferSize = 0;
if(ms_pExtraObjectsDir) if(ms_pExtraObjectsDir){
delete ms_pExtraObjectsDir; delete ms_pExtraObjectsDir;
#ifdef FIX_BUGS
ms_pExtraObjectsDir = nil;
#endif
}
} }
void void
@ -1191,7 +1195,7 @@ found:
if(id == -1) if(id == -1)
return false; // still no luck return false; // still no luck
ms_lastVehicleDeleted = id; ms_lastVehicleDeleted = id;
// this is more that we wanted actually // this is more than we wanted actually
ms_numVehiclesLoaded++; ms_numVehiclesLoaded++;
}else }else
RemoveModel(id); RemoveModel(id);
@ -1384,18 +1388,17 @@ CStreaming::StreamZoneModels(const CVector &pos)
// unload pevious group // unload pevious group
if(ms_currentPedGrp != -1) if(ms_currentPedGrp != -1)
for(i = 0; i < NUMMODELSPERPEDGROUP; i++){ for(i = 0; i < NUMMODELSPERPEDGROUP; i++){
if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != -1){
break; SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]);
SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]);
SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); }
} }
ms_currentPedGrp = info.pedGroup; ms_currentPedGrp = info.pedGroup;
for(i = 0; i < NUMMODELSPERPEDGROUP; i++){ for(i = 0; i < NUMMODELSPERPEDGROUP; i++){
if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != -1)
break; RequestModel(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i], STREAMFLAGS_DONT_REMOVE);
RequestModel(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i], STREAMFLAGS_DONT_REMOVE);
} }
} }
RequestModel(MI_MALE01, STREAMFLAGS_DONT_REMOVE); RequestModel(MI_MALE01, STREAMFLAGS_DONT_REMOVE);
@ -1593,8 +1596,6 @@ CStreaming::GetNextFileOnCd(int32 lastPosn, bool priority)
* Files larger than the buffer size can only be loaded by channel 0, * Files larger than the buffer size can only be loaded by channel 0,
* which then uses both buffers, while channel 1 is idle. * which then uses both buffers, while channel 1 is idle.
* ms_bLoadingBigModel is set to true to indicate this state. * ms_bLoadingBigModel is set to true to indicate this state.
*
* TODO: two-part files
*/ */
// Make channel read from disc // Make channel read from disc
@ -1935,7 +1936,7 @@ CStreaming::UpdateMemoryUsed(void)
// empty // empty
} }
#define STREAM_DIST (2*SECTOR_SIZE_X) #define STREAM_DIST 80.0f
void void
CStreaming::AddModelsToRequestList(const CVector &pos) CStreaming::AddModelsToRequestList(const CVector &pos)
@ -2232,7 +2233,7 @@ CStreaming::DeleteRwObjectsBehindCamera(size_t mem)
assert(ymin <= ymax); assert(ymin <= ymax);
// Delete a block of sectors that we know is behind the camera // Delete a block of sectors that we know is behind the camera
if(TheCamera.GetForward().x > 0){ if(TheCamera.GetForward().x > 0.0f){
// looking east // looking east
xmax = Max(ix - 2, 0); xmax = Max(ix - 2, 0);
xmin = Max(ix - 10, 0); xmin = Max(ix - 10, 0);
@ -2254,7 +2255,7 @@ CStreaming::DeleteRwObjectsBehindCamera(size_t mem)
} }
// Now a block that intersects with the camera's frustum // Now a block that intersects with the camera's frustum
if(TheCamera.GetForward().x > 0){ if(TheCamera.GetForward().x > 0.0f){
// looking east // looking east
xmax = Max(ix + 10, 0); xmax = Max(ix + 10, 0);
xmin = Max(ix - 2, 0); xmin = Max(ix - 2, 0);
@ -2296,7 +2297,7 @@ CStreaming::DeleteRwObjectsBehindCamera(size_t mem)
assert(xmin <= xmax); assert(xmin <= xmax);
// Delete a block of sectors that we know is behind the camera // Delete a block of sectors that we know is behind the camera
if(TheCamera.GetForward().y > 0){ if(TheCamera.GetForward().y > 0.0f){
// looking north // looking north
ymax = Max(iy - 2, 0); ymax = Max(iy - 2, 0);
ymin = Max(iy - 10, 0); ymin = Max(iy - 10, 0);
@ -2318,7 +2319,7 @@ CStreaming::DeleteRwObjectsBehindCamera(size_t mem)
} }
// Now a block that intersects with the camera's frustum // Now a block that intersects with the camera's frustum
if(TheCamera.GetForward().y > 0){ if(TheCamera.GetForward().y > 0.0f){
// looking north // looking north
ymax = Max(iy + 10, 0); ymax = Max(iy + 10, 0);
ymin = Max(iy - 2, 0); ymin = Max(iy - 2, 0);

View file

@ -231,6 +231,7 @@ enum Config {
#define ALLCARSHELI_CHEAT #define ALLCARSHELI_CHEAT
#define ALT_DODO_CHEAT #define ALT_DODO_CHEAT
#define REGISTER_START_BUTTON #define REGISTER_START_BUTTON
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
// Hud, frontend and radar // Hud, frontend and radar
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better. #define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.

View file

@ -20,6 +20,9 @@ extern bool gbShowTimebars;
class CSprite2d; class CSprite2d;
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
bool DoRWStuffStartOfFrame_Horizon(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
void InitialiseGame(void); void InitialiseGame(void);
void LoadingScreen(const char *str1, const char *str2, const char *splashscreen); void LoadingScreen(const char *str1, const char *str2, const char *splashscreen);
void LoadingIslandScreen(const char *levelName); void LoadingIslandScreen(const char *levelName);

View file

@ -134,7 +134,7 @@ CPed::Say(uint16 audio)
case SOUND_PED_FLEE_SPRINT: case SOUND_PED_FLEE_SPRINT:
case SOUND_PED_TAXI_WAIT: case SOUND_PED_TAXI_WAIT:
case SOUND_PED_EVADE: case SOUND_PED_EVADE:
case SOUND_PED_CAR_COLLISION: case SOUND_PED_ANNOYED_DRIVER:
break; break;
default: default:
return; return;

View file

@ -825,6 +825,12 @@ CalcNewDelta(RwV2d *a, RwV2d *b)
return (b->x - a->x) / (b->y - a->y); return (b->x - a->x) / (b->y - a->y);
} }
#ifdef FIX_BUGS
#define TOINT(x) ((int)Floor(x))
#else
#define TOINT(x) ((int)(x))
#endif
void void
CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrList *)) CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrList *))
{ {
@ -850,13 +856,8 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
a2 = i; a2 = i;
} }
} }
#ifdef FIX_BUGS y = TOINT(miny);
y = Floor(miny); yend = TOINT(maxy);
yend = Floor(maxy);
#else
y = miny;
yend = maxy;
#endif
// Go left in poly to find first edge b // Go left in poly to find first edge b
b2 = a2; b2 = a2;
@ -864,8 +865,8 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
b1 = b2--; b1 = b2--;
if(b2 < 0) b2 = numVertices-1; if(b2 < 0) b2 = numVertices-1;
if(poly[b1].x < xstart) if(poly[b1].x < xstart)
xstart = poly[b1].x; xstart = TOINT(poly[b1].x);
if((int)poly[b1].y != (int)poly[b2].y) if(TOINT(poly[b1].y) != TOINT(poly[b2].y))
break; break;
} }
// Go right to find first edge a // Go right to find first edge a
@ -873,8 +874,8 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
a1 = a2++; a1 = a2++;
if(a2 == numVertices) a2 = 0; if(a2 == numVertices) a2 = 0;
if(poly[a1].x > xend) if(poly[a1].x > xend)
xend = poly[a1].x; xend = TOINT(poly[a1].x);
if((int)poly[a1].y != (int)poly[a2].y) if(TOINT(poly[a1].y) != TOINT(poly[a2].y))
break; break;
} }
@ -885,10 +886,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x; xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x;
if(y != yend){ if(y != yend){
if(deltaB < 0.0f && (int)xB < xstart) if(deltaB < 0.0f && TOINT(xB) < xstart)
xstart = xB; xstart = TOINT(xB);
if(deltaA >= 0.0f && (int)xA > xend) if(deltaA >= 0.0f && TOINT(xA) > xend)
xend = xA; xend = TOINT(xA);
} }
while(y <= yend && y < NUMSECTORS_Y){ while(y <= yend && y < NUMSECTORS_Y){
@ -904,74 +905,74 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
xB += deltaB; xB += deltaB;
// update left side // update left side
if(y == (int)poly[b2].y){ if(y == TOINT(poly[b2].y)){
// reached end of edge // reached end of edge
if(y == yend){ if(y == yend){
if(deltaB < 0.0f){ if(deltaB < 0.0f){
do{ do{
xstart = poly[b2--].x; xstart = TOINT(poly[b2--].x);
if(b2 < 0) b2 = numVertices-1; if(b2 < 0) b2 = numVertices-1;
}while(xstart > (int)poly[b2].x); }while(xstart > TOINT(poly[b2].x));
}else }else
xstart = xB - deltaB; xstart = TOINT(xB - deltaB);
}else{ }else{
// switch edges // switch edges
if(deltaB < 0.0f) if(deltaB < 0.0f)
xstart = poly[b2].x; xstart = TOINT(poly[b2].x);
else else
xstart = xB - deltaB; xstart = TOINT(xB - deltaB);
do{ do{
b1 = b2--; b1 = b2--;
if(b2 < 0) b2 = numVertices-1; if(b2 < 0) b2 = numVertices-1;
if((int)poly[b1].x < xstart) if(TOINT(poly[b1].x) < xstart)
xstart = poly[b1].x; xstart = TOINT(poly[b1].x);
}while(y == (int)poly[b2].y); }while(y == TOINT(poly[b2].y));
deltaB = CalcNewDelta(&poly[b1], &poly[b2]); deltaB = CalcNewDelta(&poly[b1], &poly[b2]);
xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x; xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x;
if(deltaB < 0.0f && (int)xB < xstart) if(deltaB < 0.0f && TOINT(xB) < xstart)
xstart = xB; xstart = TOINT(xB);
} }
}else{ }else{
if(deltaB < 0.0f) if(deltaB < 0.0f)
xstart = xB; xstart = TOINT(xB);
else else
xstart = xB - deltaB; xstart = TOINT(xB - deltaB);
} }
// update right side // update right side
if(y == (int)poly[a2].y){ if(y == TOINT(poly[a2].y)){
// reached end of edge // reached end of edge
if(y == yend){ if(y == yend){
if(deltaA < 0.0f) if(deltaA < 0.0f)
xend = xA - deltaA; xend = TOINT(xA - deltaA);
else{ else{
do{ do{
xend = poly[a2++].x; xend = TOINT(poly[a2++].x);
if(a2 == numVertices) a2 = 0; if(a2 == numVertices) a2 = 0;
}while(xend < (int)poly[a2].x); }while(xend < TOINT(poly[a2].x));
} }
}else{ }else{
// switch edges // switch edges
if(deltaA < 0.0f) if(deltaA < 0.0f)
xend = xA - deltaA; xend = TOINT(xA - deltaA);
else else
xend = poly[a2].x; xend = TOINT(poly[a2].x);
do{ do{
a1 = a2++; a1 = a2++;
if(a2 == numVertices) a2 = 0; if(a2 == numVertices) a2 = 0;
if((int)poly[a1].x > xend) if(TOINT(poly[a1].x) > xend)
xend = poly[a1].x; xend = TOINT(poly[a1].x);
}while(y == (int)poly[a2].y); }while(y == TOINT(poly[a2].y));
deltaA = CalcNewDelta(&poly[a1], &poly[a2]); deltaA = CalcNewDelta(&poly[a1], &poly[a2]);
xA = deltaA * (Ceil(poly[a1].y) - poly[a1].y) + poly[a1].x; xA = deltaA * (Ceil(poly[a1].y) - poly[a1].y) + poly[a1].x;
if(deltaA >= 0.0f && (int)xA > xend) if(deltaA >= 0.0f && TOINT(xA) > xend)
xend = xA; xend = TOINT(xA);
} }
}else{ }else{
if(deltaA < 0.0f) if(deltaA < 0.0f)
xend = xA - deltaA; xend = TOINT(xA - deltaA);
else else
xend = xA; xend = TOINT(xA);
} }
} }
} }

View file

@ -69,7 +69,7 @@ const int16 WeatherTypesList[] = {
WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_RAINY, WEATHER_CLOUDY, WEATHER_SUNNY, WEATHER_SUNNY, WEATHER_RAINY, WEATHER_CLOUDY,
}; };
const float Windiness[] = { const float Windyness[] = {
0.0f, // WEATHER_SUNNY 0.0f, // WEATHER_SUNNY
0.7f, // WEATHER_CLOUDY 0.7f, // WEATHER_CLOUDY
1.0f, // WEATHER_RAINY 1.0f, // WEATHER_RAINY
@ -243,7 +243,7 @@ void CWeather::Update(void)
Rainbow = 1.0f - 4.0f * Abs(InterpolationValue - 0.25f) / 4.0f; Rainbow = 1.0f - 4.0f * Abs(InterpolationValue - 0.25f) / 4.0f;
else else
Rainbow = 0.0f; Rainbow = 0.0f;
Wind = InterpolationValue * Windiness[NewWeatherType] + (1.0f - InterpolationValue) * Windiness[OldWeatherType]; Wind = InterpolationValue * Windyness[NewWeatherType] + (1.0f - InterpolationValue) * Windyness[OldWeatherType];
AddRain(); AddRain();
} }
@ -278,8 +278,8 @@ void CWeather::AddRain()
if (Rain <= 0.1f) if (Rain <= 0.1f)
return; return;
static RwRGBA colour; static RwRGBA colour;
float screen_width = RsGlobal.width; float screen_width = SCREEN_WIDTH;
float screen_height = RsGlobal.height; float screen_height = SCREEN_HEIGHT;
int cur_frame = (int)(3 * Rain) & 3; int cur_frame = (int)(3 * Rain) & 3;
int num_drops = (int)(2 * Rain) + 2; int num_drops = (int)(2 * Rain) + 2;
static int STATIC_RAIN_ANGLE = -45; static int STATIC_RAIN_ANGLE = -45;
@ -397,11 +397,11 @@ void RenderOneRainStreak(CVector pos, CVector unused, int intensity, bool scale,
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 0], 0, 0, 0, 0); RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 0], 0, 0, 0, 0);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 0], pos.x + 11.0f * TheCamera.GetUp().x, pos.y + 11.0f * TheCamera.GetUp().y, pos.z + 11.0f * TheCamera.GetUp().z); RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 0], pos.x + 11.0f * TheCamera.GetUp().x, pos.y + 11.0f * TheCamera.GetUp().y, pos.z + 11.0f * TheCamera.GetUp().z);
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 1], 0, 0, 0, 0); RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 1], 0, 0, 0, 0);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 1], pos.x - 9.0f * TheCamera.GetRight().x, pos.y - 9.0f * TheCamera.GetRight().y, pos.z - 9.0f * TheCamera.GetUp().z); RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 1], pos.x - 9.0f * TheCamera.GetRight().x, pos.y - 9.0f * TheCamera.GetRight().y, pos.z - 9.0f * TheCamera.GetRight().z);
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 2], RAIN_COLOUR_R * intensity / 256, RAIN_COLOUR_G * intensity / 256, RAIN_COLOUR_B * intensity / 256, RAIN_ALPHA); RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 2], RAIN_COLOUR_R * intensity / 256, RAIN_COLOUR_G * intensity / 256, RAIN_COLOUR_B * intensity / 256, RAIN_ALPHA);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 2], pos.x, pos.y, pos.z); RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 2], pos.x, pos.y, pos.z);
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 3], 0, 0, 0, 0); RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 3], 0, 0, 0, 0);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 3], pos.x + 9.0f * TheCamera.GetRight().x, pos.y + 9.0f * TheCamera.GetRight().y, pos.z + 9.0f * TheCamera.GetUp().z); RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 3], pos.x + 9.0f * TheCamera.GetRight().x, pos.y + 9.0f * TheCamera.GetRight().y, pos.z + 9.0f * TheCamera.GetRight().z);
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 4], 0, 0, 0, 0); RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored + 4], 0, 0, 0, 0);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 4], pos.x - 11.0f * TheCamera.GetUp().x, pos.y - 11.0f * TheCamera.GetUp().y, pos.z - 11.0f * TheCamera.GetUp().z); RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored + 4], pos.x - 11.0f * TheCamera.GetUp().x, pos.y - 11.0f * TheCamera.GetUp().y, pos.z - 11.0f * TheCamera.GetUp().z);
float u = STREAK_U; float u = STREAK_U;

View file

@ -50,8 +50,8 @@ NodeNameStreamWrite(RwStream *stream, RwInt32 binaryLength, const void *object,
RwInt32 RwInt32
NodeNameStreamGetSize(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject) NodeNameStreamGetSize(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject)
{ {
// game checks for null pointer on node name extension but that really happen char *name = NODENAMEEXT(object); // can't be nil
return (RwInt32)rwstrlen(NODENAMEEXT(object)); return name ? (RwInt32)rwstrlen(name) : 0;
} }
bool bool

View file

@ -202,9 +202,6 @@ WriteVideoCardCapsFile(void)
} }
} }
bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
void DoRWStuffEndOfFrame(void);
void void
ConvertingTexturesScreen(uint32 num, uint32 count, const char *text) ConvertingTexturesScreen(uint32 num, uint32 count, const char *text)
{ {

View file

@ -58,11 +58,10 @@ CTxdStore::RemoveTxdSlot(int slot)
int int
CTxdStore::FindTxdSlot(const char *name) CTxdStore::FindTxdSlot(const char *name)
{ {
char *defname;
int size = ms_pTxdPool->GetSize(); int size = ms_pTxdPool->GetSize();
for(int i = 0; i < size; i++){ for(int i = 0; i < size; i++){
defname = GetTxdName(i); TxdDef *def = GetSlot(i);
if(defname && !CGeneral::faststricmp(defname, name)) if(def && !CGeneral::faststricmp(def->name, name))
return i; return i;
} }
return -1; return -1;
@ -71,8 +70,7 @@ CTxdStore::FindTxdSlot(const char *name)
char* char*
CTxdStore::GetTxdName(int slot) CTxdStore::GetTxdName(int slot)
{ {
TxdDef *def = GetSlot(slot); return GetSlot(slot)->name;
return def ? def->name : nil;
} }
void void
@ -91,9 +89,7 @@ CTxdStore::PopCurrentTxd(void)
void void
CTxdStore::SetCurrentTxd(int slot) CTxdStore::SetCurrentTxd(int slot)
{ {
TxdDef *def = GetSlot(slot); RwTexDictionarySetCurrent(GetSlot(slot)->texDict);
if(def)
RwTexDictionarySetCurrent(def->texDict);
} }
void void
@ -118,7 +114,7 @@ void
CTxdStore::RemoveRef(int slot) CTxdStore::RemoveRef(int slot)
{ {
if(--GetSlot(slot)->refCount <= 0) if(--GetSlot(slot)->refCount <= 0)
CStreaming::RemoveModel(slot + STREAM_OFFSET_TXD); CStreaming::RemoveTxd(slot);
} }
void void

View file

@ -3413,7 +3413,7 @@ CAutomobile::VehicleDamage(float impulse, uint16 damagedPiece)
m_fHealth -= bTakeLessDamage ? damage/6.0f : damage/2.0f; m_fHealth -= bTakeLessDamage ? damage/6.0f : damage/2.0f;
}else{ }else{
if(damage > 35.0f && pDriver) if(damage > 35.0f && pDriver)
pDriver->Say(SOUND_PED_CAR_COLLISION); pDriver->Say(SOUND_PED_ANNOYED_DRIVER);
m_fHealth -= bTakeLessDamage ? damage/12.0f : damage/4.0f; m_fHealth -= bTakeLessDamage ? damage/12.0f : damage/4.0f;
} }
if(m_fHealth <= 0.0f && oldHealth > 0) if(m_fHealth <= 0.0f && oldHealth > 0)
@ -4047,11 +4047,11 @@ CAutomobile::PlayCarHorn(void)
m_nCarHornTimer = 45; m_nCarHornTimer = 45;
}else if(r < 4){ }else if(r < 4){
if(pDriver) if(pDriver)
pDriver->Say(SOUND_PED_CAR_COLLISION); pDriver->Say(SOUND_PED_ANNOYED_DRIVER);
m_nCarHornTimer = 45; m_nCarHornTimer = 45;
}else{ }else{
if(pDriver) if(pDriver)
pDriver->Say(SOUND_PED_CAR_COLLISION); pDriver->Say(SOUND_PED_ANNOYED_DRIVER);
} }
} }

View file

@ -197,7 +197,7 @@ CBoat::ProcessControl(void)
m_fHealth -= (collisionDamage-25.0f)/2.0f; m_fHealth -= (collisionDamage-25.0f)/2.0f;
}else{ }else{
if(collisionDamage > 60.0f && pDriver) if(collisionDamage > 60.0f && pDriver)
pDriver->Say(SOUND_PED_CAR_COLLISION); pDriver->Say(SOUND_PED_ANNOYED_DRIVER);
if(bTakeLessDamage) if(bTakeLessDamage)
m_fHealth -= (collisionDamage-25.0f)/12.0f; m_fHealth -= (collisionDamage-25.0f)/12.0f;
else else

2
vendor/librw vendored

@ -1 +1 @@
Subproject commit 93c246b6b1137dba0cb7ed096b5f6d8ac8e8396f Subproject commit fbb2d35fc4b5eb1a1f0b9a74fb77d5d9b218dbb6