Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
470 stars 75 forks source link

Fix fisher not getting the fish he caught #1675

Closed Flamefire closed 2 weeks ago

Flamefire commented 2 weeks ago

The code triggers an assertion when 2 fishers try to get the last fish from the same spot because only the first can get it. So remove the fish when starting to fish such that it is already unavailable when the 2nd starts fishing.

Fixes https://github.com/Return-To-The-Roots/s25client/issues/1674

Also a fix for some tests crashing depending on the order they are executed. (TextControlWorks & TableSorting due to glFont, the other due to the guiScale change)

Flamefire commented 2 weeks ago

This unfortunately breaks replays as it seems to happen quite often that 2 fishers fish on the exact some spot and with this change the probability changes in a few of those cases. Hence we need to regenerate them or CI will keep failing --> #1676 (WIP)