News:

SimuTranslator
Make Simutrans speak your language.

r11737: Cursors always use the first player color

Started by Nazalassa, August 10, 2025, 08:55:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nazalassa

When a tool is selected, its cursor is drawn on the map. If the cursor has player color on it, we would expect it to be of the right player color. However, it is not.

Steps to reproduce:
  • Open a world, switch to a non-default player with a player color much different than that of the first player (i.e human player).
  • Select a tool which cursor has player color on it (e.g marker tool) and observe the cursor.

Expected results:
The player color parts on the cursor should be of the active player's player color.

Observed results:
The player color parts on the cursor are always of the first player's color (i.e human player).

Attached is a patch that fixes this by setting the cursor's owner when the active player changes. (Previously the cursor was ownerless.)


P.S: is it correct to submit a bug report here when I have a patch, or should I rather put it in another subforum (e.g Patches & Projects)?
Making paksets since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

ceeac

Thanks, incorporated in r11744.

Quote from: Nazalassa on August 10, 2025, 08:55:41 AMP.S: is it correct to submit a bug report here when I have a patch, or should I rather put it in another subforum (e.g Patches & Projects)?
IMO if there is a patch, it is better to post directly in Patches so the patch does not get lost, but for small one-line patches like this one it does not matter much, I guess.