bugFreeciv - Bugs: bug #21668, Ferry stats not updated when unit...

 
 
Show feedback again

bug #21668: Ferry stats not updated when unit changes type

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Mon 17 Feb 2014 11:54:10 PM UTC  
 
Category: aiSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 25 Feb 2014 05:09:57 AM UTC, SVN revision 24551:

Added unit_transformed(unit, old_type) AI callback. Default AI updates
ferry stats in that callback.

See bug #21668

(Browse SVN revision 24551)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 25 Feb 2014 05:09:40 AM UTC, SVN revision 24550:

Added unit_transformed(unit, old_type) AI callback. Default AI updates
ferry stats in that callback.

See bug #21668

(Browse SVN revision 24550)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 22 Feb 2014 08:05:27 AM UTC, comment #4:

- Version to apply to S2_5 is different now

(file #20140)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 22 Feb 2014 07:57:28 AM UTC, comment #3:

- Updated against svn HEAD

(file #20139)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 19 Feb 2014 06:25:56 PM UTC, comment #2:

While it's nice to have ferry stats correct and not nagging, they are primarily just an debugging tool. But usually the same bug that causes ferry stats to go off has some more serious consequences too. In the case I were debugging the bug turned out to be that former Caravel and potential cargo wasted many turns still heading towards rendezvous point after former had been upgraded to Ironclad.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 18 Feb 2014 04:35:07 AM UTC, comment #1:

- Be sure to clear both passenger and ferry if unit transformed from ferry to not-ferry had passenger assigned
- Update ai module capstr

(file #20100)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 17 Feb 2014 11:54:10 PM UTC, original submission:

AI ferry stats are not updated if unit is upgraded or converted such a way that its dai_is_ferry() status changes.

Fix attached.
- Introduce unit_transformed(punit, old_type) AI type callback
- Default AI updates ferry stats in that callback

Too intrusive for S2_4 (ferry stats will not be completely fixed there)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20139:  FerryTransformed-3.patch added by cazfi (8kB - text/x-diff)
file #20100:  FerryTransformed-2.patch added by cazfi (7kB - text/x-diff)
file #20093:  FerryTransformed.patch added by cazfi (7kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 25 Feb 2014 05:10:09 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sat 22 Feb 2014 08:05:27 AM UTCcazfiAttached File-=>Added FerryTransformed-S2_5-3.patch, #20140
    Sat 22 Feb 2014 07:57:28 AM UTCcazfiAttached File-=>Added FerryTransformed-3.patch, #20139
    Tue 18 Feb 2014 04:35:07 AM UTCcazfiAttached File-=>Added FerryTransformed-2.patch, #20100
    Mon 17 Feb 2014 11:54:10 PM UTCcazfiAttached File-=>Added FerryTransformed.patch, #20093
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup