From 7114b4f467d0e6409d02391e885fbf275f0273b0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 28 Aug 2008 17:58:54 +0000 Subject: [PATCH] http://bugs.eressea.de/view.php?id=1471 "Vertrauter verschwindet spurlos" telling players some more about tidal waves Issue: 1471 --- src/common/gamecode/randenc.c | 3 ++- src/common/kernel/unit.c | 2 ++ src/res/messages.xml | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/common/gamecode/randenc.c b/src/common/gamecode/randenc.c index b0084db19..e3ac76a29 100644 --- a/src/common/gamecode/randenc.c +++ b/src/common/gamecode/randenc.c @@ -482,7 +482,8 @@ chaos(region * r) for (u = r->units; u;) { u2 = u->next; - if (u->race != new_race[RC_SPELL] && u->ship == 0) { + if (u->race != new_race[RC_SPELL] && u->ship == 0 && !canfly(u)) { + ADDMSG(&u->faction->msgs, msg_message("tidalwave_kill", "region unit", r, u)); set_number(u, 0); } u = u2; diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index abd3e95ed..a2dca0598 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -1053,6 +1053,8 @@ set_number(unit * u, int count) u->faction->num_people += count - u->number; } u->number = (unsigned short)count; + } else { + assert(!"why doesn't this unit have a faction? this will fuck up num_people"); } } diff --git a/src/res/messages.xml b/src/res/messages.xml index dce3168e1..d8f710208 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -7905,6 +7905,15 @@ "A tidal wave wipes out $region($region) and all who lived there." + + + + + + "Eine gewaltige Flutwelle verschlingt $unit($unit) in $region($region)." + "A tidal wave wipes out $region($region) and kills $unit($unit)." + +