Control x2 hpregen with class property
This commit is contained in:
parent
32c1faa9e8
commit
85bf7b96d1
2 changed files with 3 additions and 1 deletions
|
@ -59,6 +59,8 @@ ctf_classes.register("medic", {
|
||||||
cons = {},
|
cons = {},
|
||||||
color = "#0af",
|
color = "#0af",
|
||||||
properties = {
|
properties = {
|
||||||
|
nearby_hpregen = true,
|
||||||
|
|
||||||
initial_stuff = {
|
initial_stuff = {
|
||||||
"ctf_bandages:bandage 20",
|
"ctf_bandages:bandage 20",
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,7 +12,7 @@ local function regen_update()
|
||||||
local class = get(player)
|
local class = get(player)
|
||||||
local tname = ctf.player(pname).team
|
local tname = ctf.player(pname).team
|
||||||
tnames[pname] = tname
|
tnames[pname] = tname
|
||||||
if class.name == "medic" then
|
if class.properties.nearby_hpregen then
|
||||||
if tname then
|
if tname then
|
||||||
medic_by_team[tname][#medic_by_team[tname] + 1] = player:get_pos()
|
medic_by_team[tname][#medic_by_team[tname] + 1] = player:get_pos()
|
||||||
found_medic = true
|
found_medic = true
|
||||||
|
|
Loading…
Reference in a new issue