]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/plague.c
Update copyright notice
[empserver] / src / lib / update / plague.c
index 0cfbfe3716ccc0dc009ad2f5735e87fd0767b8b7..c082b2797b3a4a58db4692753aaf44204b9332f4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -28,6 +28,7 @@
  *
  *  Known contributors to this file:
  *     Steve McClure, 1998-2000
+ *     Markus Armbruster, 2004-2014
  */
 
 #include <config.h>
@@ -99,7 +100,7 @@ do_plague(struct sctstr *sp, struct natstr *np, int etu)
        }
     }
     if (sp->sct_item[I_CIVIL] == 0 && sp->sct_item[I_MILIT] == 0
-       && !has_units(sp->sct_x, sp->sct_y, sp->sct_own, NULL)) {
+       && !has_units(sp->sct_x, sp->sct_y, sp->sct_own)) {
        makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y);
        sp->sct_own = 0;
        sp->sct_oldown = 0;
@@ -182,7 +183,7 @@ plague_people(struct natstr *np, short *vec,
     }
     if (*ptime <= 0) {
        *pstage -= 1;
-       *ptime = etus / 2 + random() % etus;
+       *ptime = etus / 2 + roll0(etus);
     }
     return stage;
 }