~ubuntu-branches/debian/squeeze/freeciv/squeeze

« back to all changes in this revision

Viewing changes to common/diptreaty.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2010-02-23 22:09:02 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100223220902-kiyrmr9i4152cka5
Tags: 2.2.0-1
[ Karl Goetz ]
* Remove civserver files in /etc/ggzd/ (Closes: 523772, 517787)
* Adding ${misc:Depends} to all binary packages (lintian warnings)

[ Clint Adams ]
* New upstream version.
  - Drop data_dsc_use_bindir.diff (binary pathnames have changed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
{
32
32
  return  (game.info.diplomacy == 0      /* Unlimited diplomacy */
33
33
           || (game.info.diplomacy == 1  /* Human diplomacy only */
34
 
               && !pplayer->ai.control 
35
 
               && !aplayer->ai.control)
 
34
               && !pplayer->ai_data.control 
 
35
               && !aplayer->ai_data.control)
36
36
           || (game.info.diplomacy == 2  /* AI diplomacy only */
37
 
               && pplayer->ai.control
38
 
               && aplayer->ai.control)
 
37
               && pplayer->ai_data.control
 
38
               && aplayer->ai_data.control)
39
39
           || (game.info.diplomacy == 3  /* Team diplomacy only */
40
40
               && players_on_same_team(pplayer, aplayer)));
41
41
}
91
91
  clause_list_iterate(ptreaty->clauses, pclause) {
92
92
    free(pclause);
93
93
  } clause_list_iterate_end;
94
 
  clause_list_unlink_all(ptreaty->clauses);
95
94
  clause_list_free(ptreaty->clauses);
96
95
}
97
96
 
135
134
    return FALSE;
136
135
  }
137
136
 
138
 
  if (type == CLAUSE_ADVANCE && !tech_exists(val)) {
 
137
  if (type == CLAUSE_ADVANCE && !valid_advance_by_number(val)) {
139
138
    freelog(LOG_ERROR, "Illegal tech value %i in clause.", val);
140
139
    return FALSE;
141
140
  }
153
152
    return FALSE;
154
153
  }
155
154
 
156
 
  /* Don't use player_has_embassy() here, because it also checks for the
157
 
   * embassy effect, and we should always be able to make an embassy. */
158
 
  if (type == CLAUSE_EMBASSY
159
 
      && BV_ISSET(pto->embassy, player_index(pfrom))) {
 
155
  if (type == CLAUSE_EMBASSY && player_has_real_embassy(pto, pfrom)) {
160
156
    /* we already have embassy */
161
157
    freelog(LOG_ERROR,
162
158
            "Illegal embassy clause: %s already have embassy with %s.",