-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mappool #415
base: master
Are you sure you want to change the base?
Add mappool #415
Conversation
There's a lot of unrelated changes to the idea of adding different mappool files here. If you can split this up into multipe PRs it will be faster/more likely to get merged. |
scripting/pugsetup.sp
Outdated
@@ -12,7 +12,7 @@ | |||
#include <SteamWorks> | |||
|
|||
#undef REQUIRE_PLUGIN | |||
#include "include/updater.inc" | |||
#include <updater> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break the automated compilation test since this file won't be available: https://github.com/splewis/csgo-pug-setup/blob/master/.travis.yml
I would revert this, unless there's a reliable location to get the include from (i.e., undo ca76885)
@@ -1,9 +1,53 @@ | |||
#define RANDOM_MAP_VOTE "-1" // must be in invalid index for array indexing | |||
|
|||
char mapGroups[][] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned previously, I disagree with placing these in a different directory.
I also disagree with breaking backwards compatibility for existing users populating a different map config file.
scripting/pugsetup/mapvote.sp
Outdated
/** | ||
* Map voting functions | ||
*/ | ||
public void CreateMapVote() { | ||
StartMapVote2(); | ||
} | ||
static void StartMapVote2() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a poor name for this function. Can you use a more descriptive name?
scripting/pugsetup/mapvote.sp
Outdated
Format(text, 64, mapGroups[winner]); | ||
ReplaceString(text, 64, ".txt", "", false); | ||
|
||
PrintCenterTextAll("Winner is %s", text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text should use a translation string.
menu.SetTitle("%T", "VoteMenuTitle", LANG_SERVER); | ||
menu.ExitButton = false; | ||
for (int i = 0; i < sizeof(mapGroups); i++) { | ||
char text[64], id[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this use the AddMenuInt
helper function used elsewhere in the plugin?
scripting/pugsetup/mapvote.sp
Outdated
|
||
ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]); | ||
|
||
char text[64]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using PLATFORM_MAX_PATH
instead of 64 seems more appropriate here.
scripting/pugsetup/natives.sp
Outdated
@@ -397,7 +404,7 @@ public int Native_HasPermissions(Handle plugin, int numParams) { | |||
return isAdmin; | |||
else if (p == Permission_Leader) | |||
return isLeader || isAdmin; | |||
else if (p == Permission_Captains) | |||
else if (p == Permission_Captains && UsingCaptains()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems potentially problematic. If a permission has Permission_Captains
using this native will throw an error now.
scripting/pugsetup/natives.sp
Outdated
@@ -501,7 +513,19 @@ public int Native_SetTeamBalancer(Handle plugin, int numParams) { | |||
bool override = GetNativeCell(2); | |||
if (!PugSetup_IsTeamBalancerAvaliable() || override) { | |||
g_BalancerFunctionPlugin = plugin; | |||
//ArrayList players = new ArrayList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
scripting/pugsetup/natives.sp
Outdated
} | ||
Call_StartFunction(g_BalancerFunctionPlugin, g_BalancerFunction); | ||
Call_PushCell(players); | ||
Call_Finish(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changing? It seems incorrect to invoke this function since the native could be called far before the match is ready.
as requested
if (action == MenuAction_VoteEnd) { | ||
int winner = GetMenuInt(menu, param1); | ||
|
||
ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make sense to override the value here. It doesn't make sense to even have the cvar if the plugin will just override it before it gets used.
Hello, I am having problems with the blocking of teams, certain people can enter from ct or t in the middle of the live game, what could be failing me? |
i dont think that this is for support, |
#373
was made from Franc1sco Franug for me and worked fine for over a year now
i have updated it to latest version and included the fixes for sm11
steamworks needs a new version: https://forums.alliedmods.net/showpost.php?p=2785634&postcount=829
it has not been fully testet since my "update" but it looked good so far