warning fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3275 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-26 09:34:38 +00:00
parent b456f8ba0d
commit 3610371f1d
5 changed files with 11 additions and 8 deletions
+3 -3
View File
@@ -586,9 +586,9 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
break;
case CTFF_DROPPED:
{
short x = getuint(p)/DMF;
short y = getuint(p)/DMF;
short z = getuint(p)/DMF;
float x = getuint(p)/DMF;
float y = getuint(p)/DMF;
float z = getuint(p)/DMF;
flagdropped(flag, x, y, z);
break;
}
+2 -2
View File
@@ -248,7 +248,7 @@ void checkitems(playerent *d)
flaginfo &f = flaginfos[i];
entity &e = *f.flagent;
if(!e.spawned || !f.ack || (f.state == CTFF_INBASE && !numflagspawn[i])) continue;
if(OUTBORD(int(f.pos.x), int(f.pos.y))) continue;
if(OUTBORD(f.pos.x, f.pos.y)) continue;
if(f.state==CTFF_DROPPED) // 3d collision for dropped ctf flags
{
if(objcollide(d, f.pos, 2.5f, 4.0f)) trypickupflag(i, d);
@@ -371,7 +371,7 @@ void flagstolen(int flag, int act)
f.ack = true;
}
void flagdropped(int flag, short x, short y, short z)
void flagdropped(int flag, float x, float y, float z)
{
flaginfo &f = flaginfos[flag];
if(OUTBORD(x, y)) return; // valid pos
+1 -1
View File
@@ -339,7 +339,7 @@ extern void tryflagdrop(bool manual = false);
extern void flagreturn(int fln);
extern void flagscore(int fln);
extern void flagstolen(int flag, int act);
extern void flagdropped(int flag, short x, short y, short z);
extern void flagdropped(int flag, float x, float y, float z);
extern void flaginbase(int flag);
extern void flagidle(int flag);
extern void flagmsg(int flag, int message, int actor, int flagtime);
+2 -1
View File
@@ -50,4 +50,5 @@ public:
return 1;
}
}
};
};
+3 -1
View File
@@ -11,7 +11,9 @@
using namespace std;
#ifdef WIN32
#pragma warning( disable : 4996 )
#ifndef __GNUC__
#pragma warning( disable : 4996 )
#endif
#include <direct.h>
#include "winserviceinstaller.h"
#elif __GNUC__