File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,9 +57,10 @@ function widget:Update()
5757 return
5858 end
5959
60- lobby .bufferCommandsEnabled = false
6160 local repetitions = 1
62- while repetitions <= CMD_PER_UPDATE and lobby :ProcessBuffer () do
61+ local startTime = Spring .GetTimer ()
62+ while Spring .DiffTimers (Spring .GetTimer (), startTime ) < 0.05 and repetitions <= CMD_PER_UPDATE and lobby :ProcessBuffer () do
6363 repetitions = repetitions + 1
6464 end
65+ lobby .bufferCommandsEnabled = lobby .commandsInBuffer and (lobby .commandsInBuffer > 0 )
6566end
Original file line number Diff line number Diff line change @@ -94,8 +94,12 @@ function Interface:ProcessBuffer()
9494 self .bufferExecutionPos = self .bufferExecutionPos + 1
9595 local command = self .commandBuffer [self .bufferExecutionPos ]
9696 if not self .commandBuffer [self .bufferExecutionPos + 1 ] then
97+ -- Reset buffer pointers because external widgets read (self.commandsInBuffer > 0)
98+ -- to set self.bufferCommandsEnabled.
9799 self :CommandReceived (command )
98100 self .commandBuffer = false
101+ self .commandsInBuffer = 0
102+ self .bufferExecutionPos = 0
99103 return false
100104 end
101105 self :CommandReceived (command )
You can’t perform that action at this time.
0 commit comments