Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] (PR#14341) server crash with ai, darwin and A_UNSET
Home

[Freeciv-Dev] (PR#14341) server crash with ai, darwin and A_UNSET

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#14341) server crash with ai, darwin and A_UNSET
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Sun, 16 Oct 2005 00:25:55 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14341 >

> [mstefek - Sun Oct 16 07:14:19 2005]:
> 
> > [jdorje - Sat Oct 15 17:44:22 2005]:
> Patches attached.
These are better.
--
mateusz
Index: ai/aicity.c
===================================================================
--- ai/aicity.c (wersja 11128)
+++ ai/aicity.c (kopia robocza)
@@ -333,10 +333,9 @@
            }
            break;
          case EFT_GIVE_IMM_TECH:
-           v += ((total_bulbs_required(pplayer) * amount 
-                 + game.researchcost)
-               * TRADE_WEIGHTING - pplayer->research.bulbs_researched 
-               * TRADE_WEIGHTING) / MORT;
+           if (!ai_wants_no_science(pplayer)) {
+             v += amount * (game.researchcost + 1);
+           }
            break;
          case EFT_HAVE_EMBASSIES:
            v += 5 * nplayers;
Index: ai/aicity.c
===================================================================
--- ai/aicity.c (wersja 11144)
+++ ai/aicity.c (kopia robocza)
@@ -485,10 +485,9 @@
          }
          break;
        case EFT_GIVE_IMM_TECH:
-         v += ((total_bulbs_required(pplayer) * amount)
-             * TRADE_WEIGHTING - 
-               get_player_research(pplayer)->bulbs_researched 
-               * TRADE_WEIGHTING) / MORT;
+         if (!ai_wants_no_science(pplayer)) {
+           v += amount * (game.researchcost + 1);
+          }
          break;
        case EFT_HAVE_EMBASSIES:
          v += 5 * nplayers;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#14341) server crash with ai, darwin and A_UNSET, Mateusz Stefek <=