Bug #1693 » 1693.v2.patch
server/advisors/advgoto.c | ||
---|---|---|
enum unit_activity activity = punit->activity;
|
||
struct extra_type *tgt = punit->activity_target;
|
||
bool alive;
|
||
int unit_id = punit->id;
|
||
if (punit->moves_left <= 0) {
|
||
return TRUE;
|
||
... | ... | |
punit->goto_tile = ptile;
|
||
unit_activity_handling(punit, ACTIVITY_GOTO, ACTION_NONE);
|
||
alive = adv_unit_execute_path(punit, path);
|
||
alive = adv_unit_execute_path(punit, path) && unit_is_alive(unit_id);
|
||
if (alive) {
|
||
if (activity != ACTIVITY_GOTO) {
|
server/unithand.c | ||
---|---|---|
punit->moved = TRUE; /* We moved */
|
||
/* Now that dead defender is certainly no longer listed as unit
|
||
* supported by the city, we may even remove the city
|
||
* (if it shrinks from size 1) */
|
||
pcity = tile_city(def_tile);
|
||
if (pcity != nullptr) {
|
||
unit_attack_civilian_casualties(punit, pcity, paction, "attack");
|
||
}
|
||
if (paction->result == ACTRES_COLLECT_RANSOM) {
|
||
collect_ransom(pwinner, ploser,
|
||
vet && !utype_is_consumed_by_action(paction, punit->utype));
|
||
... | ... | |
vet && !utype_is_consumed_by_action(paction, punit->utype));
|
||
}
|
||
/* Now that dead defender is certainly no longer listed as unit
|
||
* supported by the city, we may even remove the city
|
||
* (if it shrinks from size 1) */
|
||
pcity = tile_city(def_tile);
|
||
if (pcity != nullptr) {
|
||
unit_attack_civilian_casualties(punit, pcity, paction, "attack");
|
||
}
|
||
if (unit_is_alive(winner_id)) {
|
||
if (utype_is_consumed_by_action(paction, pwinner->utype)) {
|
||
return TRUE;
|
server/unittools.c | ||
---|---|---|
}
|
||
} unit_move_data_list_iterate_end;
|
||
unit_lives = (pdata->punit == punit);
|
||
unit_lives = (unit_is_alive(saved_id) && pdata->punit == punit);
|
||
/* Wakeup units and make contact. */
|
||
if (unit_lives) {
|
||
... | ... | |
refresh_dumb_city(pdestcity);
|
||
}
|
||
unit_lives = unit_is_alive(saved_id);
|
||
if (unit_lives) {
|
||
/* Let the scripts run ... */
|
||
script_server_signal_emit("unit_moved", punit, psrctile, pdesttile);
|
||
unit_lives = unit_is_alive(saved_id);
|
||
}
|
||
}
|
||
if (unit_lives) {
|
||
/* Autoattack. */
|
||
unit_lives = unit_survive_autoattack(punit);
|
||
unit_lives = unit_survive_autoattack(punit) && unit_is_alive(saved_id);
|
||
}
|
||
if (unit_lives && (enter_hut || frighten_hut)) {
|
- « Previous
- 1
- 2
- Next »