Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] Paratroopers problem
Home

[Freeciv-Dev] Paratroopers problem

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Paratroopers problem
From: Christian Knoke <chrisk@xxxxxxxxx>
Date: Sat, 10 Jul 2004 22:09:56 +0200

Hi,

server/unittools.c:2200

/**************************************************************************
  Returns whether the drop was made or not. Note that it also returns 1 
  in the case where the drop was succesful, but the unit was killed by
  barbarians in a hut.
**************************************************************************/
bool do_paradrop(struct unit *punit, int dest_x, int dest_y)
{
  struct tile *ptile = map_get_tile(dest_x, dest_y);
  struct player *pplayer = unit_owner(punit);

  if (!unit_flag(punit, F_PARATROOPERS)) {
    notify_player_ex(pplayer, punit->x, punit->y, E_NOEVENT,
                     _("Game: This unit type can not be paradropped."));
    return FALSE;
  }

  if (!can_unit_paradrop(punit)) {
    return FALSE;
  }

  if (get_transporter_occupancy(punit) > 0) {
    notify_player_ex(pplayer, punit->x, punit->y, E_NOEVENT,
                     _("Game: You cannot paradrop a transporter unit."));
  }

What does this message mean, is it correct? "transported unit"? Why?

A paratrooper cannot transport anything. A paratrooper needs to be inside a
city in order to paradrop.

Also,  return FALSE; missing?

Christian

-- 
Christian Knoke            * * *            http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.


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