physics: Remove assertions and physics.change (#394)
Without the assertion, physics.set does the exact same thing physics.change would do.
This commit is contained in:
parent
22ca8de079
commit
802426b842
1 changed files with 8 additions and 8 deletions
|
@ -29,19 +29,19 @@ local function update(name)
|
|||
end
|
||||
|
||||
function physics.set(pname, name, modifiers)
|
||||
assert(players[pname] and not players[pname][name])
|
||||
if not players[pname] then
|
||||
return
|
||||
end
|
||||
|
||||
players[pname][name] = modifiers
|
||||
update(pname)
|
||||
end
|
||||
|
||||
function physics.change(pname, name, modifier)
|
||||
assert(players[pname] and players[pname][name])
|
||||
players[pname][name] = modifier
|
||||
update(pname)
|
||||
function physics.remove(pname, name)
|
||||
if not players[pname] then
|
||||
return
|
||||
end
|
||||
|
||||
function physics.remove(pname, name)
|
||||
assert(players[pname] and players[pname][name])
|
||||
players[pname][name] = nil
|
||||
update(pname)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue