[Freeciv-Dev] (PR#12294) tech bug in S2
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12294 >
> [chrisk - Fri Feb 18 22:15:45 2005]:
>
>
> CVS 18 FEB 2005 GTK2 S2
>
> Using *tech* default server options, I find a tech (not being
researched) in
> a hut.
>
> After that, I'm able to change current tech without loosing bulbs.
I believe this patch should fix it (untested).
However I'm sure there are other problems. For instance if you are
researching tech A, change to tech B, then are given tech C, then switch
back to tech A you will have lost your bulbs. At first I thought we
shouldn't reset changed_from in this case, but that doesn't work either.
I think the best solution is one I suggested a while ago: don't reset
changed_from at all, but instead subtract bulbs off from
bulbs_researched_before when techs are researched.
-jason
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.384
diff -u -r1.384 plrhand.c
--- server/plrhand.c 7 Jun 2005 06:20:06 -0000 1.384
+++ server/plrhand.c 8 Jun 2005 05:11:49 -0000
@@ -295,7 +295,9 @@
|| tech_found == A_FUTURE);
assert(tech_is_available(plr, tech_found) || tech_found == A_FUTURE);
- plr->research->got_tech = TRUE;
+ if (tech_found == plr->research->researching) {
+ plr->research->got_tech = TRUE;
+ }
plr->research->changed_from = -1;
plr->research->techs_researched++;
was_first = (game.info.global_advances[tech_found] == 0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12294) tech bug in S2,
Jason Short <=
|
|