forked from github/server
das sieht garnicht schlecht aus...
This commit is contained in:
parent
9ef7e473d8
commit
321c85c274
|
@ -489,12 +489,12 @@ leave_trail(unit * u, region * from, region_list *route)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
travel_route(const unit * u, region_list * route)
|
travel_route(const unit * u, region * r, region_list * route)
|
||||||
{
|
{
|
||||||
/* kein travelthru in der letzten region! */
|
/* kein travelthru in der letzten region! */
|
||||||
while (route && route->next) {
|
while (route) {
|
||||||
region * r = route->data;
|
|
||||||
travelthru(u, r);
|
travelthru(u, r);
|
||||||
|
r = route->data;
|
||||||
route = route->next;
|
route = route->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -520,7 +520,7 @@ move_ship(ship * sh, region * from, region * to, region_list * route)
|
||||||
leave_trail(u, from, route);
|
leave_trail(u, from, route);
|
||||||
trail = true;
|
trail = true;
|
||||||
}
|
}
|
||||||
if (route!=NULL) travel_route(u, route);
|
if (route!=NULL) travel_route(u, from, route);
|
||||||
if (from!=to) {
|
if (from!=to) {
|
||||||
u->ship = NULL; /* damit move_unit() kein leave() macht */
|
u->ship = NULL; /* damit move_unit() kein leave() macht */
|
||||||
move_unit(u, to, ulist);
|
move_unit(u, to, ulist);
|
||||||
|
@ -1204,20 +1204,24 @@ travel(unit * u, region * next, int flucht, region_list ** routep)
|
||||||
|
|
||||||
m--;
|
m--;
|
||||||
if (m > 0) {
|
if (m > 0) {
|
||||||
region_list *rlist;
|
region_list *rlist = route;
|
||||||
|
|
||||||
travelthru(u, first);
|
travelthru(u, first);
|
||||||
for (rlist = route;rlist!=NULL;rlist=rlist->next) {
|
while (rlist!=NULL) {
|
||||||
char * p;
|
region * r = rlist->data;
|
||||||
|
|
||||||
if (rlist!=route) {
|
travelthru(u, r);
|
||||||
|
rlist=rlist->next;
|
||||||
|
if (rlist!=NULL) {
|
||||||
|
char * p;
|
||||||
|
if (r!=route->data) {
|
||||||
if (rlist->next==NULL) scat(" und ");
|
if (rlist->next==NULL) scat(" und ");
|
||||||
else scat(", ");
|
else scat(", ");
|
||||||
}
|
}
|
||||||
travelthru(u, rlist->data);
|
|
||||||
|
|
||||||
p = buf+strlen(buf);
|
p = buf+strlen(buf);
|
||||||
MSG(("travelthru_trail", "region", rlist->data), p, sizeof(buf)-strlen(buf), u->faction->locale, u->faction);
|
MSG(("travelthru_trail", "region", r), p, sizeof(buf)-strlen(buf), u->faction->locale, u->faction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_message(&u->faction->msgs, new_message(
|
add_message(&u->faction->msgs, new_message(
|
||||||
|
@ -1246,7 +1250,7 @@ travel(unit * u, region * next, int flucht, region_list ** routep)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (can_survive(ut, current)) {
|
if (can_survive(ut, current)) {
|
||||||
travel_route(ut, route);
|
travel_route(ut, ut->region, route);
|
||||||
move_unit(ut, current, NULL);
|
move_unit(ut, current, NULL);
|
||||||
} else {
|
} else {
|
||||||
cmistake(u, u->thisorder, 287, MSG_MOVE);
|
cmistake(u, u->thisorder, 287, MSG_MOVE);
|
||||||
|
@ -1751,7 +1755,7 @@ move(unit * u, boolean move_on_land)
|
||||||
/* wir basteln ihm ein NACH */
|
/* wir basteln ihm ein NACH */
|
||||||
int k;
|
int k;
|
||||||
region_list * rlist = route;
|
region_list * rlist = route;
|
||||||
region * from = u->region;
|
region * from = r;
|
||||||
|
|
||||||
strcpy(buf, locale_string(up->faction->locale, keywords[K_MOVE]));
|
strcpy(buf, locale_string(up->faction->locale, keywords[K_MOVE]));
|
||||||
while (rlist!=NULL) {
|
while (rlist!=NULL) {
|
||||||
|
|
Loading…
Reference in New Issue