CFuncTank (CS)

From AlliedModders Wiki
Revision as of 11:07, 5 July 2009 by Arkshine (talk | contribs)
Jump to: navigation, search



W = Windows | L = Linux

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

Zero is full rotation.

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