Skip to content
Snippets Groups Projects
Commit 074c1003 authored by dg's avatar dg
Browse files

Vor Armoury npcs are 'vaulted' they will not act before being seen, improving...

Vor Armoury npcs are 'vaulted' they will not act before being seen, improving performances there by a *lot*


git-svn-id: http://svn.net-core.org/repos/t-engine4@6243 51575b47-30f0-44d4-a5cc-537603b46e54
parent b428a054
No related branches found
No related tags found
No related merge requests found
...@@ -663,7 +663,7 @@ function _M:addTemporaryValue(prop, v, noupdate) ...@@ -663,7 +663,7 @@ function _M:addTemporaryValue(prop, v, noupdate)
base[prop] = (base[prop] or 0) + v base[prop] = (base[prop] or 0) + v
end end
self:onTemporaryValueChange(prop, v, base) self:onTemporaryValueChange(prop, v, base)
print("addTmpVal", base, prop, v, " :=: ", #t, id, method) -- print("addTmpVal", base, prop, v, " :=: ", #t, id, method)
elseif type(v) == "table" then elseif type(v) == "table" then
for k, e in pairs(v) do for k, e in pairs(v) do
-- print("addTmpValTable", base[prop], k, e) -- print("addTmpValTable", base[prop], k, e)
...@@ -689,7 +689,7 @@ end ...@@ -689,7 +689,7 @@ end
-- @param noupdate if true the actual property is not changed and needs to be changed by the caller -- @param noupdate if true the actual property is not changed and needs to be changed by the caller
function _M:removeTemporaryValue(prop, id, noupdate) function _M:removeTemporaryValue(prop, id, noupdate)
local oldval = self.compute_vals[id] local oldval = self.compute_vals[id]
print("removeTempVal", prop, oldval, " :=: ", id) -- print("removeTempVal", prop, oldval, " :=: ", id)
if not id then util.send_error_backtrace("error removing prop "..tostring(prop).." with id nil") return end if not id then util.send_error_backtrace("error removing prop "..tostring(prop).." with id nil") return end
self.compute_vals[id] = nil self.compute_vals[id] = nil
......
...@@ -58,6 +58,9 @@ return { ...@@ -58,6 +58,9 @@ return {
}, },
post_process = function(level) post_process = function(level)
for uid, e in pairs(level.entities) do e.faction="orc-pride" end for uid, e in pairs(level.entities) do e.faction="orc-pride" end
if level.level == 2 then
for uid, e in pairs(level.entities) do e:setEffect(e.EFF_VAULTED, 1, {}) end
end
end, end,
levels = levels =
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment