Define new network messages.

This commit is contained in:
Night Owl 2018-12-07 19:43:24 +05:00
parent b5847e27bb
commit c8f7a48598
1 changed files with 76 additions and 43 deletions

View File

@ -147,47 +147,63 @@ TYPEDESCRIPTION CBasePlayer::m_playerSaveData[] =
//DEFINE_FIELD( CBasePlayer, m_nCustomSprayFrames, FIELD_INTEGER ), // Don't need to restore //DEFINE_FIELD( CBasePlayer, m_nCustomSprayFrames, FIELD_INTEGER ), // Don't need to restore
}; };
int giPrecacheGrunt = 0; int giPrecacheGrunt;
int gmsgShake = 0; int gmsgShake;
int gmsgFade = 0; int gmsgFade;
int gmsgSelAmmo = 0; int gmsgSelAmmo;
int gmsgFlashlight = 0; int gmsgFlashlight;
int gmsgFlashBattery = 0; int gmsgFlashBattery;
int gmsgResetHUD = 0; int gmsgResetHUD;
int gmsgInitHUD = 0; int gmsgInitHUD;
int gmsgShowGameTitle = 0; int gmsgViewMode;
int gmsgCurWeapon = 0; int gmsgShowGameTitle;
int gmsgHealth = 0; int gmsgCurWeapon;
int gmsgDamage = 0; int gmsgHealth;
int gmsgBattery = 0; int gmsgDamage;
int gmsgTrain = 0; int gmsgBattery;
int gmsgLogo = 0; int gmsgGrenades;
int gmsgWeaponList = 0; int gmsgSetSecAmmoIcon;
int gmsgAmmoX = 0; int gmsgTrain;
int gmsgHudText = 0; int gmsgLogo;
int gmsgDeathMsg = 0; int gmsgWeaponList;
int gmsgScoreInfo = 0; int gmsgAmmoX;
int gmsgTeamInfo = 0; int gmsgHudText;
int gmsgTeamScore = 0; int gmsgDeathMsg;
int gmsgGameMode = 0; int gmsgScoreInfo;
int gmsgMOTD = 0; int gmsgTeamInfo;
int gmsgServerName = 0; int gmsgTeamScore;
int gmsgAmmoPickup = 0; int gmsgGameMode;
int gmsgWeapPickup = 0; int gmsgMOTD;
int gmsgItemPickup = 0; int gmsgServerName;
int gmsgHideWeapon = 0; int gmsgAmmoPickup;
int gmsgSetCurWeap = 0; int gmsgWeapPickup;
int gmsgSayText = 0; int gmsgItemPickup;
int gmsgTextMsg = 0; int gmsgHideWeapon;
int gmsgSetFOV = 0; int gmsgSayText;
int gmsgShowMenu = 0; int gmsgStatusIcon;
int gmsgGeigerRange = 0; int gmsgTextMsg;
int gmsgTeamNames = 0; int gmsgSpecHealth;
int gmsgStatusText;
int gmsgStatusValue;
int gmsgSetFOV;
int gmsgShowMenu;
int gmsgItems;
int gmsgConcuss;
int gmsgSpectator;
int gmsgValidClasses;
int gmsgTeamNames;
int gmsgFeignState;
int gmsgDetpackState;
int gmsgVGUIMenu;
int gmsgBuildState;
int gmsgRandomPC;
int gmsgBench;
int gmsgAllowSpec;
int gmsgSpecFade;
int gmsgResetFade;
int gmsgGeigerRange;
int gmsgBhopcap = 0; int gmsgBhopcap = 0;
int gmsgStatusText = 0;
int gmsgStatusValue = 0;
void LinkUserMessages( void ) void LinkUserMessages( void )
{ {
// Already taken care of? // Already taken care of?
@ -203,15 +219,24 @@ void LinkUserMessages( void )
gmsgFlashBattery = REG_USER_MSG( "FlashBat", 1 ); gmsgFlashBattery = REG_USER_MSG( "FlashBat", 1 );
gmsgHealth = REG_USER_MSG( "Health", 1 ); gmsgHealth = REG_USER_MSG( "Health", 1 );
gmsgDamage = REG_USER_MSG( "Damage", 12 ); gmsgDamage = REG_USER_MSG( "Damage", 12 );
gmsgBattery = REG_USER_MSG( "Battery", 2); gmsgBattery = REG_USER_MSG( "Battery", 4);
gmsgGrenades = REG_USER_MSG( "SecAmmoVal", 2 );
gmsgSetSecAmmoIcon = REG_USER_MSG( "SecAmmoIcon", -1 );
gmsgTrain = REG_USER_MSG( "Train", 1 ); gmsgTrain = REG_USER_MSG( "Train", 1 );
gmsgItems = REG_USER_MSG( "Items", 4 );
gmsgConcuss = REG_USER_MSG( "Concuss", 1 );
//gmsgHudText = REG_USER_MSG( "HudTextPro", -1 ); //gmsgHudText = REG_USER_MSG( "HudTextPro", -1 );
gmsgHudText = REG_USER_MSG( "HudText", -1 ); // we don't use the message but 3rd party addons may! gmsgHudText = REG_USER_MSG( "HudText", -1 ); // we don't use the message but 3rd party addons may!
gmsgSayText = REG_USER_MSG( "SayText", -1 ); gmsgSayText = REG_USER_MSG( "SayText", -1 );
gmsgStatusIcon = REG_USER_MSG("StatusIcon", -1);
gmsgTextMsg = REG_USER_MSG( "TextMsg", -1 ); gmsgTextMsg = REG_USER_MSG( "TextMsg", -1 );
gmsgSpecHealth = REG_USER_MSG("SpecHealth", 1);
gmsgStatusText = REG_USER_MSG( "StatusText", -1 );
gmsgStatusValue = REG_USER_MSG( "StatusValue", 3 );
gmsgWeaponList = REG_USER_MSG( "WeaponList", -1 ); gmsgWeaponList = REG_USER_MSG( "WeaponList", -1 );
gmsgResetHUD = REG_USER_MSG( "ResetHUD", 1 ); // called every respawn gmsgResetHUD = REG_USER_MSG( "ResetHUD", 1 ); // called every respawn
gmsgInitHUD = REG_USER_MSG( "InitHUD", 0 ); // called every time a new player joins the server gmsgInitHUD = REG_USER_MSG( "InitHUD", 0 ); // called every time a new player joins the server
gmsgViewMode = REG_USER_MSG( "ViewMode", 0 );
gmsgShowGameTitle = REG_USER_MSG( "GameTitle", 1 ); gmsgShowGameTitle = REG_USER_MSG( "GameTitle", 1 );
gmsgDeathMsg = REG_USER_MSG( "DeathMsg", -1 ); gmsgDeathMsg = REG_USER_MSG( "DeathMsg", -1 );
gmsgScoreInfo = REG_USER_MSG( "ScoreInfo", 9 ); gmsgScoreInfo = REG_USER_MSG( "ScoreInfo", 9 );
@ -229,11 +254,19 @@ void LinkUserMessages( void )
gmsgShake = REG_USER_MSG( "ScreenShake", sizeof(ScreenShake) ); gmsgShake = REG_USER_MSG( "ScreenShake", sizeof(ScreenShake) );
gmsgFade = REG_USER_MSG( "ScreenFade", sizeof(ScreenFade) ); gmsgFade = REG_USER_MSG( "ScreenFade", sizeof(ScreenFade) );
gmsgAmmoX = REG_USER_MSG( "AmmoX", 2 ); gmsgAmmoX = REG_USER_MSG( "AmmoX", 2 );
gmsgBench = REG_USER_MSG( "Bench", 1 );
gmsgSpectator = REG_USER_MSG( "Spectator", 2 );
gmsgAllowSpec = REG_USER_MSG( "AllowSpec", 1 );
gmsgSpecFade = REG_USER_MSG( "SpecFade", 6 );
gmsgResetFade = REG_USER_MSG( "ResetFade", 0 );
gmsgValidClasses = REG_USER_MSG( "ValClass", 10 );
gmsgTeamNames = REG_USER_MSG( "TeamNames", -1 ); gmsgTeamNames = REG_USER_MSG( "TeamNames", -1 );
gmsgFeignState = REG_USER_MSG( "Feign", 1);
gmsgDetpackState = REG_USER_MSG( "Detpack", 1 );
gmsgVGUIMenu = REG_USER_MSG( "VGUIMenu", -1 );
gmsgBuildState = REG_USER_MSG( "BuildSt", 2 );
gmsgRandomPC = REG_USER_MSG( "RandomPC", 1 );
gmsgBhopcap = REG_USER_MSG( "Bhopcap", 1 ); gmsgBhopcap = REG_USER_MSG( "Bhopcap", 1 );
gmsgStatusText = REG_USER_MSG( "StatusText", -1 );
gmsgStatusValue = REG_USER_MSG( "StatusValue", 3 );
} }
LINK_ENTITY_TO_CLASS( player, CBasePlayer ) LINK_ENTITY_TO_CLASS( player, CBasePlayer )