Jump to content

Crash due to undeclared variable in new sanity component code, when riding a mount with a sanity aura


hoxi
  • Fixed

I.e. Pudgy Beefalo.

 

local mount = self.inst.components.rider and self.inst.components.rider:IsRiding() and self.inst.components.rider:GetMount() or nil
if mount ~= nil and mount.components.sanityaura ~= nil then
	if not SCRATCHPAD_AURANAMES_HasBaseAuraNameBeenUsed(v) then -- HERE
		local aura_val = mount.components.sanityaura:GetAura(self.inst)
		aura_val = (aura_val < 0 and (self.neg_aura_absorb > 0 and self.neg_aura_absorb * -aura_val or aura_val) * self:GetAuraMultipliers() or aura_val)
		aura_delta = aura_delta + ((aura_val < 0 and self.neg_aura_immune_sources:Get()) and 0 or aura_val)
	end
end

v should be mount instead, oops..

 

Also small suggestion, but wouldn't it make more sense to make a common function, or to insert the mount entity into the table (verifying it's not there already somehow) that iterates through sanity auras, to make it so there aren't two almost identical blocks of code very close to each other?


Steps to Reproduce

Self-explanatory.

  • Big Ups 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...