Skip to content

Add mappool#415

Open
TheGunter24 wants to merge 6 commits into
splewis:masterfrom
TheGunter24:addMappool
Open

Add mappool#415
TheGunter24 wants to merge 6 commits into
splewis:masterfrom
TheGunter24:addMappool

Conversation

@TheGunter24
Copy link
Copy Markdown

#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

@splewis
Copy link
Copy Markdown
Owner

splewis commented Sep 4, 2022

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.

Comment thread scripting/pugsetup.sp Outdated

#undef REQUIRE_PLUGIN
#include "include/updater.inc"
#include <updater>
Copy link
Copy Markdown
Owner

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[][] = {
Copy link
Copy Markdown
Owner

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.

Comment thread scripting/pugsetup/mapvote.sp Outdated
public void CreateMapVote() {
StartMapVote2();
}
static void StartMapVote2() {
Copy link
Copy Markdown
Owner

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?

Comment thread scripting/pugsetup/mapvote.sp Outdated
Format(text, 64, mapGroups[winner]);
ReplaceString(text, 64, ".txt", "", false);

PrintCenterTextAll("Winner is %s", text);
Copy link
Copy Markdown
Owner

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];
Copy link
Copy Markdown
Owner

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?

Comment thread scripting/pugsetup/mapvote.sp Outdated

ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]);

char text[64];
Copy link
Copy Markdown
Owner

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.

Comment thread scripting/pugsetup/natives.sp Outdated
else if (p == Permission_Leader)
return isLeader || isAdmin;
else if (p == Permission_Captains)
else if (p == Permission_Captains && UsingCaptains())
Copy link
Copy Markdown
Owner

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.

Comment thread scripting/pugsetup/natives.sp Outdated
bool override = GetNativeCell(2);
if (!PugSetup_IsTeamBalancerAvaliable() || override) {
g_BalancerFunctionPlugin = plugin;
//ArrayList players = new ArrayList();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

Comment thread scripting/pugsetup/natives.sp Outdated
}
Call_StartFunction(g_BalancerFunctionPlugin, g_BalancerFunction);
Call_PushCell(players);
Call_Finish();
Copy link
Copy Markdown
Owner

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.

if (action == MenuAction_VoteEnd) {
int winner = GetMenuInt(menu, param1);

ServerCommand("sm_pugsetup_maplist %s", mapGroups[winner]);
Copy link
Copy Markdown
Owner

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.

@daviten74
Copy link
Copy Markdown

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?

@TheGunter24
Copy link
Copy Markdown
Author

i dont think that this is for support,
but take a look at this: https://github.com/splewis/csgo-pug-setup#pugsetup_teamlocker
works fine for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants