Use vector helper functions instead of old builtin cmpPos and addPosRule functions

This commit is contained in:
Jeija
2016-02-14 20:55:50 +01:00
parent 6b54f025c1
commit 809192f353
12 changed files with 44 additions and 56 deletions

View File

@ -23,7 +23,7 @@ function mesecon.queue:add_action(pos, func, params, time, overwritecheck, prior
-- Otherwise, add the action to the queue
if overwritecheck then -- check if old action has to be overwritten / removed:
for i, ac in ipairs(mesecon.queue.actions) do
if(mesecon.cmpPos(pos, ac.pos)
if(vector.equals(pos, ac.pos)
and mesecon.cmpAny(overwritecheck, ac.owcheck)) then
toremove = i
break