2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
7 // AI Action - gun attack
24 ///////////////////////////////////////////////////////////////////////////////
26 // CLASS: cAIGunAction
28 // Attack a target with a gun
31 typedef int eAIGunActionState
;
32 enum eAIGunActionState_
{kAIGunActionStart
, kAIGunActionBurst
, kAIGunActionEnd
,};
34 class cAIGunAction
: public cAIAction
37 cAIGunAction(IAIAbility
* pOwner
, DWORD data
= 0);
39 // Set up action parameters
40 void Set(ObjID target
, int subModel
= 0, int gunJointID
= -1);
42 // One time gun shoot for a proxy in a network game.
43 // Called by cAIShockProxyBehaviorSet
44 static void EnactProxyShootGun(IAI
*pAI
, void *netmsg
);
47 STDMETHOD_(eAIResult
, Update
)();
50 STDMETHOD_(eAIResult
, Enact
)(ulong deltaTime
);
53 eAIGunActionState m_state
;
55 int m_shotsTaken
; // no of shots we have fired
56 sAIGunDesc
*m_pAIGunDesc
;
57 sBaseGunDesc
*m_pBaseGunDesc
;
63 cAIGunAction(IAI
*pAI
); // A constructor that is used only internally.
64 void Initialize(); // Initialization used by both constructors
65 void SetState(eAIGunActionState state
);
67 void BroadcastShoot();
68 BOOL
CheckTarget(void);
71 ////////////////////////////////////////
73 inline BOOL
cAIGunAction::CheckTarget(void)
75 return (g_pAIAttackLinks
->GetSingleLink(m_pAIState
->GetID(), m_targetObj
) != LINKID_NULL
);
78 ////////////////////////////////////////
82 #endif /* !__AIGUNACT_H */