Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/stable'
Browse files Browse the repository at this point in the history
# Conflicts:
#	addons/sourcemod/scripting/freak_fortress_2.sp
  • Loading branch information
winstliu committed Aug 4, 2016
2 parents 9afc532 + 73a97ce commit 3b5fd2f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ before_script:
- wget "https://raw.githubusercontent.com/Flyflo/SM-Goomba-Stomp/master/addons/sourcemod/scripting/include/goomba.inc" -O include/goomba.inc
- wget "https://forums.alliedmods.net/attachment.php?attachmentid=115795&d=1360508618" -O include/rtd.inc
- wget "https://forums.alliedmods.net/attachment.php?attachmentid=116849&d=1377667508" -O include/tf2attributes.inc

# RTD is particularly annoying since it doesn't handle optional plugin dependencies correctly
- sed -i'' 's/required = 1/#if defined REQUIRE_PLUGIN\nrequired = 1\n\#else\nrequired = 0/' include/rtd.inc

- chmod +x spcomp
- mkdir compiled compiled/freaks
script: ./compile.sh freak_fortress_2.sp freaks/*.sp
Expand Down
32 changes: 25 additions & 7 deletions addons/sourcemod/scripting/freak_fortress_2.sp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Updated by Wliu, Chris, Lawd, and Carge after Powerlord quit FF2

#define MAJOR_REVISION "1"
#define MINOR_REVISION "10"
#define STABLE_REVISION "11"
//#define DEV_REVISION "Beta"
#define STABLE_REVISION "12"
#define DEV_REVISION "Beta"
#if !defined DEV_REVISION
#define PLUGIN_VERSION MAJOR_REVISION..."."...MINOR_REVISION..."."...STABLE_REVISION //1.10.11
#define PLUGIN_VERSION MAJOR_REVISION..."."...MINOR_REVISION..."."...STABLE_REVISION //1.10.12
#else
#define PLUGIN_VERSION MAJOR_REVISION..."."...MINOR_REVISION..."."...STABLE_REVISION..." "...DEV_REVISION
#endif
Expand Down Expand Up @@ -296,7 +296,8 @@ static const String:ff2versiontitles[][]=
"1.10.9",
"1.10.9",
"1.10.10",
"1.10.11"
"1.10.11",
"1.10.12"
};

static const String:ff2versiondates[][]=
Expand Down Expand Up @@ -375,13 +376,19 @@ static const String:ff2versiondates[][]=
"May 7, 2016", //1.10.9
"May 7, 2016", //1.10.9
"August 1, 2016", //1.10.10
"August 1, 2016" //1.10.11
"August 1, 2016", //1.10.11
"August 4, 2016" //1.10.12
};

stock FindVersionData(Handle:panel, versionIndex)
{
switch(versionIndex)
{
case 75: //1.10.12
{
DrawPanelText(panel, "1) Actually fixed BGMs not looping (Wliu from WakaFlocka, again)");
DrawPanelText(panel, "2) Fixed new clients not respecting the current music state (Wliu from shadow93)");
}
case 74: //1.10.11
{
DrawPanelText(panel, "1) Fixed BGMs not looping (Wliu from WakaFlocka)");
Expand Down Expand Up @@ -2912,6 +2919,7 @@ public Action:Timer_PrepareBGM(Handle:timer, any:userid)
KillTimer(MusicTimer[client]);
MusicTimer[client]=INVALID_HANDLE;
}
continue;
}

if(MusicTimer[client]!=INVALID_HANDLE)
Expand Down Expand Up @@ -3008,7 +3016,7 @@ StartMusic(client=0)
StopMusic();
for(new target; target<=MaxClients; target++)
{
playBGM[target]=true;
playBGM[target]=true; //This includes the 0th index
}
CreateTimer(0.0, Timer_PrepareBGM, 0, TIMER_FLAG_NO_MAPCHANGE);
}
Expand All @@ -3024,6 +3032,11 @@ StopMusic(client=0, bool:permanent=false)
{
if(client<=0) //Stop music for all clients
{
if(permanent)
{
playBGM[0]=false;
}

for(client=1; client<=MaxClients; client++)
{
if(IsValidClient(client))
Expand Down Expand Up @@ -4506,7 +4519,12 @@ public OnClientPostAdminCheck(client)
}
}

StartMusic(client);
//We use the 0th index here because client indices can change.
//If this is false that means music is disabled for all clients, so don't play it for new clients either.
if(playBGM[0])
{
CreateTimer(0.0, Timer_PrepareBGM, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
}
}
}

Expand Down
7 changes: 4 additions & 3 deletions update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
{
"Version"
{
"Latest" "1.10.11"
"Previous" "1.10.10"
"Latest" "1.10.12"
"Previous" "1.10.11"
}

"Notes" "Fixed BGMs not looping (Wliu from WakaFlocka)"
"Notes" "Actually fixed BGMs not looping (Wliu from WakaFlocka, again)"
"Notes" "Fixed new clients not respecting the current music state (Wliu from shadow93)"
}

"Files"
Expand Down

0 comments on commit 3b5fd2f

Please sign in to comment.