[Freeciv-tickets] [freeciv] #44179: PLAYER_DEFAULT_SCIENCE_RATE=100 leaks into game start in govs not allowing it

Zurück zum Archiv-Index
OSDN Ticket System norep****@osdn*****
Sat Mar 26 07:23:01 JST 2022


#44179: PLAYER_DEFAULT_SCIENCE_RATE=100 leaks into game start in govs not allowing it

  Open Date: 2022-03-25 06:18
Last Update: 2022-03-26 07:23

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44179
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44179

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-03-26 07:23 Updated by: Anonymous

Comment:

Update...
Now I'm really confused.
attach_longturn_player() has this hard-coded right into the end of the function:
// default tax rates
pplayer->economic.science = 60;
pplayer->economic.tax = 40;
So, yeah, I'm confused. I can only guess that get_player_maxrate() returns 100 at some other point later, and something about the multiplayer context of people joining at different stages in the game (before it starts, when it starts, after it starts, and being assigned by an admin to be in the game before they ever really connected to the game) -- that somehow in one or some of these cases, something is falling between the cracks.
It might have to do with the admin setting up the unassigned players with the right username before they ever attach, so it circumvents the usual checks?
I will do the player_set_under_human_control() as you suggest, but now I'm sceptical that this fixes the bug since it's hard-coded to change it to 60/40. Also that function won't do it if the flag for it being a new game is on (but once again shouldn't matter because it's hard-coded to 60/40 later.) 


---------------------------------------------------------------------
Ticket Status:

      Reporter: lexxie9952
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

This happened in a Team-Game where the GM/admin did a custom setup because of filling the game with players registering for it into teams.
The GM selected a scenario map with x number of players in their starting positions, as unassigned players. As the sign-ups for the teams were filled, the GM manually converted the unassigned players into usernames of humans, so that they'd take over that nation on first login. Then the players, in Despotism, inherited a science rate of 100% -- which was never checked nor caught by the server. They were able to keep this rate for multiple turns until the bug was discovered.
At FCW, for now we just did a solution but not true bug fix. We changed PLAYER_DEFAULT_SCIENCE_RATE to 60 and PLAYER_DEFAULT_TAX_RATE to 40 (which it should probably be regardless.)  
However, it's conceivable in some rulesets that those rates would still be illegal in a starting government and thus this bug would still remain.


-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44179
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44179



More information about the Freeciv-tickets mailing list
Zurück zum Archiv-Index