Skip to content

Commit

Permalink
fix: return correct extends left value (#22)
Browse files Browse the repository at this point in the history
Thanks to @notkoen to notice this issue
  • Loading branch information
Rushaway authored Jul 30, 2024
1 parent ae3b92c commit b677856
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/sourcemod/scripting/mapchooser_extended.sp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#tryinclude <zleader>
#define REQUIRE_PLUGIN

#define MCE_VERSION "1.12.2"
#define MCE_VERSION "1.12.3"

#define ZLEADER "zleader"
#define DYNCHANNELS "DynamicChannels"
Expand Down Expand Up @@ -1759,7 +1759,9 @@ public void Handler_VoteFinishedGeneric(Handle menu,
SetConVarInt(g_Cvar_Fraglimit, fraglimit + InternalGetMapExtendFrag(map));
}

int iExentedLeft = InternalGetMapMaxExtends(map) - g_Extends;
char sCurrentMap[64];
GetCurrentMap(sCurrentMap, sizeof(sCurrentMap));
int iExentedLeft = InternalGetMapMaxExtends(sCurrentMap) - g_Extends;

CPrintToChatAll("{green}[MCE]{default} %t", "Current Map Extended", RoundToFloor(float(item_info[0][VOTEINFO_ITEM_VOTES])/float(num_votes)*100.0), num_votes);
CPrintToChatAll("{green}[MCE]{default} %t", "Available Extends", iExentedLeft);
Expand Down

0 comments on commit b677856

Please sign in to comment.