[Freeciv-Dev] (PR#13361) AI Reactions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13361 >
> [per - Tue Jun 28 10:26:41 2005]:
>
> This patch adds AI reactions to certain player actions:
> * Diplomat incidents
> * Declarations of war
> * Nuclear explosions
>
> - Per
>
case CLAUSE_PEACE:
pgiver->diplstates[pdest->player_no].type=DS_PEACE;
pdest->diplstates[pgiver->player_no].type=DS_PEACE;
+ pgiver->diplstates[pdest->player_no].max_state =
+ MAX(DS_PEACE, pgiver->diplstates[pdest->player_no].max_state);
+ pdest->diplstates[pgiver->player_no].max_state =
+ MAX(DS_PEACE, pdest->diplstates[pgiver->player_no].max_state);
notify_player_ex(pgiver, NULL, E_TREATY_PEACE,
_("You agree on a peace treaty with %s."),
pdest->name);
@@ -444,6 +448,10 @@
case CLAUSE_ALLIANCE:
pgiver->diplstates[pdest->player_no].type=DS_ALLIANCE;
pdest->diplstates[pgiver->player_no].type=DS_ALLIANCE;
+ pgiver->diplstates[pdest->player_no].max_state =
+ MAX(DS_PEACE, pgiver->diplstates[pdest->player_no].max_state);
+ pdest->diplstates[pgiver->player_no].max_state =
+ MAX(DS_PEACE, pdest->diplstates[pgiver->player_no].max_state);
notify_player_ex(pgiver, NULL, E_TREATY_ALLIANCE,
_("You agree on an alliance with %s."),
This looks like copy and paste mistake.
Also max_state isn't saved or loaded.
--
mateusz
|
|