equal
deleted
inserted
replaced
28 if processed == nil or not processed then |
28 if processed == nil or not processed then |
29 -- Get the ammo for this hog's team |
29 -- Get the ammo for this hog's team |
30 local ammo = getTeamValue(name, "ammo") |
30 local ammo = getTeamValue(name, "ammo") |
31 -- If there is no ammo, get a random one from the list and store it |
31 -- If there is no ammo, get a random one from the list and store it |
32 if ammo == nil then |
32 if ammo == nil then |
33 ammo = weapons[GetRandom(table.maxn(weapons)) + 1] |
33 ammo = weapons[GetRandom(#weapons) + 1] |
34 setTeamValue(name, "ammo", ammo) |
34 setTeamValue(name, "ammo", ammo) |
35 end |
35 end |
36 -- Add the ammo for the hog |
36 -- Add the ammo for the hog |
37 AddAmmo(hog, ammo) |
37 AddAmmo(hog, ammo) |
38 -- Mark as processed |
38 -- Mark as processed |