Jump to content

Is the implementation of SourceModifierList:Reset() serious?


Whateverr
  • Fixed

I noticed a issue in the SourceModifierList:Reset() method. It seems the code incorrectly references a variable named inst instead of using the class instance self.

Here is the current implementation [version 714014] :

function SourceModifierList:Reset()
	for source, src_params in pairs(inst._modifiers) do
		if src_params.onremove then
			self.inst:RemoveEventCallback("onremove", src_params.onremove, source)
		end
		self._modifiers[source] = nil
	end
	inst._modifier = inst._base
	if self._dirtycb then
		self._dirtycb(self.inst, inst._modifier)
	end
end

Could you please check if this is a typo? It looks like inst should be replaced with self or self.inst where appropriate. Thanks!


Steps to Reproduce

sourcemodifierlist.lua

  • Like 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...