CBasePlayer (CS)

From AlliedModders Wiki
Revision as of 07:01, 21 November 2011 by Joropito (talk | contribs)
Jump to: navigation, search



W = Windows | L = Linux

Name W. Offset L. Offset L. Diff Type Description
random_seed 96 101 +5 int See that is shared between client & server for shared weapons code.
m_iPlayerTeam 114 119 +5 int Player team (0-NONE, 1-TT, 2-CT, 3-SPECTATOR, >3 Other teams)
m_iDefaultItems 120 125 +5 int Default items (knife, gun) given: 0<<1 => Already given
m_iJoinedState 121 126 +5 int Join state for player (value of 5 will put the player in-game, other value will put the player on trigger_camera)
m_iPlayerSound 237 242 +5 int The index of the sound list slot reserved for this player.
m_iTargetVolume 238 243 +5 int Ideal sound volume.
m_iWeaponVolume 239 244 +5 int How loud the player's weapon is right now.
m_iExtraSoundTypes 240 245 +5 int Additional classification for this weapon's sound.
m_iWeaponFlash 241 246 +5 int Brightness of the weapon flash.
m_flStopExtraSoundTime 242 247 +5 float None.
m_flFlashLightTime 243 248 +5 float Time until next battery draw/Recharge.
m_iFlashBattery 244 249 +5 int Flashlight Battery Draw.
m_afButtonLast 245 250 +5 int None.
m_afButtonPressed 246 251 +5 int None.
m_afButtonReleased 247 252 +5 int None.
m_pentSndLast 248 253 +5 edict_t* Last sound entity to modify player room type. ( get_pdata_ent() )
m_flSndRoomtype 249 254 +5 float Last roomtype set by sound entity.
m_flSndRange 250 255 +5 float Dist from player to sound entity.
m_flFallVelocity 251 256 +5 float Player's fall speed.
m_rgItems[item_antidote] 254 259 +5 int None.
m_rgItems[item_security] 255 260 +5 int None.
m_fKnownItem ? ? +5 int True when a new item needs to be added.
m_fNewAmmo ? ? +5 int True when a new item has been added.
m_afPhysicsFlags 257 263 +5 unsigned int Physics flags - set when 'normal' physics should be revisited or overriden.

The following masks can be found in player.h:

#define     PFLAG_ONLADDER      ( 1<<0 )
#define     PFLAG_ONSWING       ( 1<<0 )
#define     PFLAG_ONTRAIN       ( 1<<1 )
#define     PFLAG_ONBARNACLE    ( 1<<2 )
#define     PFLAG_DUCKING       ( 1<<3 )        // In the process of ducking, but totally squatted yet
#define     PFLAG_USING         ( 1<<4 )        // Using a continuous entity
#define     PFLAG_OBSERVER      ( 1<<5 )        // player is locked in stationary cam mode. Spectators can move, observers can't.
m_fNextSuicideTime 258 263 +5 float The time after which the player can next use the suicide command.
m_flTimeStepSound 259 264 +5 float When the last stepping sound was made.
m_flTimeWeaponIdle 260 265 +5 float When to play another weapon idle animation.
m_flSwimTime 261 266 +5 float How long player has been underwater.
m_flDuckTime 262 267 +5 float How long we've been ducking.
m_flWallJumpTime 263 268 +5 float How long until next walljump.
m_flSuitUpdate 264 269 +5 float When to play next suit update.
m_rgSuitPlayList 265 270 +5 int[CSUITPLAYLIST] Next sentencenum to play for suit update.
#define CSUITPLAYLIST	4  // max of 4 suit sentences queued up at any time
m_iSuitPlayNext 269 274 +5 int Next sentence slot for queue storage.
m_rgiSuitNoRepeat 270 275 +5 int[CSUITNOREPEAT] Suit sentence no repeat list.
#define CSUITNOREPEAT  32
m_rgflSuitNoRepeatTime 302 207 +5 int[CSUITNOREPEAT] How long to wait before allowing repeat.
m_lastDamageAmount 334 339 +5 int Last damage taken.
m_tbdPrev 335 340 +5 float Time-based damage timer.
m_flgeigerRange 336 341 +5 float Range to nearest radiation source.
m_flgeigerDelay 337 342 +5 float Delay per update of range msg to client.
m_igeigerRangePrev 338 343 +5 int None.
m_iStepLeft 339 344 +5 int Alternate left/right foot stepping sound.
m_szTextureName ? ? +5 char[CBTEXTURENAMEMAX] Current texture name we're standing on.
#define CBTEXTURENAMEMAX  13 // only load first n chars of name
m_chTextureType ? ? +5 char Current texture type.
#define CHAR_TEX_CONCRETE  'C'	// texture types
#define CHAR_TEX_METAL	   'M'
#define CHAR_TEX_DIRT	   'D'
#define CHAR_TEX_VENT	   'V'
#define CHAR_TEX_GRATE	   'G'
#define CHAR_TEX_TILE	   'T'
#define CHAR_TEX_SLOSH	   'S'
#define CHAR_TEX_WOOD	   'W'
#define CHAR_TEX_COMPUTER  'P'
#define CHAR_TEX_GLASS	   'Y'
#define CHAR_TEX_FLESH	   'F'
m_idrowndmg 345 350 +5 int Track drowning damage taken.
m_idrownrestored 346 351 +5 int Track drowning damage restored.
m_bitsHUDDamage 347 352 +5 int Damage bits for the current fame. These get sent to the hud via the Damage message.
// these are the damage types that have client hud art
#define DMG_SHOWNHUD ( DMG_POISON | DMG_ACID | DMG_FREEZE | DMG_SLOWFREEZE | DMG_DROWN | DMG_BURN | DMG_SLOWBURN | DMG_NERVEGAS | DMG_RADIATION | DMG_SHOCK )
m_fInitHUD 348 353 +5 BOOL True when deferred HUD restart msg needs to be sent.
m_fInitHUD 349 354 +5 BOOL None.
m_iTrain 350 355 +5 int Train control position.
m_fWeapon 351 356 +5 BOOL Set this to FALSE to force a reset of the current weapon HUD info.
m_pTank ? ? +5 EHANDLE The tank which the player is currently controlling, NULL if no tank.
m_fDeadTime 354 359 +5 float the time at which the player died (used in PlayerDeathThink()).
m_fNoPlayerSound 355 360 +5 BOOL A debugging feature. Player makes no sound if this is true.
m_fLongJump 356 361 +5 BOOL Does this player have the longjump module?
m_tSneaking 357 362 +5 float None.
m_iUpdateTime 358 363 +5 int Stores the number of frame ticks before sending HUD update messages.
m_iClientHealth 359 364 +5 int The health currently known by the client. If this changes, send a new.
m_iClientBattery 360 365 +5 int The Battery currently known by the client. If this changes, send a new.
m_iHideHUD 361 366 +5 int The players hud weapon info is to be hidden
m_iClientHideHUD 362 367 +5 int None.
m_iFOV 363 368 +5 int Field of view.
m_iClientFOV 364 369 +5 int Client's known FOV.
m_rgpPlayerItems 365 370 +5 CBasePlayerItem*[MAX_ITEM_TYPES] (get_pdata_cbase)
#define MAX_ITEM_TYPES 4
m_pLastPrimaryItem 368 373 +5 CBasePlayerItem* (get_pdata_cbase)
m_pLastSecondaryItem 369 374 +5 CBasePlayerItem* (get_pdata_cbase)
m_pLastKnifeItem 370 375 +5 CBasePlayerItem* (get_pdata_cbase)
m_pLastGrenadeItem 371 376 +5 CBasePlayerItem* (get_pdata_cbase)
m_pLastC4Item 372 377 +5 CBasePlayerItem* (get_pdata_cbase)
m_pActiveItem 373 378 +5 CBasePlayerItem* (get_pdata_cbase)
m_pClientActiveItem 374 379 +5 CBasePlayerItem* Client version of the active item. (get_pdata_cbase)
m_pLastItem 375 380 +5 CBasePlayerItem* (get_pdata_cbase)
m_rgAmmo 376 381 +5 int[MAX_AMMO_SLOTS] Shared ammo slots.
#define MAX_AMMO_SLOTS  32  // not really slots
m_rgAmmoLast 408 413 +5 int[MAX_AMMO_SLOTS] Shared ammo slots.
m_vecAutoAim 440 445 +5 Vector Shared ammo slots.
m_fOnTarget 441 446 +5 BOOL Shared ammo slots.
m_iDeaths 442 447 +5 int Shared ammo slots.
m_iRespawnFrames 443 447 +5 float Used in PlayerDeathThink() to make sure players can always respawn.
m_izSBarState 446 451 +5 int[SBAR_END]
enum sbar_data
{
	SBAR_ID_TARGETNAME = 1,
	SBAR_ID_TARGETHEALTH,
	SBAR_ID_TARGETARMOR,
	SBAR_END,
};
m_flNextSBarUpdateTime 449 454 +5 float None.
m_flStatusBarDisappearDelay 450 455 +5 float None.
m_lastx 483 488 +5 int These are the previous update's crosshair angles.
m_lasty 484 489 +5 int These are the previous update's crosshair angles.
m_nCustomSprayFrames 485 490 +5 int Custom clan logo frames for this player.
m_flNextDecalTime 486 491 +5 float Next time this player can spray a decal.
m_szTeamName 487 492 +5 char[TEAM_NAME_LENGTH] None.
#define TEAM_NAME_LENGTH  16
m_szAnimExtention 492 497 +5 char[32] None.
m_SbarString0 ? ? +5 char[ SBAR_STRING_SIZE ]
#define SBAR_STRING_SIZE 128
m_SbarString1 ? ? +5 char[ SBAR_STRING_SIZE ] None.
m_flNextChatTime ? ? +5 float
#define CHAT_INTERVAL 1.0f