Jump to content

Recommended Posts

So, i've noticed a problem with RPG HUD Neat 45 that may or may not be causing epic lag when insane for long periods. The log file shows that there are literally thousands of stale component references, most of them linked to the sanitybadge.lua file. I know it's the mod because it's not there if I remove the mod.

 

I talked with kiopho, and he...has absolutely no idea. So, i'm asking here instead.

 

Any ideas as to why this is?

I was hoping you might know what a stale component reference is.

 

It's a...thing.

 

The game doesn't crash, but it will lag out eventually if you remain insane for long periods of time. As for the code that is causing the issue, all I know is that it's tied to sanitybadge.lua.

 

http://forums.kleientertainment.com/topic/29797-performancestill-have-mysterious-fps-loss/?p=376579

 

Here's the badge.lua file from the mod folder, if that helps at all.

 

local UIAnim = require "widgets/uianim"local Text = require "widgets/text"local easing = require "easing"local Widget = require "widgets/widget"local STATUS_ATLAS = "images/status.xml"local Badge = Class(Widget, function(self, anim, owner)        Widget._ctor(self, "Badge")	self.owner = owner        self.percent = 1    self:SetScale(.9,.9,.9)    	self.statusbg = self:AddChild(Image(STATUS_ATLAS, "status_bg.tex"))	self.statusbg:SetScale(.45,.45,0)    self.statusbg:SetPosition(0,0,0)        self.mininum = self:AddChild(Text(NUMBERFONT, 28))    self.mininum:SetHAlign(ANCHOR_MIDDLE)    self.mininum:SetPosition(3, -0.5, 0)	self.mininum:SetScale(1,.8,1)		local scale = .81	self.bg = self:AddChild(Image(STATUS_ATLAS, "bar_bg.tex"))	self.bg:SetPosition(0,0,0)	self.bg:SetScale(.815,.860,0)	self.br = self:AddChild(Image(STATUS_ATLAS, "bar.tex"))	self.br:SetPosition(-(149.5)*scale,0,0)	self.br:SetHRegPoint(ANCHOR_LEFT)	self.br:SetTint(85/255, 119/255, 65/255, 1)		self.num = self:AddChild(Text(NUMBERFONT, 28))	self.num:SetPosition(3.5,-.5,0)	self.num:SetScale(1.5,1.2,0)		self.anim = self:AddChild(UIAnim())	self.anim:GetAnimState():PlayAnimation("anim")    self.underNumber = self:AddChild(Widget("undernumber"))	end)function Badge:SetPercent(val, max)    val = val or self.percent    max = max or 100	local scale = .81	self.br:SetScale(val*scale,scale,0)		self.num:SetString(tostring(math.ceil(val*max)).."/"..tostring(math.ceil(max)))    self.percent = valend-- Naughtyfunction Badge:SetNaughty(val, max)	self.mininum:SetString(tostring(val).."/"..tostring(max))	self.bg:Kill()	self.br:Kill()	self.num:Kill()end--Tempfunction Badge:SetTemperature(val)	self.mininum:SetString(tostring(math.ceil(val)).."\176C")	self.bg:Kill()	self.br:Kill()	self.num:Kill()endfunction Badge:OnGainFocus()endfunction Badge:OnLoseFocus()endfunction Badge:PulseGreen()endfunction Badge:PulseRed()endfunction Badge:StopWarning()endfunction Badge:StartWarning()endreturn Badge

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...