- fixed bug where the menu map parser truncated lines and thus gave IsMapValid() weird results
- fixed a bug where kicking yourself could throw an RTE --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401664
This commit is contained in:
parent
00682b7782
commit
30f3067827
@ -141,7 +141,10 @@ public Action:Command_Kick(client, args)
|
|||||||
{
|
{
|
||||||
kick_self = client;
|
kick_self = client;
|
||||||
}
|
}
|
||||||
PerformKick(client, target_list[i], Arguments[len]);
|
else
|
||||||
|
{
|
||||||
|
PerformKick(client, target_list[i], Arguments[len]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kick_self)
|
if (kick_self)
|
||||||
|
@ -120,22 +120,28 @@ LoadMapList(Handle:menu)
|
|||||||
return LoadMapFolder(menu);
|
return LoadMapFolder(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
decl String:buffer[64], len;
|
decl String:buffer[256], len;
|
||||||
while (!IsEndOfFile(file) && ReadFileLine(file, buffer, sizeof(buffer)))
|
while (!IsEndOfFile(file) && ReadFileLine(file, buffer, sizeof(buffer)))
|
||||||
{
|
{
|
||||||
TrimString(buffer);
|
TrimString(buffer);
|
||||||
|
|
||||||
if ((len = StrContains(buffer, ".bsp", false)) != -1)
|
if ((len = StrContains(buffer, ".bsp", false)) != -1)
|
||||||
{
|
{
|
||||||
buffer[len] = '\0';
|
buffer[len] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer[0] == '\0' || !IsValidConVarChar(buffer[0]) || !IsMapValid(buffer))
|
if (buffer[0] == '\0'
|
||||||
|
|| buffer[0] == ';'
|
||||||
|
|| buffer[0] == '/'
|
||||||
|
|| !IsValidConVarChar(buffer[0]))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddMenuItem(menu, buffer, buffer);
|
if (IsMapValid(buffer))
|
||||||
|
{
|
||||||
|
AddMenuItem(menu, buffer, buffer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseHandle(file);
|
CloseHandle(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user