gcc compile fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1802 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-04-18 11:30:10 +00:00
parent 21f32efbec
commit 241dfc3401
5 changed files with 8 additions and 31 deletions
-26
View File
@@ -3,32 +3,6 @@
#include "pch.h"
#include "cube.h"
grenadeent::grenadeent (playerent *owner, int millis)
{
ASSERT(owner);
bounceent::owner = owner;
bounceent::millis = lastmillis;
timetolife = 2000-millis;
bouncestate = NADE_ACTIVATED;
maxspeed = 27.0f;
rotspeed = 6.0f;
}
void grenadeent::explode()
{
static vec n(0,0,0);
if(bouncestate != NADE_THROWED) owner->weapons[GUN_GRENADE]->attack(n);
playsound(S_FEXPLODE, &o);
newprojectile(o, o, 1, owner==player1, owner, GUN_GRENADE, millis);
}
void grenadeent::destroy()
{
if(bouncestate==NADE_ACTIVATED || bouncestate==NADE_THROWED) explode();
}
vector<entity> ents;
const char *entnames[] =
+2 -1
View File
@@ -464,4 +464,5 @@ struct grenadeent : bounceent
grenadeent (playerent *owner, int millis = 0);
void explode();
virtual void destroy();
};
};
+2 -1
View File
@@ -46,4 +46,5 @@
#endif
#include <zlib.h>
#include <enet/enet.h>
#include <enet/enet.h>
+1 -1
View File
@@ -912,7 +912,7 @@ bool subgun::selectable() { return weapon::selectable() && !m_noprimary && this
// sniperrifle
sniperrifle::sniperrifle(playerent *owner) : scoped(false), gun(owner, GUN_SNIPER) {}
sniperrifle::sniperrifle(playerent *owner) : gun(owner, GUN_SNIPER), scoped(false) {}
void sniperrifle::attackfx(vec &from, vec &to, int millis)
{
+3 -2
View File
@@ -70,7 +70,7 @@ struct grenades : weapon
struct gun : weapon
{
gun::gun(playerent *owner, int type);
gun(playerent *owner, int type);
virtual bool attack(vec &targ);
virtual void attackfx(vec &from, vec &to, int millis);
int modelanim();
@@ -159,4 +159,5 @@ struct knife : weapon
void drawstats();
void attackfx(vec &from, vec &to, int millis);
void renderstats();
};
};