Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] handle_unit_attack_request
Home

[Freeciv-Dev] handle_unit_attack_request

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] handle_unit_attack_request
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 4 Jun 2000 00:31:07 +0000 (GMT)

If one player does not respect a cease-fire or a pact, civserver
will abort ? I've got the feeling some lines are missing and other lines
have to be deleted.

  if (players_non_attack(punit->owner, pdefender->owner)) {
    freelog(LOG_FATAL,
            "Trying to attack a unit with which you have peace or
cease-fire at
%i, %i",
            def_x, def_y);
    abort();
  }

  if (players_allied(punit->owner, pdefender->owner)
      && !(unit_flag(punit->type, F_NUCLEAR) && punit == pdefender)) {
    freelog(LOG_FATAL,
            "Trying to attack a unit with which you have allience at %i,
%i",
            def_x, def_y);
    abort();
  }

Bye,





[Prev in Thread] Current Thread [Next in Thread]