Follow-up Comment #16, patch #5306 (project freeciv):

Why "WIN_" in event the names? Suggestions: E_UNIT_WAS_EXPELLED
E_UNIT_DID_EXPEL

_I've updated do_expel_unit, but I need help because it's very difficult and I
don't understand (only unithand.c)._
Not sure what you mean here. If you want me to explain I need to know
specifically what you want me to explain. Or did you ask me to finish
do_expel_unit() for you?

+  pcity = find_closest_city(expeller_tile, NULL, unit_owner(actor), FALSE,
+                              FALSE, FALSE, TRUE, FALSE, NULL);
Could return NULL if no city is found. NULL -> crash. You should check for
NULL and handle it. Aborting is an OK way of handling it.
Looks like you are trying to find the city a diplomat would escape to. But you
do it for the actor player, not the target player.

Don't add diplomat_escape_full. The actor doesn't escape. No need. He just
expelled someone.

E_UNIT_WIN_EXPEL is used in both messages.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?5306>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to