diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c
index c110d2218..cc502ed89 100644
--- a/src/common/gamecode/economy.c
+++ b/src/common/gamecode/economy.c
@@ -2701,7 +2701,7 @@ steal_cmd(unit * u, struct order * ord, request ** stealorders)
faction * f = NULL;
if (!fval(u->race, RCF_CANSTEAL)) {
- ADDMSG(&u->faction->msgs, msg_feedback("race_nosteal", "race", u->race));
+ ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "race_nosteal", "race", u->race));
return;
}
diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c
index a167000c4..acc9eb38c 100644
--- a/src/common/gamecode/laws.c
+++ b/src/common/gamecode/laws.c
@@ -3241,7 +3241,7 @@ new_units (void)
if (getparam(u->faction->locale) == P_TEMP) {
const char * token;
char * name = NULL;
- int g, alias;
+ int alias;
order ** newordersp;
if (!checkunitnumber(u->faction, 1)) {
diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c
index 179926015..3a97fa510 100644
--- a/src/common/kernel/build.c
+++ b/src/common/kernel/build.c
@@ -1022,7 +1022,9 @@ create_ship(region * r, unit * u, const struct ship_type * newtype, int want, or
sh = new_ship(newtype, u->faction->locale, r);
leave(r, u);
- u->ship = sh;
+ if (fval(u->race, RCF_CANSAIL)) {
+ u->ship = sh;
+ }
fset(u, UFL_OWNER);
sprintf(buffer, "%s %s %s",
locale_string(u->faction->locale, keywords[K_MAKE]), locale_string(u->faction->locale, parameters[P_SHIP]), shipid(sh));
@@ -1141,7 +1143,7 @@ enter_ship(unit * u, struct order * ord, int id, boolean report)
/* Muß abgefangen werden, sonst könnten Schwimmer an
* Bord von Schiffen an Land gelangen. */
- if (!fval(u->race, RCF_WALK) && !fval(u->race, RCF_FLY)) {
+ if (!fval(u->race, RCF_CANSAIL) || (!fval(u->race, RCF_WALK) && !fval(u->race, RCF_FLY))) {
cmistake(u, ord, 233, MSG_MOVE);
return false;
}
diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c
index e76ce453b..cc9b51050 100644
--- a/src/common/kernel/eressea.c
+++ b/src/common/kernel/eressea.c
@@ -1999,6 +1999,7 @@ create_unit(region * r, faction * f, int number, const struct race *urace, int i
/* erbt Gebäude/Schiff*/
if (creator->region==r) {
u->building = creator->building;
+ assert(creator->ship==NULL || fval(u->race, RCF_CANSAIL));
u->ship = creator->ship;
}
diff --git a/src/common/kernel/race.h b/src/common/kernel/race.h
index bc2673584..51869d683 100644
--- a/src/common/kernel/race.h
+++ b/src/common/kernel/race.h
@@ -136,6 +136,7 @@ extern int rc_specialdamage(const race *, const race *, const struct weapon_type
#define RCF_DRAGON (1<<21) /* Drachenart (für Zauber)*/
#define RCF_COASTAL (1<<22) /* kann in Landregionen an der Küste sein */
#define RCF_UNARMEDGUARD (1<<23) /* kann ohne Waffen bewachen */
+#define RCF_CANSAIL (1<<24) /* Einheit darf Schiffe betreten */
/* Economic flags */
#define NOGIVE (1<<0) /* gibt niemals nix */
diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c
index a3bbace10..ded5723ab 100644
--- a/src/common/kernel/unit.c
+++ b/src/common/kernel/unit.c
@@ -246,7 +246,9 @@ destroy_unit(unit * u)
if (u->region!=clone->region) {
move_unit(u, clone->region, NULL);
}
- u->ship = clone->ship;
+ if (fval(u->race, RCF_CANSAIL)) {
+ u->ship = clone->ship;
+ }
u->building = clone->building;
u->hp = 1;
i = u->no;
diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c
index b37531f74..86a5fd3f0 100644
--- a/src/common/kernel/xmlreader.c
+++ b/src/common/kernel/xmlreader.c
@@ -1410,6 +1410,7 @@ parse_races(xmlDocPtr doc)
if (xml_bvalue(node, "playerrace", false)) rc->flags |= RCF_PLAYERRACE;
if (xml_bvalue(node, "scarepeasants", false)) rc->flags |= RCF_SCAREPEASANTS;
if (xml_bvalue(node, "cansteal", true)) rc->flags |= RCF_CANSTEAL;
+ if (xml_bvalue(node, "cansail", true)) rc->flags |= RCF_CANSAIL;
if (xml_bvalue(node, "cannotmove", false)) rc->flags |= RCF_CANNOTMOVE;
if (xml_bvalue(node, "fly", false)) rc->flags |= RCF_FLY;
if (xml_bvalue(node, "coastal", false)) rc->flags |= RCF_COASTAL;
diff --git a/src/res/races.xml b/src/res/races.xml
index 7660ec134..bbd018aad 100644
--- a/src/res/races.xml
+++ b/src/res/races.xml
@@ -640,7 +640,7 @@
-
+
@@ -648,14 +648,14 @@
-
+
-
+