Avoid mixing up droid orders during lag.

Droid were sorted (in order to better compress net data) and queued, each game tick.
During lag, multiple build orders could be queued, and executed in an unintended order
due to being sorted. Queueing droid orders immediately after processing user input
should fix this, while maintaining net data size efficiency.
master
Cyp 2012-03-26 13:16:27 +02:00
parent 556bbc011b
commit 83f7adecc9
1 changed files with 2 additions and 0 deletions

View File

@ -160,6 +160,8 @@ static GAMECODE renderLoop()
if (!rotActive && getWidgetsStatus() && dragBox3D.status != DRAG_DRAGGING && wallDrag.status != DRAG_DRAGGING)
{
intRetVal = intRunWidgets();
// Send droid orders, if any. (Should do between intRunWidgets() calls, to avoid droid orders getting mixed up, in the case of multiple orders given while the game freezes due to net lag.)
sendQueuedDroidInfo();
}
//don't process the object lists if paused or about to quit to the front end