mirror of
https://github.com/UberGames/EF2GameSource.git
synced 2024-11-10 06:31:42 +00:00
reformat
This commit is contained in:
parent
e6ea22ee1a
commit
61be76cf60
1 changed files with 96 additions and 97 deletions
|
@ -1,97 +1,96 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Logfile:: /Code/DLLs/game/actor_combatsubsystem.h $
|
// $Logfile:: /Code/DLLs/game/actor_combatsubsystem.h $
|
||||||
// $Revision:: 21 $
|
// $Revision:: 21 $
|
||||||
// $Author:: Steven $
|
// $Author:: Steven $
|
||||||
// $Date:: 10/13/03 8:53a $
|
// $Date:: 10/13/03 8:53a $
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001 by Ritual Entertainment, Inc.
|
// Copyright (C) 2001 by Ritual Entertainment, Inc.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This source may not be distributed and/or modified without
|
// This source may not be distributed and/or modified without
|
||||||
// expressly written permission by Ritual Entertainment, Inc.
|
// expressly written permission by Ritual Entertainment, Inc.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// DESCRIPTION:
|
// DESCRIPTION:
|
||||||
// Combat Related Classes
|
// Combat Related Classes
|
||||||
//
|
//
|
||||||
|
|
||||||
class CombatSubsystem;
|
class CombatSubsystem;
|
||||||
|
|
||||||
#ifndef __ACTOR_COMBAT_SUBSYSTEM_H__
|
#ifndef __ACTOR_COMBAT_SUBSYSTEM_H__
|
||||||
#define __ACTOR_COMBAT_SUBSYSTEM_H__
|
#define __ACTOR_COMBAT_SUBSYSTEM_H__
|
||||||
|
|
||||||
#include "actor.h"
|
#include "actor.h"
|
||||||
#include "actorincludes.h"
|
#include "actorincludes.h"
|
||||||
#include "weapon.h"
|
#include "weapon.h"
|
||||||
|
|
||||||
//============================
|
//============================
|
||||||
// Class CombatSubsystem
|
// Class CombatSubsystem
|
||||||
//============================
|
//============================
|
||||||
//
|
//
|
||||||
// Encapsulates combat related data and functionality for the actor
|
// Encapsulates combat related data and functionality for the actor
|
||||||
//
|
//
|
||||||
class CombatSubsystem
|
class CombatSubsystem {
|
||||||
{
|
public:
|
||||||
public:
|
CombatSubsystem();
|
||||||
CombatSubsystem();
|
CombatSubsystem(Actor* actor);
|
||||||
CombatSubsystem( Actor *actor );
|
~CombatSubsystem();
|
||||||
~CombatSubsystem();
|
|
||||||
|
bool CanAttackTarget(Entity* target);
|
||||||
bool CanAttackTarget ( Entity *target );
|
bool CanAttackTargetFrom(Entity* target, const Vector& startPos);
|
||||||
bool CanAttackTargetFrom ( Entity *target , const Vector &startPos );
|
bool IsTargetInWeaponRange(Entity* target);
|
||||||
bool IsTargetInWeaponRange ( Entity *target );
|
bool UsingWeaponNamed(const str& weaponName);
|
||||||
bool UsingWeaponNamed ( const str &weaponName );
|
bool WeaponIsFireType(firetype_t fire_type);
|
||||||
bool WeaponIsFireType ( firetype_t fire_type );
|
bool HaveWeapon();
|
||||||
bool HaveWeapon ();
|
bool CanAttackEnemy();
|
||||||
bool CanAttackEnemy ();
|
|
||||||
|
void UseActorWeapon(const str& weaponName, weaponhand_t hand);
|
||||||
void UseActorWeapon (const str &weaponName , weaponhand_t hand );
|
void SetTraceInterval(float interval);
|
||||||
void SetTraceInterval ( float interval );
|
void FireWeapon();
|
||||||
void FireWeapon ();
|
void StopFireWeapon();
|
||||||
void StopFireWeapon ();
|
void AimWeaponTag(Entity* target);
|
||||||
void AimWeaponTag (Entity *target);
|
void AimWeaponTag(const Vector& targetPos);
|
||||||
void AimWeaponTag (const Vector &targetPos);
|
void ClearAim();
|
||||||
void ClearAim ();
|
|
||||||
|
void GetGunPositionData(Vector* pos, Vector* forward = NULL, Vector* right = NULL, Vector* up = NULL);
|
||||||
void GetGunPositionData ( Vector *pos , Vector *forward = NULL, Vector *right = NULL, Vector *up = NULL );
|
float GetAimGunYaw(const Vector& target);
|
||||||
float GetAimGunYaw ( const Vector &target );
|
float GetAimGunPitch(const Vector& target);
|
||||||
float GetAimGunPitch ( const Vector &target );
|
WeaponPtr GetBestAvailableWeapon(Entity* target);
|
||||||
WeaponPtr GetBestAvailableWeapon ( Entity *target );
|
float GetActiveWeaponPowerRating(Entity* target);
|
||||||
float GetActiveWeaponPowerRating ( Entity *target );
|
str GetActiveWeaponName();
|
||||||
str GetActiveWeaponName ();
|
str GetActiveWeaponArchetype();
|
||||||
str GetActiveWeaponArchetype();
|
|
||||||
|
bool GetProjectileLaunchAngles(Vector& launchAngles, const Vector& launchPoint, const float initialSpeed, const float gravity, const bool useHighTrajectory = false) const;
|
||||||
bool GetProjectileLaunchAngles( Vector &launchAngles, const Vector &launchPoint, const float initialSpeed, const float gravity , const bool useHighTrajectory = false ) const;
|
bool shouldArcProjectile();
|
||||||
bool shouldArcProjectile();
|
float GetLowArcRange();
|
||||||
float GetLowArcRange();
|
|
||||||
|
void OverrideSpread(float spreadX, float spreadY);
|
||||||
void OverrideSpread ( float spreadX , float spreadY );
|
|
||||||
|
const str GetAnimForMyWeapon(const str& property);
|
||||||
const str GetAnimForMyWeapon( const str& property );
|
float GetDataForMyWeapon(const str& property);
|
||||||
float GetDataForMyWeapon( const str& property );
|
|
||||||
|
Vector GetLeadingTargetPos(float projSpeed, Vector originalTargetPos, Entity* target);
|
||||||
Vector GetLeadingTargetPos( float projSpeed , Vector originalTargetPos , Entity *target );
|
|
||||||
|
// Archiving
|
||||||
// Archiving
|
void DoArchive(Archiver& arc, Actor* actor);
|
||||||
void DoArchive ( Archiver &arc , Actor *actor );
|
virtual void Archive(Archiver& arc);
|
||||||
virtual void Archive ( Archiver &arc );
|
|
||||||
|
protected:
|
||||||
protected:
|
void _init();
|
||||||
void _init();
|
bool _traceHitTarget(Entity* target, const Vector& startPos);
|
||||||
bool _traceHitTarget ( Entity *target , const Vector &startPos );
|
float getModifiedPowerRating(Entity* target, Weapon* weapon);
|
||||||
float getModifiedPowerRating ( Entity *target , Weapon *weapon );
|
|
||||||
|
|
||||||
|
private:
|
||||||
private:
|
ActiveWeapon _activeWeapon;
|
||||||
ActiveWeapon _activeWeapon;
|
float _nextTimeTracedToTarget;
|
||||||
float _nextTimeTracedToTarget;
|
float _traceInterval;
|
||||||
float _traceInterval;
|
bool _canShootTarget;
|
||||||
bool _canShootTarget;
|
float _yawDiff;
|
||||||
float _yawDiff;
|
|
||||||
|
Actor* act;
|
||||||
Actor *act;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
#endif /* __ACTOR_COMBAT_SUBSYSTEM_H__ */
|
||||||
#endif /* __ACTOR_COMBAT_SUBSYSTEM_H__ */
|
|
||||||
|
|
Loading…
Reference in a new issue