bugBattle for Wesnoth - Bugs: bug #18829, ai sides show up as...

 
 
Show feedback again

bug #18829: ai sides show up as "controller=network" on remote clients

Submitted by:  Anonymissimus <anonymissimus>
Submitted on:  Thu 20 Oct 2011 06:23:53 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: Ready For TestPrivacy: Public
Assigned to: Chris Beck <involution>Open/Closed: Open
Release: trunk r51547 Operating System: win xp

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 17 Mar 2014 01:26:39 PM UTC, comment #2:

Proposed Fix is here:

https://github.com/wesnoth/wesnoth/commit/736ceaa6c7e81882c9c5b2e932307b1f1ecb3bfd

Also see subsequent commits
https://github.com/wesnoth/wesnoth/commit/b854aab437f157eea642131b882a4987a95c5b6b

https://github.com/wesnoth/wesnoth/commit/2430b491df804700aecc4a43eab3aac3c2a17d56

which make other parts of the code base behave as well with "network_ai" as they do with "ai".

At this point, controller type "ai" should only be used in the level code for the start of a scenario. It should be translated, in play_campaign.cpp, into either "human_ai" or "network_ai", and whenever controller types change in scenario, the server will inform the clients either of "human_ai" or "network_ai".

Going forward if you see controller type "ai" at any point during an mp game, I consider that a bug, please report it.

Chris Beck <involution>
Project MemberIn charge of this item.
Sun 23 Oct 2011 12:49:53 PM UTC, comment #1:

Grmbl. So here's a how-to-reproduce without debug mode. Insert the code below into a mp scenario (used Isars Cross), start a networked mp game with side1=human+host, side2=human+client, side3=ai set by host, and then save from the 2 human clients (naming the saves differently so they don't overwrite each other).
Open and look at the values of the variable "controller".

Anonymissimus <anonymissimus>
Project Member
Thu 20 Oct 2011 06:23:53 PM UTC, original submission:

In a mp game on the server with 2 human players and 1 ai, for player 1's (human, host) BfW instance:
side[1].controller -> "human"
side[2].controller -> "network"
side[3].controller -> "ai"

But for player 2's (human but no host) BfW instance:
side[1].controller -> "network"
side[2].controller -> "human"
side[3].controller -> "network"

This can be reproduced by starting wesnoth with --debug and using the command line
lua wesnoth.message(wesnoth.sides[3].controller)
(and similar) since this code is then only executed on the client which types it.
I suppose that this is a bug since
-the enumeration CONTROLLER in team.hpp offers a value NETWORK_AI and it has references at many places in the codebase, all the other values of that enum are used.
-I remember some similar talk on irc.
So sides which are "ai" on the host should show up as "network_ai" on remote clients.
I remember this bug to exist for as long as I can think back.

Anonymissimus <anonymissimus>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by anonymissimus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 17 Mar 2014 01:26:39 PM UTCinvolutionStatusNone=>Ready For Test
      Assigned toNone=>involution
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup