Follow-up Comment #3, bug #16100 (project freeciv):

Looking the code there seems to be at least one problem in what happens if
client requests pillage when there is nothing to pillage (client out-of-sync
or client modified to crash server on purpose)

unit_activity_handling_targeted() calls unit_activity_assign_target(), which
sets *activity to ACTIVITY_IDLE if there's nothing to pillage. But then
unit_activity_handling_targeted() continues by calling
set_unit_activity_targeted() to set activity to ACTIVITY_PILLAGE.

Shouldn't unit_activity_assign_target() return boolean instead of void to
tell if it was successful or not? unit_activity_handling_targeted() could use
that information to decide if it should continue setting activity or not.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16100>

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


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to