git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1507 e016b1c5-ed68-44aa-a2f7-31cac88cffde
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
struct playerent;
|
|
|
|
struct weapon
|
|
{
|
|
const static int weaponchangetime;
|
|
const static float weaponbeloweye;
|
|
static void equipplayer(playerent *pl);
|
|
|
|
weapon(struct playerent *owner, int type);
|
|
virtual ~weapon() {}
|
|
|
|
int type;
|
|
playerent *owner;
|
|
const struct guninfo &info;
|
|
int &ammo, &mag, &gunwait, shots;
|
|
virtual int dynspread();
|
|
virtual float dynrecoil();
|
|
int reloading, lastaction;
|
|
|
|
virtual bool attack(vec &targ) = 0;
|
|
virtual void attackfx(vec &from, vec &to, int millis) = 0;
|
|
virtual void attackphysics(vec &from, vec &to);
|
|
virtual void attacksound();
|
|
virtual bool reload();
|
|
virtual void reset() {}
|
|
|
|
virtual int modelanim() = 0;
|
|
virtual void updatetimers();
|
|
virtual bool selectable();
|
|
virtual bool deselectable();
|
|
virtual void renderstats();
|
|
virtual void renderhudmodel();
|
|
|
|
virtual void onselecting();
|
|
virtual void ondeselecting() {}
|
|
virtual void onammopicked() {}
|
|
virtual void onownerdies() {}
|
|
|
|
void sendshoot(vec &from, vec &to);
|
|
bool modelattacking();
|
|
void renderhudmodel(int lastaction, int index = 0);
|
|
};
|
|
|