Difference between revisions of "CFuncTank (CS)"

From AlliedModders Wiki
Jump to: navigation, search
(CFuncTank offset list)
 
(No difference)

Revision as of 07:53, 17 April 2009



W = Windows | L = Linux

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

Zero is full rotation.

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