remove support for 'worse' sounds

This commit is contained in:
shavitush 2016-08-01 02:00:20 +03:00
parent 0fcc37a71f
commit 38df2183e1
2 changed files with 2 additions and 16 deletions

View File

@ -9,7 +9,6 @@
// first - first record on map and style ever // first - first record on map and style ever
// personal - personal best // personal - personal best
// world - new server WR // world - new server WR
// worse - worse than personal best
// number - rank on map, only one per rank (example: "1" "shavit/pro.mp3"), will play for every player. overrides others // number - rank on map, only one per rank (example: "1" "shavit/pro.mp3"), will play for every player. overrides others
"first" "shavit/fr_1.mp3" "first" "shavit/fr_1.mp3"
"personal" "shavit/pb_1.mp3" "personal" "shavit/pb_1.mp3"
@ -17,4 +16,3 @@
"world" "shavit/wr_2.mp3" "world" "shavit/wr_2.mp3"
"world" "shavit/wr_3.mp3" "world" "shavit/wr_3.mp3"
"world" "shavit/wr_4.mp3" "world" "shavit/wr_4.mp3"
"worse" "shavit/ws_1.mp3"

View File

@ -33,7 +33,6 @@ ServerGame gSG_Type = Game_Unknown;
ArrayList gA_FirstSounds = null; ArrayList gA_FirstSounds = null;
ArrayList gA_PersonalSounds = null; ArrayList gA_PersonalSounds = null;
ArrayList gA_WorldSounds = null; ArrayList gA_WorldSounds = null;
ArrayList gA_WorseSounds = null;
StringMap gSM_RankSounds = null; StringMap gSM_RankSounds = null;
public Plugin myinfo = public Plugin myinfo =
@ -58,7 +57,6 @@ public void OnPluginStart()
gA_FirstSounds = new ArrayList(PLATFORM_MAX_PATH); gA_FirstSounds = new ArrayList(PLATFORM_MAX_PATH);
gA_PersonalSounds = new ArrayList(PLATFORM_MAX_PATH); gA_PersonalSounds = new ArrayList(PLATFORM_MAX_PATH);
gA_WorldSounds = new ArrayList(PLATFORM_MAX_PATH); gA_WorldSounds = new ArrayList(PLATFORM_MAX_PATH);
gA_WorseSounds = new ArrayList(PLATFORM_MAX_PATH);
gSM_RankSounds = new StringMap(); gSM_RankSounds = new StringMap();
gSG_Type = Shavit_GetGameType(); gSG_Type = Shavit_GetGameType();
@ -115,11 +113,6 @@ public void OnMapStart()
gA_WorldSounds.PushString(sExploded[1]); gA_WorldSounds.PushString(sExploded[1]);
} }
else if(StrEqual(sExploded[0], "worse"))
{
gA_WorseSounds.PushString(sExploded[1]);
}
else else
{ {
char[] sRank = new char[8]; char[] sRank = new char[8];
@ -148,7 +141,7 @@ public void OnMapStart()
delete fFile; delete fFile;
} }
public void Shavit_OnFinish_Post(int client, BhopStyle style, float time, int jumps, int strafes, float sync, int rank) public void Shavit_OnFinish_Post(int client, BhopStyle style, float time, int jumps, int strafes, float sync, int rank, int overwrite)
{ {
float fOldTime = 0.0; float fOldTime = 0.0;
Shavit_GetPlayerPB(client, style, fOldTime); Shavit_GetPlayerPB(client, style, fOldTime);
@ -177,16 +170,11 @@ public void Shavit_OnFinish_Post(int client, BhopStyle style, float time, int ju
gA_PersonalSounds.GetString(GetRandomInt(0, gA_PersonalSounds.Length - 1), sSound, PLATFORM_MAX_PATH); gA_PersonalSounds.GetString(GetRandomInt(0, gA_PersonalSounds.Length - 1), sSound, PLATFORM_MAX_PATH);
} }
else if(gA_FirstSounds.Length != 0 && fOldTime == 0.0) else if(gA_FirstSounds.Length != 0 && overwrite == 1)
{ {
gA_FirstSounds.GetString(GetRandomInt(0, gA_FirstSounds.Length - 1), sSound, PLATFORM_MAX_PATH); gA_FirstSounds.GetString(GetRandomInt(0, gA_FirstSounds.Length - 1), sSound, PLATFORM_MAX_PATH);
} }
else if(gA_WorseSounds.Length != 0 && time > fOldTime)
{
gA_WorseSounds.GetString(GetRandomInt(0, gA_WorseSounds.Length - 1), sSound, PLATFORM_MAX_PATH);
}
if(StrContains(sSound, ".") != -1) // file has an extension? if(StrContains(sSound, ".") != -1) // file has an extension?
{ {
PlayEventSound(client, bEveryone, sSound); PlayEventSound(client, bEveryone, sSound);