sin-2015/bob.h

65 lines
1.3 KiB
C
Raw Permalink Normal View History

1999-04-22 00:00:00 +00:00
#ifndef __BOB_H__
#define __BOB_H__
#include "g_local.h"
#include "actor.h"
#include "trigger.h"
#include "concussion.h"
#include "crossbow.h"
// varient of the Plasma Bow that's the secondary fire only
class EXPORT_FROM_DLL BobBow : public Weapon
{
public:
CLASS_PROTOTYPE(BobBow);
BobBow();
virtual void Shoot(Event *ev);
};
extern Event EV_Bob_Concussion;
class EXPORT_FROM_DLL Bob:public Actor
{
private:
float concussiontime;
int blastcount; // fire counter
Vector lastfirepos; // where it last fired from
Vector lastfiredir; // direction it last fired in
public:
CLASS_PROTOTYPE(Bob);
Bob::Bob();
virtual void Prethink(void);
void Killed(Event *ev);
qboolean InConcussionFOV(Vector pos);
void FireConcussion(Event *ev);
void ConcussionEffect(Event *ev);
virtual void Archive( Archiver &arc );
virtual void Unarchive( Archiver &arc );
};
inline EXPORT_FROM_DLL void Bob::Archive (Archiver &arc)
{
Actor::Archive(arc);
arc.WriteFloat(concussiontime);
arc.WriteInteger(blastcount);
arc.WriteVector(lastfirepos);
arc.WriteVector(lastfiredir);
}
inline EXPORT_FROM_DLL void Bob::Unarchive (Archiver &arc)
{
Actor::Unarchive(arc);
arc.ReadFloat(&concussiontime);
arc.ReadInteger(&blastcount);
arc.ReadVector(&lastfirepos);
arc.ReadVector(&lastfiredir);
}
#endif