From b4ba66a95bcbbb701df54d7abb4c0a1dc641acf5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 22 Apr 2001 08:21:07 +0000 Subject: [PATCH] ursprung-fix --- src/common/kernel/plane.c | 10 ++++++++++ src/common/kernel/plane.h | 4 ++-- src/mapper/map_units.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/plane.c b/src/common/kernel/plane.c index ebd341025..ed9b6012b 100644 --- a/src/common/kernel/plane.c +++ b/src/common/kernel/plane.c @@ -114,6 +114,11 @@ ursprung_x(const faction *f, const plane *pl) return ur->x; } + if (pl) { + set_ursprung(f, id, plane_center_x(pl), plane_center_y(pl)); + return plane_center_x(pl); + } + return 0; } @@ -134,6 +139,11 @@ ursprung_y(const faction *f, const plane *pl) return ur->y; } + if (pl) { + set_ursprung(f, id, plane_center_x(pl), plane_center_y(pl)); + return plane_center_y(pl); + } + return 0; } diff --git a/src/common/kernel/plane.h b/src/common/kernel/plane.h index e081e1a5b..51f3657a4 100644 --- a/src/common/kernel/plane.h +++ b/src/common/kernel/plane.h @@ -56,8 +56,8 @@ int getplaneid(struct region *r); struct plane * getplanebyid(int id); int region_x(const struct region *r, const struct faction *f); int region_y(const struct region *r, const struct faction *f); -int plane_center_x(plane *pl); -int plane_center_y(plane *pl); +int plane_center_x(const struct plane *pl); +int plane_center_y(const struct plane *pl); int ursprung_x(const struct faction *f, const plane *pl); int ursprung_y(const struct faction *f, const plane *pl); void set_ursprung(struct faction *f, int id, int x, int y); diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index f97c02fcf..9dcb66b6d 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -851,7 +851,7 @@ mapper_spunit(dbllist ** SP, unit * u, int indent) dh = 0; for (sk = 0; sk != MAXSKILLS; sk++) - spskill(u, sk, &dh, 1); + spskill(find_locale("de"), u, sk, &dh, 1); dh = 0; for (itm = u->items;itm;itm=itm->next) {