chat_commands 1.1.7

Updated GetAvailablePerks util function

Instead of returning perks from the vending machine, it will now return all perks from the wunderfizz if the map has wunderfizz machine(s). If not then it will use the regular perks machines just like before (fixed Origins returning 5 perks instead of the 9 available)
This commit is contained in:
Resxt
2025-09-20 15:03:58 +02:00
parent 0f6a3761cc
commit af452157f6

View File

@@ -780,14 +780,21 @@ GetAvailablePerks()
{
perks = [];
foreach (machine in GetEntArray( "zombie_vending", "targetname" ))
if (GetEntArray("random_perk_machine", "targetname").size == 0)
{
if (machine.script_noteworthy != "specialty_weapupgrade")
foreach (machine in GetEntArray( "zombie_vending", "targetname" ))
{
perks = AddElementToArray(perks, machine.script_noteworthy);
if (machine.script_noteworthy != "specialty_weapupgrade")
{
perks = AddElementToArray(perks, machine.script_noteworthy);
}
}
}
Print("perkssize: " + perks.size);
else
{
perks = level._random_perk_machine_perk_list;
}
return perks;
}