Commit e3a437fd294fe0aaff3b3e4c8f4c6c3f94766eba

Authored by DarkGod
1 parent 3ae549d6

Fixed a bug preventing steamsaw/guns from generating as egos for randbosses (amongst other things)

... ... @@ -381,15 +381,16 @@ function _M:makeEntity(level, type, filter, force_level, prob_filter)
381 381 resolvers.current_level = self.base_level + level.level - 1
382 382 if force_level then resolvers.current_level = force_level end
383 383
384   - if prob_filter == nil then prob_filter = util.getval(self.default_prob_filter, self, type) end
385   - if filter == nil then filter = util.getval(self.default_filter, self, level, type) end
386   - if filter and self.alter_filter then filter = util.getval(self.alter_filter, self, level, type, filter) end
387   -
388 384 local list
389 385 if _G.type(type) == "table" then -- use the provided list
390 386 list = type
391 387 type = type.__real_type or ""
392 388 end
  389 +
  390 + if prob_filter == nil then prob_filter = util.getval(self.default_prob_filter, self, type) end
  391 + if filter == nil then filter = util.getval(self.default_filter, self, level, type) end
  392 + if filter and self.alter_filter then filter = util.getval(self.alter_filter, self, level, type, filter) end
  393 +
393 394 local e
394 395 -- No probability list, use the default one and apply filter
395 396 if not prob_filter then
... ...