|
|
@ -47,6 +47,10 @@ extern DLL_GLOBAL int g_iSkillLevel, gDisplayTitle; |
|
|
|
|
|
|
|
|
|
|
|
extern "C" int g_bhopcap; |
|
|
|
extern "C" int g_bhopcap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern BOOL g_bIsSlaveCoOp; |
|
|
|
|
|
|
|
extern BOOL g_bIsDecayGame; |
|
|
|
|
|
|
|
extern int g_iStartSuit; |
|
|
|
|
|
|
|
|
|
|
|
BOOL gInitHUD = TRUE; |
|
|
|
BOOL gInitHUD = TRUE; |
|
|
|
|
|
|
|
|
|
|
|
extern void CopyToBodyQue( entvars_t *pev); |
|
|
|
extern void CopyToBodyQue( entvars_t *pev); |
|
|
@ -192,7 +196,7 @@ int gmsgLensFlare = 0; |
|
|
|
int gmsgAimFrame = 0; |
|
|
|
int gmsgAimFrame = 0; |
|
|
|
int gmsgNotepad = 0; |
|
|
|
int gmsgNotepad = 0; |
|
|
|
int gmsgChangeMode = 0; |
|
|
|
int gmsgChangeMode = 0; |
|
|
|
int gmsgChangePlr = 0; |
|
|
|
int gmsgChangePlayer = 0; |
|
|
|
int gmsgCamera = 0; |
|
|
|
int gmsgCamera = 0; |
|
|
|
int gmsgSparePlayer = 0; |
|
|
|
int gmsgSparePlayer = 0; |
|
|
|
int gmsgAlienState = 0; |
|
|
|
int gmsgAlienState = 0; |
|
|
@ -249,7 +253,7 @@ void LinkUserMessages( void ) |
|
|
|
gmsgAimFrame = REG_USER_MSG( "AimFrame", 14 ); |
|
|
|
gmsgAimFrame = REG_USER_MSG( "AimFrame", 14 ); |
|
|
|
gmsgNotepad = REG_USER_MSG( "Notepad", -1 ); |
|
|
|
gmsgNotepad = REG_USER_MSG( "Notepad", -1 ); |
|
|
|
gmsgChangeMode = REG_USER_MSG( "ChangeMode", 1 ); |
|
|
|
gmsgChangeMode = REG_USER_MSG( "ChangeMode", 1 ); |
|
|
|
gmsgChangePlr = REG_USER_MSG( "ChangePlr", 1 ); |
|
|
|
gmsgChangePlayer = REG_USER_MSG( "ChangePlr", 1 ); |
|
|
|
gmsgCamera = REG_USER_MSG( "Camera", 7 ); |
|
|
|
gmsgCamera = REG_USER_MSG( "Camera", 7 ); |
|
|
|
gmsgSparePlayer = REG_USER_MSG( "SparePlayer", 1 ); |
|
|
|
gmsgSparePlayer = REG_USER_MSG( "SparePlayer", 1 ); |
|
|
|
gmsgAlienState = REG_USER_MSG( "AlienState", 1 ); |
|
|
|
gmsgAlienState = REG_USER_MSG( "AlienState", 1 ); |
|
|
@ -2839,7 +2843,11 @@ void CBasePlayer::Spawn( void ) |
|
|
|
m_iStepLeft = 0; |
|
|
|
m_iStepLeft = 0; |
|
|
|
m_flFieldOfView = 0.5;// some monsters use this to determine whether or not the player is looking at them.
|
|
|
|
m_flFieldOfView = 0.5;// some monsters use this to determine whether or not the player is looking at them.
|
|
|
|
|
|
|
|
|
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
if( g_bIsSlaveCoOp ) |
|
|
|
|
|
|
|
m_bloodColor = BLOOD_COLOR_GREEN; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
|
|
|
|
|
|
|
|
m_flNextAttack = UTIL_WeaponTimeBase(); |
|
|
|
m_flNextAttack = UTIL_WeaponTimeBase(); |
|
|
|
StartSneaking(); |
|
|
|
StartSneaking(); |
|
|
|
|
|
|
|
|
|
|
@ -2852,7 +2860,11 @@ void CBasePlayer::Spawn( void ) |
|
|
|
g_pGameRules->SetDefaultPlayerTeam( this ); |
|
|
|
g_pGameRules->SetDefaultPlayerTeam( this ); |
|
|
|
g_pGameRules->GetPlayerSpawnSpot( this ); |
|
|
|
g_pGameRules->GetPlayerSpawnSpot( this ); |
|
|
|
|
|
|
|
|
|
|
|
SET_MODEL( ENT( pev ), "models/player.mdl" ); |
|
|
|
if( g_bIsSlaveCoOp ) |
|
|
|
|
|
|
|
SET_MODEL( ENT( pev ), "models/player/dm_slave/dm_slave.mdl" ); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SET_MODEL( ENT( pev ), "models/player.mdl" ); |
|
|
|
|
|
|
|
|
|
|
|
g_ulModelIndexPlayer = pev->modelindex; |
|
|
|
g_ulModelIndexPlayer = pev->modelindex; |
|
|
|
pev->sequence = LookupActivity( ACT_IDLE ); |
|
|
|
pev->sequence = LookupActivity( ACT_IDLE ); |
|
|
|
|
|
|
|
|
|
|
@ -2894,6 +2906,50 @@ void CBasePlayer::Spawn( void ) |
|
|
|
pBotCam = NULL; |
|
|
|
pBotCam = NULL; |
|
|
|
// END BOT
|
|
|
|
// END BOT
|
|
|
|
g_pGameRules->PlayerSpawn( this ); |
|
|
|
g_pGameRules->PlayerSpawn( this ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( g_bIsSlaveCoOp ) |
|
|
|
|
|
|
|
SET_CLIENT_KEY_VALUE( entindex(), GET_INFOBUFFER( edict() ), "model", "player/dm_slave/dm_slave" ); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SET_CLIENT_KEY_VALUE( entindex(), GET_INFOBUFFER( edict() ), "model", "ginacol" ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( m_iDecay == 1 ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
SetBodygroup( 1, 1 ); |
|
|
|
|
|
|
|
pev->skin = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if( m_iDecay == 2 ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
SetBodygroup( 1, 0 ); |
|
|
|
|
|
|
|
pev->skin = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SetBodygroup( 0, 0 ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( gmsgChangePlayer ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
MESSAGE_BEGIN( MSG_ONE, gmsgChangePlayer, NULL, pev ); |
|
|
|
|
|
|
|
WRITE_BYTE( m_iDecay ); |
|
|
|
|
|
|
|
MESSAGE_END(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ALERT( at_console, "Message gmsgChangePlayer not found in client!\n" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ALERT( at_console, "(CBasePlayer::Spawn) m_iDecay = %d\n", m_iDecay ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( g_iStartSuit ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( !g_bIsSlaveCoOp ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CBaseEntity *pWeaponEntity; |
|
|
|
|
|
|
|
GiveNamedItem( "item_suit" ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while( ( pWeaponEntity = UTIL_FindEntityByClassname( pWeaponEntity, "game_player_equip" ) ) != NULL ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pWeaponEntity->Touch( this ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CBasePlayer::Precache( void ) |
|
|
|
void CBasePlayer::Precache( void ) |
|
|
@ -2981,7 +3037,10 @@ int CBasePlayer::Restore( CRestore &restore ) |
|
|
|
pev->fixangle = TRUE; // turn this way immediately
|
|
|
|
pev->fixangle = TRUE; // turn this way immediately
|
|
|
|
|
|
|
|
|
|
|
|
// Copied from spawn() for now
|
|
|
|
// Copied from spawn() for now
|
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
if( g_bIsSlaveCoOp ) |
|
|
|
|
|
|
|
m_bloodColor = BLOOD_COLOR_GREEN; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
|
|
|
|
|
|
|
|
g_ulModelIndexPlayer = pev->modelindex; |
|
|
|
g_ulModelIndexPlayer = pev->modelindex; |
|
|
|
|
|
|
|
|
|
|
@ -4636,7 +4695,7 @@ void CDeadHEV::Spawn( void ) |
|
|
|
pev->effects = 0; |
|
|
|
pev->effects = 0; |
|
|
|
pev->yaw_speed = 8; |
|
|
|
pev->yaw_speed = 8; |
|
|
|
pev->sequence = 0; |
|
|
|
pev->sequence = 0; |
|
|
|
pev->body = 1; |
|
|
|
SetBodygroup( 1, 4 ); |
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
m_bloodColor = BLOOD_COLOR_RED; |
|
|
|
|
|
|
|
|
|
|
|
pev->sequence = LookupSequence( m_szPoses[m_iPose] ); |
|
|
|
pev->sequence = LookupSequence( m_szPoses[m_iPose] ); |
|
|
|