Difference between revisions of "CFuncTank (CS)"

From AlliedModders Wiki
Jump to: navigation, search
Line 14: Line 14:
 
| style="text-align:center" | 34  
 
| style="text-align:center" | 34  
 
| style="text-align:center" | 39  
 
| style="text-align:center" | 39  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | CBasePlayer*
 
| style="text-align:center" | CBasePlayer*
 
| Use get_pdata_cbase().
 
| Use get_pdata_cbase().
Line 21: Line 21:
 
| style="text-align:center" | 35  
 
| style="text-align:center" | 35  
 
| style="text-align:center" | 40  
 
| style="text-align:center" | 40  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| None.
 
| None.
Line 28: Line 28:
 
| style="text-align:center" | 36  
 
| style="text-align:center" | 36  
 
| style="text-align:center" | 41  
 
| style="text-align:center" | 41  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | Vector
 
| style="text-align:center" | Vector
 
| None.
 
| None.
Line 35: Line 35:
 
| style="text-align:center" | 39  
 
| style="text-align:center" | 39  
 
| style="text-align:center" | 44  
 
| style="text-align:center" | 44  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| "Center" yaw.
 
| "Center" yaw.
Line 42: Line 42:
 
| style="text-align:center" | 40  
 
| style="text-align:center" | 40  
 
| style="text-align:center" | 45  
 
| style="text-align:center" | 45  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Max turn rate to track targets.
 
| Max turn rate to track targets.
Line 49: Line 49:
 
| style="text-align:center" | 41  
 
| style="text-align:center" | 41  
 
| style="text-align:center" | 46  
 
| style="text-align:center" | 46  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Range of turning motion (one-sided: 30 is +/- 30 degress from center)
 
| Range of turning motion (one-sided: 30 is +/- 30 degress from center)
Line 57: Line 57:
 
| style="text-align:center" | 42  
 
| style="text-align:center" | 42  
 
| style="text-align:center" | 47  
 
| style="text-align:center" | 47  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Tolerance angle.
 
| Tolerance angle.
Line 64: Line 64:
 
| style="text-align:center" | 43  
 
| style="text-align:center" | 43  
 
| style="text-align:center" | 48  
 
| style="text-align:center" | 48  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| "Center" pitch.
 
| "Center" pitch.
Line 71: Line 71:
 
| style="text-align:center" | 44
 
| style="text-align:center" | 44
 
| style="text-align:center" | 49  
 
| style="text-align:center" | 49  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Max turn rate on pitch.
 
| Max turn rate on pitch.
Line 78: Line 78:
 
| style="text-align:center" | 45
 
| style="text-align:center" | 45
 
| style="text-align:center" | 50  
 
| style="text-align:center" | 50  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Range of pitch motion as above.
 
| Range of pitch motion as above.
Line 85: Line 85:
 
| style="text-align:center" | 46  
 
| style="text-align:center" | 46  
 
| style="text-align:center" | 51  
 
| style="text-align:center" | 51  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Tolerance angle.
 
| Tolerance angle.
Line 92: Line 92:
 
| style="text-align:center" | 47
 
| style="text-align:center" | 47
 
| style="text-align:center" | 52  
 
| style="text-align:center" | 52  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Last time I fired.
 
| Last time I fired.
Line 99: Line 99:
 
| style="text-align:center" | 48
 
| style="text-align:center" | 48
 
| style="text-align:center" | 53  
 
| style="text-align:center" | 53  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| How many rounds/second.
 
| How many rounds/second.
Line 106: Line 106:
 
| style="text-align:center" | 49
 
| style="text-align:center" | 49
 
| style="text-align:center" | 54  
 
| style="text-align:center" | 54  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Last time I saw target.
 
| Last time I saw target.
Line 113: Line 113:
 
| style="text-align:center" | 50
 
| style="text-align:center" | 50
 
| style="text-align:center" | 55
 
| style="text-align:center" | 55
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| LPersistence of firing (how long do I shoot when I can't see).
 
| LPersistence of firing (how long do I shoot when I can't see).
Line 120: Line 120:
 
| style="text-align:center" | 51
 
| style="text-align:center" | 51
 
| style="text-align:center" | 56  
 
| style="text-align:center" | 56  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Minimum range to aim/track.
 
| Minimum range to aim/track.
Line 127: Line 127:
 
| style="text-align:center" | 52
 
| style="text-align:center" | 52
 
| style="text-align:center" | 57  
 
| style="text-align:center" | 57  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Max range to aim/track.
 
| Max range to aim/track.
Line 134: Line 134:
 
| style="text-align:center" | 53
 
| style="text-align:center" | 53
 
| style="text-align:center" | 58  
 
| style="text-align:center" | 58  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | Vector
 
| style="text-align:center" | Vector
 
| Length of the freakin barrel.
 
| Length of the freakin barrel.
Line 141: Line 141:
 
| style="text-align:center" | 56
 
| style="text-align:center" | 56
 
| style="text-align:center" | 61  
 
| style="text-align:center" | 61  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | float
 
| style="text-align:center" | float
 
| Scale of any sprites we shoot.
 
| Scale of any sprites we shoot.
Line 148: Line 148:
 
| style="text-align:center" | 57
 
| style="text-align:center" | 57
 
| style="text-align:center" | 62  
 
| style="text-align:center" | 62  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | int
 
| style="text-align:center" | int
 
| None.
 
| None.
Line 155: Line 155:
 
| style="text-align:center" | 58
 
| style="text-align:center" | 58
 
| style="text-align:center" | 63  
 
| style="text-align:center" | 63  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | int
 
| style="text-align:center" | int
 
| None.
 
| None.
Line 162: Line 162:
 
| style="text-align:center" | 59
 
| style="text-align:center" | 59
 
| style="text-align:center" | 64  
 
| style="text-align:center" | 64  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | TANKBULLET
 
| style="text-align:center" | TANKBULLET
 
| Bullet type.
 
| Bullet type.
Line 169: Line 169:
 
| style="text-align:center" | 60
 
| style="text-align:center" | 60
 
| style="text-align:center" | 65  
 
| style="text-align:center" | 65  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | int
 
| style="text-align:center" | int
 
| 0 means use Bullet type's default damage.
 
| 0 means use Bullet type's default damage.
Line 176: Line 176:
 
| style="text-align:center" | 61
 
| style="text-align:center" | 61
 
| style="text-align:center" | 66  
 
| style="text-align:center" | 66  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | Vector
 
| style="text-align:center" | Vector
 
| Last sight of target.
 
| Last sight of target.
Line 183: Line 183:
 
| style="text-align:center" | 64
 
| style="text-align:center" | 64
 
| style="text-align:center" | 69  
 
| style="text-align:center" | 69  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | int
 
| style="text-align:center" | int
 
| Firing spread.
 
| Firing spread.
Line 190: Line 190:
 
| style="text-align:center" | 65
 
| style="text-align:center" | 65
 
| style="text-align:center" | 70  
 
| style="text-align:center" | 70  
| style="text-align:center" | +5
+
| style="text-align:center" | +4
 
| style="text-align:center" | int
 
| style="text-align:center" | int
 
| Master entity. (game_team_master or multisource)
 
| Master entity. (game_team_master or multisource)

Revision as of 10:07, 5 July 2009



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,
};