unreported: units that have left a ship and entered another unit will take the left_ship status with them so they can't leave the region.

This commit is contained in:
Enno Rehling 2006-06-05 17:58:51 +00:00
parent 6b835e9b82
commit 9bd06d5b60
1 changed files with 5 additions and 2 deletions

View File

@ -781,8 +781,9 @@ transfermen(unit * u, unit * u2, int n)
if (u2) { if (u2) {
skill *sv, *sn; skill *sv, *sn;
skill_t sk; skill_t sk;
assert(u2->number+n>0); ship * sh;
assert(u2->number+n>0);
if (demonfix && u2->race==new_race[RC_DAEMON]) fset(u2, UFL_DEBUG); if (demonfix && u2->race==new_race[RC_DAEMON]) fset(u2, UFL_DEBUG);
for (sk=0; sk!=MAXSKILLS; ++sk) { for (sk=0; sk!=MAXSKILLS; ++sk) {
@ -834,7 +835,9 @@ transfermen(unit * u, unit * u2, int n)
if (olde->value) change_effect(u2, olde->type, olde->value); if (olde->value) change_effect(u2, olde->type, olde->value);
a = a->next; a = a->next;
} }
if (fval(u, UFL_LONGACTION)) fset(u2, UFL_LONGACTION); sh = leftship(u);
if (sh!=NULL) set_leftship(u2, sh);
u2->flags |= u->flags&(UFL_LONGACTION|UFL_NOTMOVING|UFL_HUNGER|UFL_MOVED|UFL_ENTER);
if (u->attribs) { if (u->attribs) {
transfer_curse(u, u2, n); transfer_curse(u, u2, n);
} }