Add suggested boyancy modifier. Fixes: #366 (#371)

This commit is contained in:
thegrb93 2021-07-19 14:03:56 -04:00 committed by GitHub
parent 5198dfb693
commit e826dc5817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -727,7 +727,16 @@ local function ApplyEntityModifiers(Player, Ent)
end
end
end
if(Ent.EntityMods["buoyancy"] and duplicator.EntityModifiers["buoyancy"]) then
local ok, err = pcall(duplicator.EntityModifiers["buoyancy"], Player, Ent, Ent.EntityMods["buoyancy"])
if (not ok) then
if (Player) then
Player:ChatPrint('Error applying entity modifer, "buoyancy". ERROR: ' .. err)
else
print('Error applying entity modifer, "' .. tostring(Type) .. '". ERROR: ' .. err)
end
end
end
end
local function ApplyBoneModifiers(Player, Ent)