[CF-Devel] Patch submission: weather.c for Windows32

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Thu Sep 25 13:10:10 CDT 2003


Hello.

Compiling the server under Windows, i had to fix some things in weather.c

Here's the patch.

It changes long long to sint64 (that's what the typedef is for :))
And instead of int64 * 1.5, it does int64 * 3 / 2
(since windows can't figure how to do *1.5.....)

I believe it'll work under Linux too...

Nicolas 'Ryo'
-------------- next part --------------
Index: weather.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/server/weather.c,v
retrieving revision 1.34
diff -r1.34 weather.c
2886,2887c2886,2887
<     long long total_rainfall = 0;
<     long long total_wind = 0;
---
>
     
          sint64 total_rainfall = 0;
     
     >
     
          sint64 total_wind = 0;
     
     2927c2927
<     avgwind = (total_wind    / (WEATHERMAPTILESX * WEATHERMAPTILESY) * 1.5);
---
>
     
          avgwind = (total_wind    / ((WEATHERMAPTILESX * WEATHERMAPTILESY) * 3 / 2));
     
     
    


More information about the crossfire mailing list