Bug #1693 » 1693.v3.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);
|
||
|
fc_assert_ret_val_msg(alive == unit_is_alive(unit_id), FALSE,
|
||
|
"bad adv_unit_execute_path(), " \
|
||
|
"please report saved game to: %s",
|
||
|
BUG_URL);
|
||
|
if (alive) {
|
||
|
if (activity != ACTIVITY_GOTO) {
|
||
| server/unithand.c | ||
|---|---|---|
|
const struct unit_type *act_utype = unit_type_get(punit);
|
||
|
struct civ_map *nmap = &(wld.map);
|
||
|
bool powerless;
|
||
|
int unit_id = punit->id;
|
||
|
if (!(pdefender = get_defender(nmap, punit, def_tile, paction))) {
|
||
|
/* Can't fight air... */
|
||
| ... | ... | |
|
* (if it shrinks from size 1) */
|
||
|
pcity = tile_city(def_tile);
|
||
|
if (pcity != nullptr) {
|
||
|
fc_assert_ret_val_msg(unit_is_alive(unit_id), FALSE,
|
||
|
"unexpected dead unit, " \
|
||
|
"please report saved game to: %s", BUG_URL);
|
||
|
unit_attack_civilian_casualties(punit, pcity, paction, "attack");
|
||
|
}
|
||
|
if (unit_is_alive(winner_id)) {
|
||
| server/unittools.c | ||
|---|---|---|
|
} unit_move_data_list_iterate_end;
|
||
|
unit_lives = (pdata->punit == punit);
|
||
|
fc_assert_msg(unit_lives == unit_is_alive(saved_id),
|
||
|
"Schrödinger's unit is both dead and alive -- " \
|
||
|
"please report saved game to: %s", BUG_URL);
|
||
|
/* Wakeup units and make contact. */
|
||
|
if (unit_lives) {
|
||
| ... | ... | |
|
unit_make_contact(nullptr, pdesttile, pplayer);
|
||
|
}
|
||
|
fc_assert_msg(unit_lives == unit_is_alive(saved_id),
|
||
|
"Schrödinger's unit is both dead and alive -- " \
|
||
|
"please report saved game to: %s", BUG_URL);
|
||
|
if (unit_lives) {
|
||
|
/* Special checks for ground units in the ocean. */
|
||
|
if (embark_to || !can_unit_survive_at_tile(&(wld.map), punit, pdesttile)) {
|
||
| ... | ... | |
|
refresh_dumb_city(pdestcity);
|
||
|
}
|
||
|
fc_assert_msg(unit_lives == unit_is_alive(saved_id),
|
||
|
"Schrödinger's unit is both dead and alive -- " \
|
||
|
"please report saved game to: %s", BUG_URL);
|
||
|
if (unit_lives) {
|
||
|
/* Let the scripts run ... */
|
||
|
script_server_signal_emit("unit_moved", punit, psrctile, pdesttile);
|
||
| ... | ... | |
|
unit_lives = unit_survive_autoattack(punit);
|
||
|
}
|
||
|
fc_assert_msg(unit_lives == unit_is_alive(saved_id),
|
||
|
"Schrödinger's unit is both dead and alive -- " \
|
||
|
"please report saved game to: %s", BUG_URL);
|
||
|
if (unit_lives && (enter_hut || frighten_hut)) {
|
||
|
/* Is there a hut? */
|
||
|
unit_enter_hut(punit, frighten_hut);
|
||
- « Previous
- 1
- 2
- 3
- 4
- Next »