]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/sect.c
Remove option TREATIES
[empserver] / src / lib / update / sect.c
index 2723c8c61e8b249c34dc2c4d6f1e82e6b68aa836..e324b279167a2030a5945ea5337a0990ca923172 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-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
  *  Known contributors to this file:
  *     Dave Pare, 1986
  *     Steve McClure, 1996
- *     Markus Armbruster, 2004-2010
+ *     Markus Armbruster, 2004-2013
  */
 
 #include <config.h>
 
 #include "budg.h"
+#include "chance.h"
 #include "item.h"
 #include "land.h"
 #include "lost.h"
@@ -134,7 +135,6 @@ enlist(short *vec, int etu, int *cost)
     int maxmil;
     int enlisted;
 
-    /* Need to check treaties here */
     enlisted = 0;
     maxmil = vec[I_CIVIL] / 2 - vec[I_MILIT];
     if (maxmil > 0) {
@@ -158,7 +158,7 @@ meltitems(int etus, int fallout, int own, short *vec,
     int melt;
 
     for (n = I_NONE + 1; n <= I_MAX; n++) {
-       melt = roundavg(vec[n] * etus * (long)fallout
+       melt = roundavg(vec[n] * etus * (double)fallout
                        / (1000.0 * ichr[n].i_melt_denom));
        if (melt > vec[n])
            melt = vec[n];
@@ -256,7 +256,7 @@ decay_fallout(struct sctstr *sp, int etus)
  * Produce for a specific nation
  */
 void
-produce_sect(int natnum, int etu, struct bp *bp, long p_sect[][2])
+produce_sect(int natnum, int etu, struct bp *bp, int p_sect[][2])
 {
     struct sctstr *sp;
     struct natstr *np;