Opened 9 years ago

Closed 9 years ago

#500 closed defect (fixed)

Changing game speed only shows highest/lowest speed when changing direction

Reported by: Jalmari Ikävalko Owned by:
Priority: trivial Milestone:
Component: BAR Version:
Keywords: Cc:

Description

When increasing game speed, the maximum showed speed is 2.8. When then decreasing game speed once, it shows 3.0. Same also happens when starting to decrease, i.e. it goes to 0.4, then when increasing game speed it shows 0.3.

Also seems to occasionally not show/skip steps.

Should be reproductable in any game.

Change History (4)

comment:1 by Jalmari Ikävalko, 9 years ago

Going to see if I get this right away.

comment:2 by Jalmari Ikävalko, 9 years ago

Actually a little more general bug. Appending text to console seems to lag behind if it's full. When it starts to clear messages, the "missing" text becomes visible; i.e. it'd seem the buffer for it is larger by 1 line than what it can actually show.

comment:3 by Jalmari Ikävalko, 9 years ago

Okay. I just spend 4 hours on this. Went through close to 10 script files, googled around, checked documentations, printed a ton of debug data, tried to change numbers there and here and - obviously, the fix was swapping 2 lines around.

lua/chili_funks_console.lua:

local function updateMsgWindow()
	local text = ''
	
	for i=1, curMsgNum do
		local msg = messages[#messages-curMsgNum+i]
		if msg then text = text..msg.text..'\n' end
	end
	
	local font = textBox.font
	local wText, lines = font:WrapText(text, msgWidth, 500)
	print ("Text: " .. text)

	textBox:SetText(text)
	msgWindow:Resize(msgWidth, font.size * (lines-1) + 10) 
end

Those two last lines before the 'end'.

comment:4 by beherith, 9 years ago

Resolution: fixed
Status: newclosed

fixed [1854]

Note: See TracTickets for help on using tickets.