[Freeciv-Dev] (PR#12661) Science handicap should be sent to the client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#12661) Science handicap should be sent to the client |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Sat, 26 Mar 2005 02:47:06 -0800 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12661 >
With the attached patch the ai science handicap is sent to the client.
--
mateusz
? aicity.c
? shared.c
? data/ft
? po/pl.back
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.482
diff -u -r1.482 packhand.c
--- client/packhand.c 26 Mar 2005 05:59:13 -0000 1.482
+++ client/packhand.c 26 Mar 2005 10:44:58 -0000
@@ -1503,6 +1503,8 @@
for (i = 0; i < B_LAST/*game.num_impr_types*/; i++) {
pplayer->small_wonders[i] = pinfo->small_wonders[i];
}
+
+ pplayer->ai.science_cost = pinfo->science_cost;
/* If the server sends out player information at the wrong time, it is
* likely to give us inconsistent player tech information, causing a
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.101
diff -u -r1.101 packets.def
--- common/packets.def 26 Mar 2005 05:59:14 -0000 1.101
+++ common/packets.def 26 Mar 2005 10:44:58 -0000
@@ -573,6 +573,7 @@
UINT32 bulbs_researched;
UINT32 techs_researched;
UINT8 researching;
+ UINT16 science_cost;
UINT16 future_tech;
UINT8 tech_goal;
Index: common/tech.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v
retrieving revision 1.84
diff -u -r1.84 tech.c
--- common/tech.c 18 Mar 2005 11:26:24 -0000 1.84
+++ common/tech.c 26 Mar 2005 10:44:58 -0000
@@ -472,9 +472,7 @@
* can also be adpoted to create an extra-hard AI skill level where the AI
* gets science benefits */
- /* FIXME: the is_server is a kludge to unbreak CVS. GB promises
- * to fix correctly a.s.a.p. 2003/5/18 -mck */
- if (is_server && pplayer->ai.control) {
+ if (pplayer->ai.control) {
assert(pplayer->ai.science_cost > 0);
cost = (cost * pplayer->ai.science_cost) / 100;
}
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.361
diff -u -r1.361 plrhand.c
--- server/plrhand.c 18 Mar 2005 11:26:24 -0000 1.361
+++ server/plrhand.c 26 Mar 2005 10:45:04 -0000
@@ -1459,6 +1459,7 @@
for (i = 0; i < B_LAST /*game.num_impr_types */ ; i++) {
packet->small_wonders[i] = plr->small_wonders[i];
}
+ packet->science_cost = plr->ai.science_cost;
}
/**************************************************************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12661) Science handicap should be sent to the client,
Mateusz Stefek <=
|
|