CFuncTank (CS)

From AlliedModders Wiki
Revision as of 04:55, 29 August 2009 by Arkshine (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



W = Windows | L = Linux

Name W. Offset L. Offset L. Diff Type Description
m_pController 34 38 +4 CBasePlayer* Use get_pdata_cbase().
m_flNextAttack 35 39 +4 float None.
m_vecControllerUsePos 36 40 +4 Vector None.
m_yawCenter 39 43 +4 float "Center" yaw.
m_yawRate 40 44 +4 float Max turn rate to track targets.
m_yawRange 41 45 +4 float Range of turning motion (one-sided: 30 is +/- 30 degress from center)

Zero is full rotation.

m_yawTolerance 42 46 +4 float Tolerance angle.
m_pitchCenter 43 47 +4 float "Center" pitch.
m_pitchRate 44 48 +4 float Max turn rate on pitch.
m_pitchRange 45 49 +4 float Range of pitch motion as above.
m_pitchTolerance 46 50 +4 float Tolerance angle.
m_fireLast 47 51 +4 float Last time I fired.
m_fireRate 48 52 +4 float How many rounds/second.
m_lastSightTime 49 53 +4 float Last time I saw target.
m_persist 50 54 +4 float LPersistence of firing (how long do I shoot when I can't see).
m_minRange 51 55 +4 float Minimum range to aim/track.
m_maxRange 52 56 +4 float Max range to aim/track.
m_barrelPos 53 57 +4 Vector Length of the freakin barrel.
m_spriteScale 56 60 +4 float Scale of any sprites we shoot.
m_iszSpriteSmoke 57 61 +4 int None.
m_iszSpriteFlash 58 62 +4 int None.
m_bulletType 59 63 +4 TANKBULLET Bullet type.
m_iBulletDamage 60 64 +4 int 0 means use Bullet type's default damage.
m_sightOrigin 61 65 +4 Vector Last sight of target.
m_spread 64 68 +4 int Firing spread.
m_iszMaster 65 69 +4 int Master entity. (game_team_master or multisource)


Constants

// Spawn flags
#define SF_TANK_ACTIVE			0x0001
#define SF_TANK_PLAYER			0x0002
#define SF_TANK_HUMANS			0x0004
#define SF_TANK_ALIENS			0x0008
#define SF_TANK_LINEOFSIGHT		0x0010
#define SF_TANK_CANCONTROL		0x0020
#define SF_TANK_SOUNDON			0x8000
 
enum TANKBULLET
{
	TANK_BULLET_NONE = 0,
	TANK_BULLET_9MM = 1,
	TANK_BULLET_MP5 = 2,
	TANK_BULLET_12MM = 3,
};