Delegate doing tool damage to player to tool
This commit is contained in:
parent
97ca7cbd0f
commit
b4d1073eae
@ -676,6 +676,9 @@ network.sys_handle_c2s(PKT_PLR_GUN_HIT, "BB", nwdec_plrset(function (neth, cli,
|
||||
if tplr then
|
||||
if styp >= 1 and styp <= 3 then
|
||||
local tool = plr.tools[plr.tool+1]
|
||||
if tool.hit_player ~= nil then
|
||||
tool.hit_player(tplr, styp)
|
||||
else
|
||||
if tool.get_damage then
|
||||
local dmg, dtype
|
||||
dmg, dtype = tool.get_damage(styp, tplr)
|
||||
@ -685,6 +688,7 @@ network.sys_handle_c2s(PKT_PLR_GUN_HIT, "BB", nwdec_plrset(function (neth, cli,
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end))
|
||||
network.sys_handle_c2s(PKT_PLR_TOOL, "BB", nwdec_plrset(function (neth, cli, plr, sec_current, tpid, tool, pkt)
|
||||
if plr and tool >= 0 and tool <= 3 then
|
||||
|
Loading…
x
Reference in New Issue
Block a user