]> git.pond.sub.org Git - empserver/commitdiff
Scrapping ships and land units now spreads the plague
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 30 Jun 2012 19:24:36 +0000 (21:24 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 13 Jul 2012 18:15:33 +0000 (20:15 +0200)
src/lib/commands/scra.c

index 98b71ee4190498fd3202f87e41cf61362eca5ae0..15ed30eac060a8e502e4169a270a972d89bc4b48 100644 (file)
@@ -36,6 +36,7 @@
 #include <ctype.h>
 #include "commands.h"
 #include "optlist.h"
 #include <ctype.h>
 #include "commands.h"
 #include "optlist.h"
+#include "plague.h"
 #include "unit.h"
 
 int
 #include "unit.h"
 
 int
@@ -148,6 +149,9 @@ scra(void)
            }
            sect.sct_item[I_LCM] += mp->m_lcm * 2 / 3 * eff;
            sect.sct_item[I_HCM] += mp->m_hcm * 2 / 3 * eff;
            }
            sect.sct_item[I_LCM] += mp->m_lcm * 2 / 3 * eff;
            sect.sct_item[I_HCM] += mp->m_hcm * 2 / 3 * eff;
+           if (item.ship.shp_pstage == PLG_INFECT
+               && sect.sct_pstage == PLG_HEALTHY)
+               sect.sct_pstage = PLG_EXPOSED;
        } else if (type == EF_LAND) {
            eff = item.land.lnd_effic / 100.0;
            lp = &lchr[(int)item.land.lnd_type];
        } else if (type == EF_LAND) {
            eff = item.land.lnd_effic / 100.0;
            lp = &lchr[(int)item.land.lnd_type];
@@ -158,6 +162,9 @@ scra(void)
            }
            sect.sct_item[I_LCM] += lp->l_lcm * 2 / 3 * eff;
            sect.sct_item[I_HCM] += lp->l_hcm * 2 / 3 * eff;
            }
            sect.sct_item[I_LCM] += lp->l_lcm * 2 / 3 * eff;
            sect.sct_item[I_HCM] += lp->l_hcm * 2 / 3 * eff;
+           if (item.land.lnd_pstage == PLG_INFECT
+               && sect.sct_pstage == PLG_HEALTHY)
+               sect.sct_pstage = PLG_EXPOSED;
        } else {
            eff = item.land.lnd_effic / 100.0;
            pp = &plchr[(int)item.plane.pln_type];
        } else {
            eff = item.land.lnd_effic / 100.0;
            pp = &plchr[(int)item.plane.pln_type];