forked from jimdose/SiN_110_Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grapple.h
91 lines (76 loc) · 2.08 KB
/
grapple.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//-----------------------------------------------------------------------------
//
// $Logfile:: /Quake 2 Engine/Sin/code/game/grapple.h $
// $Revision:: 1 $
// $Author:: Aldie $
// $Date:: 3/02/99 9:24p $
//
// Copyright (C) 1998 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// $Log:: /Quake 2 Engine/Sin/code/game/grapple.h $
//
// 1 3/02/99 9:24p Aldie
//
// 2 2/16/99 4:08p Aldie
//
// 1 2/11/99 1:38p Aldie
//
// 2 2/10/99 9:35p Aldie
// First Version
//
// DESCRIPTION:
// Grappling Hook
#ifndef __GRAPPLE_H__
#define __GRAPPLE_H__
#include "g_local.h"
#include "item.h"
#include "weapon.h"
#include "specialfx.h"
class EXPORT_FROM_DLL Hook : public Projectile
{
private:
float speed;
public:
CLASS_PROTOTYPE( Hook );
void Setup( Entity *owner, Vector pos, Vector dir );
virtual void Archive( Archiver &arc );
virtual void Unarchive( Archiver &arc );
virtual void Touch( Event *ev );
};
inline EXPORT_FROM_DLL void Hook::Archive
(
Archiver &arc
)
{
Projectile::Archive( arc );
arc.WriteFloat( speed );
}
inline EXPORT_FROM_DLL void Hook::Unarchive
(
Archiver &arc
)
{
Projectile::Unarchive( arc );
arc.ReadFloat( &speed );
}
typedef SafePtr<Hook> HookPtr;
typedef SafePtr<Beam> BeamPtr;
class EXPORT_FROM_DLL Grapple : public Weapon
{
private:
HookPtr hook;
BeamPtr beam;
public:
CLASS_PROTOTYPE( Grapple );
Grapple();
~Grapple();
virtual void Shoot( Event *ev );
virtual qboolean HasAmmo( void );
virtual void ReleaseFire( float t );
virtual void UpdateBeam( Event *ev );
};
#endif /* grapple.h */