mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 02:53:21 +00:00
Update scripts / binaries
This commit is contained in:
parent
b42d0ecb46
commit
807dbfd805
16 changed files with 196 additions and 30 deletions
|
@ -444,6 +444,7 @@ int SpawnCategoryHandler(Menu menu, MenuAction action, int client, int param2) {
|
|||
ShowSpawnRoot(client);
|
||||
}
|
||||
} else {
|
||||
PrintToServer("SpawnCategoryHandler: calling ClearItemBuffer, Menu cancelled");
|
||||
g_PropData[client].CleanupBuffers();
|
||||
}
|
||||
} else if (action == MenuAction_End)
|
||||
|
@ -470,7 +471,6 @@ int SpawnItemHandler(Menu menu, MenuAction action, int client, int param2) {
|
|||
// Use same item menu again:
|
||||
ShowItemMenu(client);
|
||||
} else if(action == MenuAction_Cancel) {
|
||||
g_PropData[client].ClearItemBuffer();
|
||||
if(param2 == MenuCancel_ExitBack) {
|
||||
CategoryData category;
|
||||
if(g_PropData[client].PopCategory(category)) {
|
||||
|
@ -480,7 +480,8 @@ int SpawnItemHandler(Menu menu, MenuAction action, int client, int param2) {
|
|||
// If there is no categories, it means we are in a temp menu (search / recents / favorites)
|
||||
ShowSpawnRoot(client);
|
||||
}
|
||||
} else {
|
||||
} else if(param2 != MenuCancel_Interrupted) {
|
||||
PrintToServer("SpawnItemHandler: calling ClearItemBuffer, Menu cancelled. param2=%d", param2);
|
||||
g_PropData[client].CleanupBuffers();
|
||||
}
|
||||
} else if (action == MenuAction_End) {
|
||||
|
|
|
@ -426,6 +426,9 @@ ArrayList SearchItems(const char[] query) {
|
|||
ArrayList items = new ArrayList(sizeof(ItemData));
|
||||
ItemData item;
|
||||
SearchData data;
|
||||
if(results.Length > MAX_SEARCH_RESULTS) {
|
||||
results.Resize(MAX_SEARCH_RESULTS);
|
||||
}
|
||||
for(int i = 0; i < results.Length; i++) {
|
||||
results.GetArray(i, data);
|
||||
item.FromSearchData(data);
|
||||
|
@ -471,7 +474,6 @@ bool _searchItems(ArrayList results, ArrayList items, const char[] query) {
|
|||
search.FromItemData(item);
|
||||
search.index = searchIndex;
|
||||
results.PushArray(search);
|
||||
if(results.Length > MAX_SEARCH_RESULTS) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue