This commit is contained in:
parent
db76bbd273
commit
f34a27a744
Binary file not shown.
Binary file not shown.
|
@ -5156,7 +5156,10 @@ void C_BaseAnimating::OnDataChanged( DataUpdateType_t updateType )
|
||||||
{
|
{
|
||||||
if ( !cl_disable_ragdolls.GetBool() )
|
if ( !cl_disable_ragdolls.GetBool() )
|
||||||
{
|
{
|
||||||
BecomeRagdollOnClient( );
|
if ( !BecomeRagdollOnClient() )
|
||||||
|
{
|
||||||
|
AddEffects( EF_NODRAW );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5164,7 +5167,7 @@ void C_BaseAnimating::OnDataChanged( DataUpdateType_t updateType )
|
||||||
if ( m_bClientSideRagdoll && m_builtRagdoll == true )
|
if ( m_bClientSideRagdoll && m_builtRagdoll == true )
|
||||||
{
|
{
|
||||||
if ( m_pRagdoll == NULL )
|
if ( m_pRagdoll == NULL )
|
||||||
AddEffects( EF_NODRAW );
|
AddEffects( EF_NODRAW );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_pRagdoll && !m_bClientSideRagdoll || !m_bClientSideRagdoll && m_builtRagdoll )
|
if ( m_pRagdoll && !m_bClientSideRagdoll || !m_bClientSideRagdoll && m_builtRagdoll )
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
extern ConVar asw_controls; // asw, whether to use swarm controls or not
|
extern ConVar asw_controls; // asw, whether to use swarm controls or not
|
||||||
ConVar joy_pan_camera("joy_pan_camera", "0", FCVAR_ARCHIVE);
|
ConVar joy_pan_camera("joy_pan_camera", "0", FCVAR_ARCHIVE);
|
||||||
ConVar asw_ground_secondary("asw_ground_secondary", "1", FCVAR_CHEAT, "Set to 1 to make marines aim grenades at the floor instead of firing them straight");
|
ConVar asw_ground_secondary("asw_ground_secondary", "1", FCVAR_NONE, "Set to 1 to make marines aim grenades at the floor instead of firing them straight");
|
||||||
|
|
||||||
|
|
||||||
static kbutton_t in_holdorder;
|
static kbutton_t in_holdorder;
|
||||||
|
|
|
@ -42,7 +42,7 @@ C_ASW_Medal_Store::C_ASW_Medal_Store()
|
||||||
m_bFoundNewClientDat = false;
|
m_bFoundNewClientDat = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConVar asw_steam_cloud( "asw_steam_cloud", "0", FCVAR_NONE, "Whether Swarm data should be stored in the Steam Cloud" );
|
ConVar asw_steam_cloud( "asw_steam_cloud", "1", FCVAR_NONE, "Whether Swarm data should be stored in the Steam Cloud" );
|
||||||
|
|
||||||
void C_ASW_Medal_Store::LoadMedalStore()
|
void C_ASW_Medal_Store::LoadMedalStore()
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,16 +41,17 @@ C_ClientRagdoll *C_ASW_Client_Corpse::CreateClientRagdoll( bool bRestoring )
|
||||||
|
|
||||||
C_BaseAnimating* C_ASW_Client_Corpse::BecomeRagdollOnClient( void )
|
C_BaseAnimating* C_ASW_Client_Corpse::BecomeRagdollOnClient( void )
|
||||||
{
|
{
|
||||||
if (AlreadyCreatedRagdollFor(entindex()))
|
if ( AlreadyCreatedRagdollFor( entindex() ) )
|
||||||
{
|
{
|
||||||
//m_builtRagdoll = true;
|
//m_builtRagdoll = true;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
C_BaseAnimating* pAnim = BaseClass::BecomeRagdollOnClient();
|
C_BaseAnimating *pAnim = BaseClass::BecomeRagdollOnClient();
|
||||||
|
|
||||||
C_ASW_ClientRagdoll *pClientRagdoll = dynamic_cast<C_ASW_ClientRagdoll*>(pAnim);
|
C_ASW_ClientRagdoll *pClientRagdoll = dynamic_cast<C_ASW_ClientRagdoll*>(pAnim);
|
||||||
if (pClientRagdoll)
|
if (pClientRagdoll)
|
||||||
{
|
{
|
||||||
|
pClientRagdoll->m_iSourceEntityIndex = entindex();
|
||||||
g_ClientRagdolls.AddToTail(pClientRagdoll);
|
g_ClientRagdolls.AddToTail(pClientRagdoll);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "steam/isteamfriends.h"
|
#include "steam/isteamfriends.h"
|
||||||
#include "steam/isteamutils.h"
|
#include "steam/isteamutils.h"
|
||||||
#include "steam/steam_api.h"
|
#include "steam/steam_api.h"
|
||||||
|
#include "matchmaking/imatchframework.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
|
@ -765,3 +766,35 @@ void asw_show_xp_f()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ConCommand asw_show_xp( "asw_show_xp", asw_show_xp_f, "Print local player's XP and level", FCVAR_NONE );
|
ConCommand asw_show_xp( "asw_show_xp", asw_show_xp_f, "Print local player's XP and level", FCVAR_NONE );
|
||||||
|
|
||||||
|
CON_COMMAND( make_game_public, "Changes access for the current game to public." )
|
||||||
|
{
|
||||||
|
if ( !g_pMatchFramework || !g_pMatchFramework->GetMatchSession() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !ASWGameResource() || ASWGameResource()->GetLeader() != C_ASW_Player::GetLocalASWPlayer() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KeyValues *pSettings = new KeyValues( "update" );
|
||||||
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
|
||||||
|
pSettings->SetString( "update/system/access", "public" );
|
||||||
|
|
||||||
|
g_pMatchFramework->GetMatchSession()->UpdateSessionSettings( pSettings );
|
||||||
|
}
|
||||||
|
|
||||||
|
CON_COMMAND( make_game_friends_only, "Changes access for the current game to friends only." )
|
||||||
|
{
|
||||||
|
if ( !g_pMatchFramework || !g_pMatchFramework->GetMatchSession() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !ASWGameResource() || ASWGameResource()->GetLeader() != C_ASW_Player::GetLocalASWPlayer() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
KeyValues *pSettings = new KeyValues( "update" );
|
||||||
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
|
||||||
|
pSettings->SetString( "update/system/access", "friends" );
|
||||||
|
|
||||||
|
g_pMatchFramework->GetMatchSession()->UpdateSessionSettings( pSettings );
|
||||||
|
}
|
|
@ -1031,7 +1031,7 @@ void FoundGames::OnCommand( const char *command )
|
||||||
char const *szGameMode = "campaign";
|
char const *szGameMode = "campaign";
|
||||||
pSettings->SetString( "game/mode", szGameMode );
|
pSettings->SetString( "game/mode", szGameMode );
|
||||||
pSettings->SetString( "game/campaign", "jacob" );
|
pSettings->SetString( "game/campaign", "jacob" );
|
||||||
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01.bsp" );
|
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01" );
|
||||||
|
|
||||||
if ( !CUIGameData::Get()->SignedInToLive() )
|
if ( !CUIGameData::Get()->SignedInToLive() )
|
||||||
{
|
{
|
||||||
|
@ -1707,7 +1707,7 @@ void FoundGames::AddFakeServersToList()
|
||||||
" } "
|
" } "
|
||||||
" game { "
|
" game { "
|
||||||
" mode campaign "
|
" mode campaign "
|
||||||
" campaign jacob.txt "
|
" campaign jacob "
|
||||||
" difficulty normal "
|
" difficulty normal "
|
||||||
" state lobby "
|
" state lobby "
|
||||||
" } "
|
" } "
|
||||||
|
@ -1737,7 +1737,7 @@ void FoundGames::AddFakeServersToList()
|
||||||
fi.mpGameDetails = pDetails;
|
fi.mpGameDetails = pDetails;
|
||||||
|
|
||||||
fi.mpGameDetails->SetInt( "members/numPlayers", 1 + n%3 );
|
fi.mpGameDetails->SetInt( "members/numPlayers", 1 + n%3 );
|
||||||
fi.mpGameDetails->SetString( "game/mission", "asi-jac2-deima.bsp" );
|
fi.mpGameDetails->SetString( "game/mission", "asi-jac2-deima" );
|
||||||
|
|
||||||
char const *szGameModes[] = { "campaign", "single_mission" };
|
char const *szGameModes[] = { "campaign", "single_mission" };
|
||||||
fi.mpGameDetails->SetString( "game/mode", szGameModes[ n % ARRAYSIZE( szGameModes ) ] );
|
fi.mpGameDetails->SetString( "game/mode", szGameModes[ n % ARRAYSIZE( szGameModes ) ] );
|
||||||
|
|
|
@ -421,7 +421,7 @@ void FoundPublicGames::OnCommand( const char *command )
|
||||||
char const *szGameMode = "campaign";
|
char const *szGameMode = "campaign";
|
||||||
pSettings->SetString( "game/mode", szGameMode );
|
pSettings->SetString( "game/mode", szGameMode );
|
||||||
pSettings->SetString( "game/campaign", "jacob" );
|
pSettings->SetString( "game/campaign", "jacob" );
|
||||||
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01.bsp" );
|
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01" );
|
||||||
|
|
||||||
if ( !CUIGameData::Get()->SignedInToLive() )
|
if ( !CUIGameData::Get()->SignedInToLive() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -439,7 +439,9 @@ void GameSettings::OnCommand(const char *command)
|
||||||
);
|
);
|
||||||
KeyValues::AutoDelete autodelete( pSettings );
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
|
||||||
pSettings->SetString( "update/game/mission", szMissionSelected );
|
char stripped[MAX_PATH];
|
||||||
|
V_StripExtension( szMissionSelected, stripped, MAX_PATH );
|
||||||
|
pSettings->SetString( "update/game/mission", stripped );
|
||||||
|
|
||||||
UpdateSessionSettings( pSettings );
|
UpdateSessionSettings( pSettings );
|
||||||
UpdateMissionImage();
|
UpdateMissionImage();
|
||||||
|
@ -457,7 +459,9 @@ void GameSettings::OnCommand(const char *command)
|
||||||
);
|
);
|
||||||
KeyValues::AutoDelete autodelete( pSettings );
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
|
||||||
pSettings->SetString( "update/game/campaign", szCampaignSelected );
|
char stripped[MAX_PATH];
|
||||||
|
V_StripExtension( szCampaignSelected, stripped, MAX_PATH );
|
||||||
|
pSettings->SetString( "update/game/campaign", stripped );
|
||||||
|
|
||||||
// set the current mission to the first real mission in the campaign
|
// set the current mission to the first real mission in the campaign
|
||||||
IASW_Mission_Chooser_Source *pSource = missionchooser ? missionchooser->LocalMissionSource() : NULL;
|
IASW_Mission_Chooser_Source *pSource = missionchooser ? missionchooser->LocalMissionSource() : NULL;
|
||||||
|
|
|
@ -256,8 +256,8 @@ void MainMenu::OnCommand( const char *command )
|
||||||
" } "
|
" } "
|
||||||
" game { "
|
" game { "
|
||||||
" mode single_mission "
|
" mode single_mission "
|
||||||
" campaign jacob.txt "
|
" campaign jacob "
|
||||||
" mission asi-jac1-landingbay_pract.bsp "
|
" mission asi-jac1-landingbay_pract "
|
||||||
" } "
|
" } "
|
||||||
);
|
);
|
||||||
KeyValues::AutoDelete autodelete( pSettings );
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
@ -281,8 +281,8 @@ void MainMenu::OnCommand( const char *command )
|
||||||
" } "
|
" } "
|
||||||
" Game { "
|
" Game { "
|
||||||
" mode campaign "
|
" mode campaign "
|
||||||
" campaign jacob.txt "
|
" campaign jacob "
|
||||||
" mission asi-jac1-landingbay_01.bsp "
|
" mission asi-jac1-landingbay_01 "
|
||||||
" } "
|
" } "
|
||||||
);
|
);
|
||||||
KeyValues::AutoDelete autodelete( pSettings );
|
KeyValues::AutoDelete autodelete( pSettings );
|
||||||
|
@ -698,7 +698,7 @@ void MainMenu::OnCommand( const char *command )
|
||||||
char const *szGameMode = "campaign";
|
char const *szGameMode = "campaign";
|
||||||
pSettings->SetString( "game/mode", szGameMode );
|
pSettings->SetString( "game/mode", szGameMode );
|
||||||
pSettings->SetString( "game/campaign", "jacob" );
|
pSettings->SetString( "game/campaign", "jacob" );
|
||||||
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01.bsp" );
|
pSettings->SetString( "game/mission", "asi-jac1-landingbay_01" );
|
||||||
|
|
||||||
if ( !CUIGameData::Get()->SignedInToLive() )
|
if ( !CUIGameData::Get()->SignedInToLive() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1326,20 +1326,29 @@ void CASW_Hud_Master::PaintText()
|
||||||
{
|
{
|
||||||
// show hotkey for this marine's extra item
|
// show hotkey for this marine's extra item
|
||||||
const char *pszKey = ASW_FindKeyBoundTo( "+grenade1" );
|
const char *pszKey = ASW_FindKeyBoundTo( "+grenade1" );
|
||||||
|
|
||||||
|
if ( pszKey )
|
||||||
|
{
|
||||||
|
wchar_t wszKey[ 12 ];
|
||||||
|
|
||||||
char szKey[ 12 ];
|
wchar_t *pwchKeyName = g_pVGuiLocalize->Find( pszKey );
|
||||||
Q_snprintf( szKey, sizeof(szKey), "%s", pszKey );
|
if ( !pwchKeyName || !pwchKeyName[ 0 ] )
|
||||||
Q_strupr( szKey );
|
{
|
||||||
|
char szKey[ 12 ];
|
||||||
|
Q_snprintf( szKey, sizeof(szKey), "%s", pszKey );
|
||||||
|
Q_strupr( szKey );
|
||||||
|
|
||||||
wchar_t wszKey[ 12 ];
|
g_pVGuiLocalize->ConvertANSIToUnicode( pszKey, wszKey, sizeof( wszKey ) );
|
||||||
g_pVGuiLocalize->ConvertANSIToUnicode( pszKey, wszKey, sizeof( wszKey ) );
|
pwchKeyName = wszKey;
|
||||||
|
}
|
||||||
|
|
||||||
surface()->DrawSetTextColor( m_SquadMate_ExtraItem_hotkey_color );
|
surface()->DrawSetTextColor( m_SquadMate_ExtraItem_hotkey_color );
|
||||||
surface()->DrawSetTextFont( m_hDefaultFont );
|
surface()->DrawSetTextFont( m_hDefaultFont );
|
||||||
surface()->GetTextSize( m_hDefaultFont, wszKey, w, t );
|
surface()->GetTextSize( m_hDefaultFont, pwchKeyName, w, t );
|
||||||
surface()->DrawSetTextPos( m_nExtraItem_hotkey_x + m_nMarinePortrait_x - w,
|
surface()->DrawSetTextPos( m_nExtraItem_hotkey_x + m_nMarinePortrait_x - w,
|
||||||
m_nExtraItem_hotkey_y + m_nMarinePortrait_y );
|
m_nExtraItem_hotkey_y + m_nMarinePortrait_y );
|
||||||
surface()->DrawUnicodeString( wszKey );
|
surface()->DrawUnicodeString( pwchKeyName );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,10 @@ extern ConVar asw_hud_alpha;
|
||||||
extern ConVar asw_hud_scale;
|
extern ConVar asw_hud_scale;
|
||||||
ConVar asw_map_range("asw_map_range", "1200", FCVAR_CHEAT, "Range in world units of the minimap");
|
ConVar asw_map_range("asw_map_range", "1200", FCVAR_CHEAT, "Range in world units of the minimap");
|
||||||
ConVar asw_scanner_ring_scale("asw_scanner_ring_scale", "1.0f", FCVAR_CHEAT, "Overdraw in the scanner ring size from the blip boundary");
|
ConVar asw_scanner_ring_scale("asw_scanner_ring_scale", "1.0f", FCVAR_CHEAT, "Overdraw in the scanner ring size from the blip boundary");
|
||||||
ConVar asw_scanner_pitch_change("asw_scanner_pitch_change", "0.2f", FCVAR_CHEAT, "Change in pitch (from 0 to 1.0) of scanner blips depending on distance from the tech marine");
|
ConVar asw_scanner_pitch_change("asw_scanner_pitch_change", "0.2f", FCVAR_NONE, "Change in pitch (from 0 to 1.0) of scanner blips depending on distance from the tech marine");
|
||||||
ConVar asw_scanner_pitch_base("asw_scanner_pitch_base", "1.2f", FCVAR_CHEAT, "Starting pitch");
|
ConVar asw_scanner_pitch_base("asw_scanner_pitch_base", "1.2f", FCVAR_NONE, "Starting pitch");
|
||||||
ConVar asw_scanner_warning_volume("asw_scanner_warning_volume", "0.3f", FCVAR_CHEAT, "Volume of scanner warning beeps");
|
ConVar asw_scanner_warning_volume("asw_scanner_warning_volume", "0.3f", FCVAR_NONE, "Volume of scanner warning beeps");
|
||||||
ConVar asw_scanner_idle_volume("asw_scanner_idle_volume", "0.4f", FCVAR_CHEAT, "Volume of scanner idle loop");
|
ConVar asw_scanner_idle_volume("asw_scanner_idle_volume", "0.4f", FCVAR_NONE, "Volume of scanner idle loop");
|
||||||
ConVar asw_scanner_scanline_alpha("asw_scanner_scanline_alpha", "80", 0, "Alpha of scanlines on the scanner");
|
ConVar asw_scanner_scanline_alpha("asw_scanner_scanline_alpha", "80", 0, "Alpha of scanlines on the scanner");
|
||||||
ConVar asw_scanner_scanline_double("asw_scanner_scanline_double", "0", 0, "Whether scanlines should be single or double pixel");
|
ConVar asw_scanner_scanline_double("asw_scanner_scanline_double", "0", 0, "Whether scanlines should be single or double pixel");
|
||||||
ConVar asw_scanner_interlace_alpha("asw_scanner_interlace_alpha", "0", 0, "Alpha of interlace effect on the scanner");
|
ConVar asw_scanner_interlace_alpha("asw_scanner_interlace_alpha", "0", 0, "Alpha of interlace effect on the scanner");
|
||||||
|
@ -962,7 +962,7 @@ void CASWHudMinimapLinePanel::PaintScannerRing()
|
||||||
|
|
||||||
pMR->m_iScannerSoundSkip = 0;
|
pMR->m_iScannerSoundSkip = 0;
|
||||||
|
|
||||||
if ( gpGlobals->curtime < m_pMap->m_fLastBlipHitTime + 3.0f )
|
if ( asw_scanner_classic.GetBool() || gpGlobals->curtime < m_pMap->m_fLastBlipHitTime + 3.0f )
|
||||||
{
|
{
|
||||||
CLocalPlayerFilter filter;
|
CLocalPlayerFilter filter;
|
||||||
EmitSound_t ep;
|
EmitSound_t ep;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "con_nprint.h"
|
#include "con_nprint.h"
|
||||||
#include "saverestoretypes.h"
|
#include "saverestoretypes.h"
|
||||||
#include "c_rumble.h"
|
#include "c_rumble.h"
|
||||||
|
#include "prediction.h"
|
||||||
|
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
||||||
|
@ -231,6 +232,9 @@ void __MsgFunc_Shake( bf_read &msg )
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void __MsgFunc_ShakeDir( bf_read &msg )
|
void __MsgFunc_ShakeDir( bf_read &msg )
|
||||||
{
|
{
|
||||||
|
if ( prediction && prediction->InPrediction() && !prediction->IsFirstTimePredicted() )
|
||||||
|
return;
|
||||||
|
|
||||||
ScreenShake_t shake;
|
ScreenShake_t shake;
|
||||||
|
|
||||||
shake.command = (ShakeCommand_t)msg.ReadByte();
|
shake.command = (ShakeCommand_t)msg.ReadByte();
|
||||||
|
@ -690,6 +694,9 @@ screenshake_t *CViewEffects::FindLongestShake()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CViewEffects::Shake( const ScreenShake_t &data )
|
void CViewEffects::Shake( const ScreenShake_t &data )
|
||||||
{
|
{
|
||||||
|
if ( prediction && prediction->InPrediction() && !prediction->IsFirstTimePredicted() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( ( data.command == SHAKE_START || data.command == SHAKE_START_RUMBLEONLY ) && ( m_ShakeList.Count() < MAX_SHAKES ) )
|
if ( ( data.command == SHAKE_START || data.command == SHAKE_START_RUMBLEONLY ) && ( m_ShakeList.Count() < MAX_SHAKES ) )
|
||||||
{
|
{
|
||||||
screenshake_t * RESTRICT pNewShake = new screenshake_t; // ugh, should just make these a static array
|
screenshake_t * RESTRICT pNewShake = new screenshake_t; // ugh, should just make these a static array
|
||||||
|
|
|
@ -149,10 +149,13 @@ void CASW_Ammo_Drop::ActivateUseIcon( CASW_Marine* pMarine, int nHoldType )
|
||||||
|
|
||||||
CASW_Marine *pDeployer = m_hDeployer.Get();
|
CASW_Marine *pDeployer = m_hDeployer.Get();
|
||||||
|
|
||||||
if ( pDeployer && pMarine != pDeployer && m_bSuppliedAmmo )
|
if ( pDeployer && pMarine != pDeployer && !m_bSuppliedAmmo )
|
||||||
{
|
{
|
||||||
m_bSuppliedAmmo = true;
|
m_bSuppliedAmmo = true;
|
||||||
pDeployer->GetCommander()->AwardAchievement( ACHIEVEMENT_ASW_AMMO_RESUPPLY );
|
if ( pDeployer->GetCommander() )
|
||||||
|
{
|
||||||
|
pDeployer->GetCommander()->AwardAchievement( ACHIEVEMENT_ASW_AMMO_RESUPPLY );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -374,7 +374,7 @@ ConVar asw_marine_ff("asw_marine_ff", "1", FCVAR_CHEAT, "Marine friendly fire se
|
||||||
ConVar asw_marine_ff_guard_time("asw_marine_ff_guard_time", "5.0", FCVAR_CHEAT, "Amount of time firing is disabled for when activating friendly fire guard");
|
ConVar asw_marine_ff_guard_time("asw_marine_ff_guard_time", "5.0", FCVAR_CHEAT, "Amount of time firing is disabled for when activating friendly fire guard");
|
||||||
ConVar asw_marine_ff_dmg_base("asw_marine_ff_dmg_base", "1.0", FCVAR_CHEAT, "Amount of friendly fire damage on mission difficulty 5");
|
ConVar asw_marine_ff_dmg_base("asw_marine_ff_dmg_base", "1.0", FCVAR_CHEAT, "Amount of friendly fire damage on mission difficulty 5");
|
||||||
ConVar asw_marine_ff_dmg_step("asw_marine_ff_dmg_step", "0.2", FCVAR_CHEAT, "Amount friendly fire damage is modified per mission difficuly level away from 5");
|
ConVar asw_marine_ff_dmg_step("asw_marine_ff_dmg_step", "0.2", FCVAR_CHEAT, "Amount friendly fire damage is modified per mission difficuly level away from 5");
|
||||||
ConVar asw_marine_ff_absorption("asw_marine_ff_absorption", "1", FCVAR_CHEAT, "Friendly fire absorption style (0=none 1=ramp up 2=ramp down)");
|
ConVar asw_marine_ff_absorption("asw_marine_ff_absorption", "1", FCVAR_NONE, "Friendly fire absorption style (0=none 1=ramp up 2=ramp down)");
|
||||||
ConVar asw_marine_ff_absorption_decay_rate("asw_marine_ff_absorption_decay_rate", "0.33f", FCVAR_CHEAT, "Rate of FF absorption decay");
|
ConVar asw_marine_ff_absorption_decay_rate("asw_marine_ff_absorption_decay_rate", "0.33f", FCVAR_CHEAT, "Rate of FF absorption decay");
|
||||||
ConVar asw_marine_ff_absorption_build_rate("asw_marine_ff_absorption_build_rate", "0.25f", FCVAR_CHEAT, "Rate of FF absorption decay build up when being shot by friendlies");
|
ConVar asw_marine_ff_absorption_build_rate("asw_marine_ff_absorption_build_rate", "0.25f", FCVAR_CHEAT, "Rate of FF absorption decay build up when being shot by friendlies");
|
||||||
ConVar asw_marine_burn_time_easy("asw_marine_burn_time_easy", "6", FCVAR_CHEAT, "Amount of time marine burns for when ignited on easy difficulty");
|
ConVar asw_marine_burn_time_easy("asw_marine_burn_time_easy", "6", FCVAR_CHEAT, "Amount of time marine burns for when ignited on easy difficulty");
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "asw_shareddefs.h"
|
#include "asw_shareddefs.h"
|
||||||
#include "asw_gamerules.h"
|
#include "asw_gamerules.h"
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
|
#include "c_asw_game_resource.h"
|
||||||
#include "c_asw_marine.h"
|
#include "c_asw_marine.h"
|
||||||
#include "c_asw_player.h"
|
#include "c_asw_player.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,6 +16,23 @@ CASW_Achievement_Manager g_ASW_AchievementMgr; // global achievement manager for
|
||||||
CASW_Achievement_Manager* ASWAchievementManager() { return &g_ASW_AchievementMgr; }
|
CASW_Achievement_Manager* ASWAchievementManager() { return &g_ASW_AchievementMgr; }
|
||||||
|
|
||||||
|
|
||||||
|
bool LocalPlayerWasSpectating( void )
|
||||||
|
{
|
||||||
|
C_ASW_Game_Resource *pGameResource = ASWGameResource();
|
||||||
|
if ( !pGameResource )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
C_ASW_Player *pLocalPlayer = static_cast< C_ASW_Player* >( C_BasePlayer::GetLocalPlayer() );
|
||||||
|
if ( !pLocalPlayer )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ( pGameResource->GetNumMarines( pLocalPlayer ) <= 0 )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CASW_Achievement_Manager::CASW_Achievement_Manager()
|
CASW_Achievement_Manager::CASW_Achievement_Manager()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -328,6 +346,9 @@ class CAchievement_Easy_Campaign : public CASW_Achievement
|
||||||
{
|
{
|
||||||
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 1 )
|
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 1 )
|
||||||
{
|
{
|
||||||
|
if ( LocalPlayerWasSpectating() )
|
||||||
|
return;
|
||||||
|
|
||||||
const char *szMapName = event->GetString( "strMapName" );
|
const char *szMapName = event->GetString( "strMapName" );
|
||||||
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
||||||
{
|
{
|
||||||
|
@ -360,6 +381,9 @@ class CAchievement_Normal_Campaign : public CASW_Achievement
|
||||||
{
|
{
|
||||||
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 2 )
|
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 2 )
|
||||||
{
|
{
|
||||||
|
if ( LocalPlayerWasSpectating() )
|
||||||
|
return;
|
||||||
|
|
||||||
const char *szMapName = event->GetString( "strMapName" );
|
const char *szMapName = event->GetString( "strMapName" );
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
Msg( "Mission success: %s\n", szMapName );
|
Msg( "Mission success: %s\n", szMapName );
|
||||||
|
@ -398,6 +422,9 @@ class CAchievement_Hard_Campaign : public CASW_Achievement
|
||||||
{
|
{
|
||||||
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 3 )
|
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 3 )
|
||||||
{
|
{
|
||||||
|
if ( LocalPlayerWasSpectating() )
|
||||||
|
return;
|
||||||
|
|
||||||
const char *szMapName = event->GetString( "strMapName" );
|
const char *szMapName = event->GetString( "strMapName" );
|
||||||
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
||||||
{
|
{
|
||||||
|
@ -430,6 +457,9 @@ class CAchievement_Insane_Campaign : public CASW_Achievement
|
||||||
{
|
{
|
||||||
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 4 )
|
if ( !Q_stricmp( event->GetName(), "mission_success" ) && ASWGameRules() && ASWGameRules()->GetSkillLevel() >= 4 )
|
||||||
{
|
{
|
||||||
|
if ( LocalPlayerWasSpectating() )
|
||||||
|
return;
|
||||||
|
|
||||||
const char *szMapName = event->GetString( "strMapName" );
|
const char *szMapName = event->GetString( "strMapName" );
|
||||||
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
||||||
{
|
{
|
||||||
|
@ -1029,9 +1059,17 @@ class CAchievement_Para_Hat : public CASW_Achievement
|
||||||
{
|
{
|
||||||
if ( !Q_stricmp( event->GetName(), "mission_success" ) )
|
if ( !Q_stricmp( event->GetName(), "mission_success" ) )
|
||||||
{
|
{
|
||||||
if ( ASWGameRules() && !ASWGameRules()->IsOfflineGame() )
|
if ( LocalPlayerWasSpectating() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
const char *szMapName = event->GetString( "strMapName" );
|
||||||
|
for ( int i = 0; i < NELEMS( g_szAchievementMapNames ); i++ )
|
||||||
{
|
{
|
||||||
IncrementCount();
|
if ( !Q_stricmp( szMapName, g_szAchievementMapNames[i] ) )
|
||||||
|
{
|
||||||
|
IncrementCount();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "shake.h"
|
#include "shake.h"
|
||||||
#include "ivieweffects.h"
|
#include "ivieweffects.h"
|
||||||
#include "asw_input.h"
|
#include "asw_input.h"
|
||||||
|
#include "prediction.h"
|
||||||
#define CASW_Player C_ASW_Player
|
#define CASW_Player C_ASW_Player
|
||||||
#define CASW_Marine C_ASW_Marine
|
#define CASW_Marine C_ASW_Marine
|
||||||
#define CASW_Game_Resource C_ASW_Game_Resource
|
#define CASW_Game_Resource C_ASW_Game_Resource
|
||||||
|
@ -264,8 +265,22 @@ void CASW_Melee_System::ProcessMovement( CASW_Marine *pMarine, CMoveData *pMoveD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CASW_Melee_Attack *pAttack = pMarine->GetCurrentMeleeAttack();
|
CASW_Melee_Attack *pAttack = pMarine->GetCurrentMeleeAttack();
|
||||||
bool bStumbling = ( pAttack && ( !Q_stricmp( pAttack->m_szAttackName, "StumbleForward" ) || !Q_stricmp( pAttack->m_szAttackName, "StumbleRightward" ) || !Q_stricmp( pAttack->m_szAttackName, "StumbleBackward" ) || !Q_stricmp( pAttack->m_szAttackName, "StumbleLeftward" ) ) );
|
bool bStumbling = ( pAttack &&
|
||||||
if ( !bStumbling && pASWMove->m_iForcedAction != 0 )
|
( !Q_stricmp( pAttack->m_szAttackName, "StumbleForward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleRightward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleBackward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleLeftward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleShortForward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleShortRightward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleShortLeftward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "StumbleShortBackward" )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
bool bKnockedDown = ( pAttack &&
|
||||||
|
( !Q_stricmp( pAttack->m_szAttackName, "KnockdownForward" ) ||
|
||||||
|
!Q_stricmp( pAttack->m_szAttackName, "KnockdownBackward" ) ) );
|
||||||
|
bool bTryForcedAction = ( !bKnockedDown && ( !bStumbling || pASWMove->m_iForcedAction == FORCED_ACTION_KNOCKDOWN_FORWARD || pASWMove->m_iForcedAction == FORCED_ACTION_KNOCKDOWN_BACKWARD ) );
|
||||||
|
if ( bTryForcedAction && pASWMove->m_iForcedAction != 0 )
|
||||||
{
|
{
|
||||||
if ( pMarine->CanDoForcedAction( pASWMove->m_iForcedAction ) )
|
if ( pMarine->CanDoForcedAction( pASWMove->m_iForcedAction ) )
|
||||||
{
|
{
|
||||||
|
@ -322,7 +337,16 @@ void CASW_Melee_System::ProcessMovement( CASW_Marine *pMarine, CMoveData *pMoveD
|
||||||
}
|
}
|
||||||
|
|
||||||
//HACK_GETLOCALPLAYER_GUARD( "ASW_ShakeAnimEvent" );
|
//HACK_GETLOCALPLAYER_GUARD( "ASW_ShakeAnimEvent" );
|
||||||
GetViewEffects()->Shake( shake );
|
|
||||||
|
static float s_flLastShakeTime = 0.0f;
|
||||||
|
if ( Plat_FloatTime() > s_flLastShakeTime + 3.0f )
|
||||||
|
{
|
||||||
|
if ( !( prediction && prediction->InPrediction() && !prediction->IsFirstTimePredicted() ) )
|
||||||
|
{
|
||||||
|
GetViewEffects()->Shake( shake );
|
||||||
|
}
|
||||||
|
s_flLastShakeTime = Plat_FloatTime();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
StartMeleeAttack( pAttack, pMarine, pMoveData );
|
StartMeleeAttack( pAttack, pMarine, pMoveData );
|
||||||
|
|
||||||
|
|
|
@ -189,8 +189,11 @@ void CASW_Player::CalculateEarnedXP()
|
||||||
|
|
||||||
if ( ASWGameRules() && ASWGameRules()->m_bCheated.Get() )
|
if ( ASWGameRules() && ASWGameRules()->m_bCheated.Get() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
|
if ( engine->IsPlayingDemo() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() )
|
if ( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() )
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "clientmode_asw.h"
|
#include "clientmode_asw.h"
|
||||||
#include "engine/IVDebugOverlay.h"
|
#include "engine/IVDebugOverlay.h"
|
||||||
#include "c_user_message_register.h"
|
#include "c_user_message_register.h"
|
||||||
|
#include "prediction.h"
|
||||||
#define CASW_Marine C_ASW_Marine
|
#define CASW_Marine C_ASW_Marine
|
||||||
#define CASW_Game_Resource C_ASW_Game_Resource
|
#define CASW_Game_Resource C_ASW_Game_Resource
|
||||||
#define CASW_Marine_Resource C_ASW_Marine_Resource
|
#define CASW_Marine_Resource C_ASW_Marine_Resource
|
||||||
|
@ -264,7 +265,10 @@ void ASW_TransmitShakeEvent( CBasePlayer *pPlayer, const ScreenShake_t &shake )
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
ASW_WriteScreenShakeToMessage( pPlayer, shake.command, shake.amplitude, shake.frequency, shake.duration, shake.direction );
|
ASW_WriteScreenShakeToMessage( pPlayer, shake.command, shake.amplitude, shake.frequency, shake.duration, shake.direction );
|
||||||
#else
|
#else
|
||||||
GetViewEffects()->Shake( shake );
|
if ( !( prediction && prediction->InPrediction() && !prediction->IsFirstTimePredicted() ) )
|
||||||
|
{
|
||||||
|
GetViewEffects()->Shake( shake );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@ public:
|
||||||
virtual bool OffhandActivate();
|
virtual bool OffhandActivate();
|
||||||
void DeployAmmoDrop();
|
void DeployAmmoDrop();
|
||||||
|
|
||||||
|
virtual bool UsesClipsForAmmo1( void ) const { return false; }
|
||||||
|
|
||||||
#ifndef CLIENT_DLL
|
#ifndef CLIENT_DLL
|
||||||
DECLARE_DATADESC();
|
DECLARE_DATADESC();
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "c_asw_marine.h"
|
#include "c_asw_marine.h"
|
||||||
#include "ivieweffects.h"
|
#include "ivieweffects.h"
|
||||||
#include "c_te_effect_dispatch.h"
|
#include "c_te_effect_dispatch.h"
|
||||||
|
#include "prediction.h"
|
||||||
#include "fx.h"
|
#include "fx.h"
|
||||||
#define CASW_Player C_ASW_Player
|
#define CASW_Player C_ASW_Player
|
||||||
#define CASW_Marine C_ASW_Marine
|
#define CASW_Marine C_ASW_Marine
|
||||||
|
@ -718,20 +719,23 @@ void CASW_Weapon_Chainsaw::AdjustChainsawPitch()
|
||||||
flTransitionRate = asw_chainsaw_pitch_bite_rate.GetFloat();
|
flTransitionRate = asw_chainsaw_pitch_bite_rate.GetFloat();
|
||||||
|
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
// move this somewhere else....
|
if ( !( prediction && prediction->InPrediction() && !prediction->IsFirstTimePredicted() ) )
|
||||||
ScreenShake_t shake;
|
{
|
||||||
shake.command = SHAKE_STOP;
|
// move this somewhere else....
|
||||||
shake.amplitude = 0;
|
ScreenShake_t shake;
|
||||||
|
shake.command = SHAKE_STOP;
|
||||||
|
shake.amplitude = 0;
|
||||||
|
|
||||||
HACK_GETLOCALPLAYER_GUARD( "ASW_AdjustChainsawPitch" );
|
HACK_GETLOCALPLAYER_GUARD( "ASW_AdjustChainsawPitch" );
|
||||||
GetViewEffects()->Shake( shake );
|
GetViewEffects()->Shake( shake );
|
||||||
|
|
||||||
shake.command = SHAKE_START;
|
shake.command = SHAKE_START;
|
||||||
shake.amplitude = asw_chainsaw_shake_amplitude.GetFloat();
|
shake.amplitude = asw_chainsaw_shake_amplitude.GetFloat();
|
||||||
shake.frequency = asw_chainsaw_shake_frequency.GetFloat();
|
shake.frequency = asw_chainsaw_shake_frequency.GetFloat();
|
||||||
shake.duration = asw_chainsaw_shake_duration.GetFloat();
|
shake.duration = asw_chainsaw_shake_duration.GetFloat();
|
||||||
|
|
||||||
GetViewEffects()->Shake( shake );
|
GetViewEffects()->Shake( shake );
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,11 +190,29 @@ void CASW_Weapon_Welder::WeldDoor(bool bSeal)
|
||||||
//Msg( "Couldn't find door to weld\n" );
|
//Msg( "Couldn't find door to weld\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( pMarine->GetActiveWeapon() != this )
|
||||||
|
{
|
||||||
|
bool bAttack1, bAttack2, bReload, bOldReload, bOldAttack1;
|
||||||
|
GetButtons( bAttack1, bAttack2, bReload, bOldReload, bOldAttack1 );
|
||||||
|
|
||||||
|
if ( bAttack1 || bAttack2 || bReload || pMarine->GetCurrentMeleeAttack() )
|
||||||
|
{
|
||||||
|
bWelding = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !bWelding )
|
if ( !bWelding )
|
||||||
{
|
{
|
||||||
m_iAutomaticWeldDirection = 0;
|
m_iAutomaticWeldDirection = 0;
|
||||||
m_bShotDelayed = false;
|
m_bShotDelayed = false;
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
|
if ( pMarine->GetMarineResource() )
|
||||||
|
{
|
||||||
|
pMarine->GetMarineResource()->m_hWeldingDoor = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_pWeldDoor = NULL;
|
||||||
|
|
||||||
pMarine->OnWeldFinished();
|
pMarine->OnWeldFinished();
|
||||||
#endif
|
#endif
|
||||||
m_bIsFiring = false;
|
m_bIsFiring = false;
|
||||||
|
@ -230,6 +248,8 @@ void CASW_Weapon_Welder::ItemPostFrame()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pWeldDoor = NULL;
|
m_pWeldDoor = NULL;
|
||||||
|
|
||||||
|
pMarine->OnWeldFinished();
|
||||||
//Msg( "Clearing weld door as no marine\n" );
|
//Msg( "Clearing weld door as no marine\n" );
|
||||||
}
|
}
|
||||||
return BaseItemPostFrame();
|
return BaseItemPostFrame();
|
||||||
|
@ -291,6 +311,10 @@ void CASW_Weapon_Welder::ItemPostFrame()
|
||||||
{
|
{
|
||||||
m_bShotDelayed = false;
|
m_bShotDelayed = false;
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
|
if ( pMarine->GetMarineResource() )
|
||||||
|
{
|
||||||
|
pMarine->GetMarineResource()->m_hWeldingDoor = NULL;
|
||||||
|
}
|
||||||
m_pWeldDoor = NULL;
|
m_pWeldDoor = NULL;
|
||||||
pMarine->OnWeldFinished();
|
pMarine->OnWeldFinished();
|
||||||
#endif
|
#endif
|
||||||
|
@ -303,6 +327,10 @@ void CASW_Weapon_Welder::ItemPostFrame()
|
||||||
{
|
{
|
||||||
m_bShotDelayed = false;
|
m_bShotDelayed = false;
|
||||||
#ifdef GAME_DLL
|
#ifdef GAME_DLL
|
||||||
|
if ( pMarine->GetMarineResource() )
|
||||||
|
{
|
||||||
|
pMarine->GetMarineResource()->m_hWeldingDoor = NULL;
|
||||||
|
}
|
||||||
m_pWeldDoor = NULL;
|
m_pWeldDoor = NULL;
|
||||||
pMarine->OnWeldFinished();
|
pMarine->OnWeldFinished();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,6 +32,9 @@ public:
|
||||||
|
|
||||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION003"
|
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION003"
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -41,5 +44,6 @@ struct DlcInstalled_t
|
||||||
AppId_t m_nAppID; // AppID of the DLC
|
AppId_t m_nAppID; // AppID of the DLC
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMAPPS_H
|
#endif // ISTEAMAPPS_H
|
||||||
|
|
|
@ -75,6 +75,7 @@ enum EAvatarSize
|
||||||
|
|
||||||
|
|
||||||
// friend game played information
|
// friend game played information
|
||||||
|
#pragma pack( push, 8 )
|
||||||
struct FriendGameInfo_t
|
struct FriendGameInfo_t
|
||||||
{
|
{
|
||||||
CGameID m_gameID;
|
CGameID m_gameID;
|
||||||
|
@ -83,6 +84,7 @@ struct FriendGameInfo_t
|
||||||
uint16 m_usQueryPort;
|
uint16 m_usQueryPort;
|
||||||
CSteamID m_steamIDLobby;
|
CSteamID m_steamIDLobby;
|
||||||
};
|
};
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
|
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
|
||||||
|
@ -156,6 +158,7 @@ public:
|
||||||
virtual int GetClanCount() = 0;
|
virtual int GetClanCount() = 0;
|
||||||
virtual CSteamID GetClanByIndex( int iClan ) = 0;
|
virtual CSteamID GetClanByIndex( int iClan ) = 0;
|
||||||
virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
|
virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
|
||||||
|
virtual const char *GetClanTag( CSteamID steamIDClan ) = 0;
|
||||||
|
|
||||||
// iterators for getting users in a chat room, lobby, game server or clan
|
// iterators for getting users in a chat room, lobby, game server or clan
|
||||||
// note that large clans that cannot be iterated by the local user
|
// note that large clans that cannot be iterated by the local user
|
||||||
|
@ -177,6 +180,8 @@ public:
|
||||||
// valid options are
|
// valid options are
|
||||||
// "steamid" - opens the overlay web browser to the specified user or groups profile
|
// "steamid" - opens the overlay web browser to the specified user or groups profile
|
||||||
// "chat" - opens a chat window to the specified user, or joins the group chat
|
// "chat" - opens a chat window to the specified user, or joins the group chat
|
||||||
|
// "stats" - opens the overlay web browser to the specified user's stats
|
||||||
|
// "achievements" - opens the overlay web browser to the specified user's achievements
|
||||||
virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0;
|
virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0;
|
||||||
|
|
||||||
// activates game overlay web browser directly to the specified URL
|
// activates game overlay web browser directly to the specified URL
|
||||||
|
@ -185,9 +190,20 @@ public:
|
||||||
|
|
||||||
// activates game overlay to store page for app
|
// activates game overlay to store page for app
|
||||||
virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0;
|
virtual void ActivateGameOverlayToStore( AppId_t nAppID ) = 0;
|
||||||
|
|
||||||
|
// Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is
|
||||||
|
// in game
|
||||||
|
virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0;
|
||||||
|
|
||||||
|
// activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.
|
||||||
|
// You can also use ActivateGameOverlay( "LobbyInvite" ) to allow the user to create invitations for their current public lobby.
|
||||||
|
virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends005"
|
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends006"
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: called when a friends' status changes
|
// Purpose: called when a friends' status changes
|
||||||
|
@ -253,5 +269,6 @@ struct GameLobbyJoinRequested_t
|
||||||
CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
|
CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMFRIENDS_H
|
#endif // ISTEAMFRIENDS_H
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
|
||||||
//
|
//
|
||||||
// Purpose: interface to steam for game servers
|
// Purpose: interface to steam for game servers
|
||||||
//
|
//
|
||||||
|
@ -84,9 +84,9 @@ public:
|
||||||
// This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now).
|
// This can be called if spectator goes away or comes back (passing 0 means there is no spectator server now).
|
||||||
virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0;
|
virtual void UpdateSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||||
|
|
||||||
// Sets a string defining the "gametype" for this server, this is optional, but if it is set
|
// Sets a string defining the "gametags" for this server, this is optional, but if it is set
|
||||||
// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||||
virtual void SetGameType( const char *pchGameType ) = 0;
|
virtual void SetGameTags( const char *pchGameTags ) = 0;
|
||||||
|
|
||||||
// Ask for the gameplay stats for the server. Results returned in a callback
|
// Ask for the gameplay stats for the server. Results returned in a callback
|
||||||
virtual void GetGameplayStats( ) = 0;
|
virtual void GetGameplayStats( ) = 0;
|
||||||
|
@ -131,6 +131,7 @@ const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master
|
||||||
|
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
|
|
||||||
// client has been approved to connect to this game server
|
// client has been approved to connect to this game server
|
||||||
|
@ -220,4 +221,6 @@ struct GSReputation_t
|
||||||
uint32 m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970)
|
uint32 m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMGAMESERVER_H
|
#endif // ISTEAMGAMESERVER_H
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//====== Copyright © Valve Corporation, All rights reserved. ==================
|
//====== Copyright © Valve Corporation, All rights reserved. =======
|
||||||
//
|
//
|
||||||
// Purpose: interface for game servers to steam stats and achievements
|
// Purpose: interface for game servers to steam stats and achievements
|
||||||
//
|
//
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
#include "isteamclient.h"
|
#include "isteamclient.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: interface for game servers to Steam users stats and achievements
|
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class ISteamGameServerStats
|
class ISteamGameServerStats
|
||||||
{
|
{
|
||||||
|
@ -53,6 +53,7 @@ public:
|
||||||
#define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001"
|
#define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001"
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: called when the latests stats and achievements have been received
|
// Purpose: called when the latests stats and achievements have been received
|
||||||
|
@ -86,7 +87,7 @@ struct GSStatsUnloaded_t
|
||||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
#endif // ISTEAMGAMESERVERSTATS_H
|
#endif // ISTEAMGAMESERVERSTATS_H
|
||||||
|
|
|
@ -469,7 +469,7 @@ enum EChatMemberStateChange
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
|
// Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system)
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: a server was added/removed from the favorites list, you should refresh now
|
// Purpose: a server was added/removed from the favorites list, you should refresh now
|
||||||
|
@ -627,7 +627,7 @@ struct LobbyCreated_t
|
||||||
|
|
||||||
// used by now obsolete RequestFriendsLobbiesResponse_t
|
// used by now obsolete RequestFriendsLobbiesResponse_t
|
||||||
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 };
|
// enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 };
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,8 @@ enum EP2PSessionError
|
||||||
k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running
|
k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running
|
||||||
k_EP2PSessionErrorDestinationNotLoggedIn = 3, // target user isn't connected to Steam
|
k_EP2PSessionErrorDestinationNotLoggedIn = 3, // target user isn't connected to Steam
|
||||||
k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser()
|
k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser()
|
||||||
|
// corporate firewalls can also block this (NAT traversal is not firewall traversal)
|
||||||
|
// make sure that UDP ports 3478, 4379, and 4380 are open in an outbound direction
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,6 +58,7 @@ enum EP2PSend
|
||||||
|
|
||||||
// connection state to a specified user, returned by GetP2PSessionState()
|
// connection state to a specified user, returned by GetP2PSessionState()
|
||||||
// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
|
// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
|
||||||
|
#pragma pack( push, 8 )
|
||||||
struct P2PSessionState_t
|
struct P2PSessionState_t
|
||||||
{
|
{
|
||||||
uint8 m_bConnectionActive; // true if we've got an active open connection
|
uint8 m_bConnectionActive; // true if we've got an active open connection
|
||||||
|
@ -67,6 +70,7 @@ struct P2PSessionState_t
|
||||||
uint32 m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server.
|
uint32 m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server.
|
||||||
uint16 m_nRemotePort; // Only exists for compatibility with older authentication api's
|
uint16 m_nRemotePort; // Only exists for compatibility with older authentication api's
|
||||||
};
|
};
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
// handle to a socket
|
// handle to a socket
|
||||||
|
@ -235,6 +239,8 @@ public:
|
||||||
};
|
};
|
||||||
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking003"
|
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking003"
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
|
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
|
||||||
// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
|
// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
|
||||||
|
@ -267,5 +273,6 @@ struct SocketStatusCallback_t
|
||||||
int m_eSNetSocketState; // socket state, ESNetSocketState
|
int m_eSNetSocketState; // socket state, ESNetSocketState
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMNETWORKING
|
#endif // ISTEAMNETWORKING
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
// structure that contains client callback data
|
// structure that contains client callback data
|
||||||
// see callbacks documentation for more details
|
// see callbacks documentation for more details
|
||||||
|
#pragma pack( push, 8 )
|
||||||
struct CallbackMsg_t
|
struct CallbackMsg_t
|
||||||
{
|
{
|
||||||
HSteamUser m_hSteamUser;
|
HSteamUser m_hSteamUser;
|
||||||
|
@ -21,6 +22,7 @@ struct CallbackMsg_t
|
||||||
uint8 *m_pubParam;
|
uint8 *m_pubParam;
|
||||||
int m_cubParam;
|
int m_cubParam;
|
||||||
};
|
};
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
// reference to a steam call, to filter results by
|
// reference to a steam call, to filter results by
|
||||||
typedef int32 HSteamCall;
|
typedef int32 HSteamCall;
|
||||||
|
@ -131,7 +133,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: called when a connections to the Steam back-end has been established
|
// Purpose: called when a connections to the Steam back-end has been established
|
||||||
|
@ -214,4 +216,18 @@ struct ValidateAuthTicketResponse_t
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose: called when a user has responded to a microtransaction authorization request
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
struct MicroTxnAuthorizationResponse_t
|
||||||
|
{
|
||||||
|
enum { k_iCallback = k_iSteamUserCallbacks + 52 };
|
||||||
|
|
||||||
|
uint32 m_unAppID; // AppID for this microtransaction
|
||||||
|
uint64 m_ulOrderID; // OrderID provided for the microtransaction
|
||||||
|
uint8 m_bAuthorized; // if user authorized transaction
|
||||||
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMUSER_H
|
#endif // ISTEAMUSER_H
|
||||||
|
|
|
@ -60,6 +60,8 @@ enum ELeaderboardUploadScoreMethod
|
||||||
};
|
};
|
||||||
|
|
||||||
// a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry()
|
// a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry()
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
struct LeaderboardEntry_t
|
struct LeaderboardEntry_t
|
||||||
{
|
{
|
||||||
CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
|
CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
|
||||||
|
@ -68,6 +70,8 @@ struct LeaderboardEntry_t
|
||||||
int32 m_cDetails; // number of int32 details available for this entry
|
int32 m_cDetails; // number of int32 details available for this entry
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
||||||
|
@ -200,6 +204,8 @@ public:
|
||||||
|
|
||||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION007"
|
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION007"
|
||||||
|
|
||||||
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: called when the latests stats and achievements have been received
|
// Purpose: called when the latests stats and achievements have been received
|
||||||
|
@ -301,6 +307,7 @@ struct UserStatsUnloaded_t
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Callback indicating that an achievement icon has been fetched
|
// Purpose: Callback indicating that an achievement icon has been fetched
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -313,4 +320,12 @@ struct UserAchievementIconFetched_t
|
||||||
bool m_bAchieved; // Is the icon for the achieved or not achieved version?
|
bool m_bAchieved; // Is the icon for the achieved or not achieved version?
|
||||||
int m_nIconHandle; // Handle to the image, which can be used in ClientUtils()->GetImageRGBA(), 0 means no image is set for the achievement
|
int m_nIconHandle; // Handle to the image, which can be used in ClientUtils()->GetImageRGBA(), 0 means no image is set for the achievement
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// IMPORTANT! k_iSteamUserStatsCallbacks + 10 is used, see iclientuserstats.h
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
|
|
||||||
#endif // ISTEAMUSER_H
|
#endif // ISTEAMUSER_H
|
||||||
|
|
|
@ -108,13 +108,16 @@ public:
|
||||||
// in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
// in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
||||||
// refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
// refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
||||||
virtual bool BOverlayNeedsPresent() = 0;
|
virtual bool BOverlayNeedsPresent() = 0;
|
||||||
|
|
||||||
|
// Asynchronous call to check if file is signed, result is returned in CheckFileSignature_t
|
||||||
|
virtual SteamAPICall_t CheckFileSignature( const char *szFileName ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils005"
|
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils005"
|
||||||
|
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
|
#pragma pack( push, 8 )
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: The country of the user changed
|
// Purpose: The country of the user changed
|
||||||
|
@ -153,5 +156,27 @@ struct SteamShutdown_t
|
||||||
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
|
enum { k_iCallback = k_iSteamUtilsCallbacks + 4 };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// results for CheckFileSignature
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
enum ECheckFileSignature
|
||||||
|
{
|
||||||
|
k_ECheckFileSignatureInvalidSignature = 0,
|
||||||
|
k_ECheckFileSignatureValidSignature = 1,
|
||||||
|
k_ECheckFileSignatureFileNotFound = 2,
|
||||||
|
k_ECheckFileSignatureNoSignaturesFoundForThisApp = 3,
|
||||||
|
k_ECheckFileSignatureNoSignaturesFoundForThisFile = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// callback for CheckFileSignature
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
struct CheckFileSignature_t
|
||||||
|
{
|
||||||
|
enum { k_iCallback = k_iSteamUtilsCallbacks + 5 };
|
||||||
|
ECheckFileSignature m_eCheckFileSignature;
|
||||||
|
};
|
||||||
|
|
||||||
|
#pragma pack( pop )
|
||||||
|
|
||||||
#endif // ISTEAMUTILS_H
|
#endif // ISTEAMUTILS_H
|
||||||
|
|
|
@ -56,13 +56,32 @@ S_API void SteamAPI_Shutdown();
|
||||||
// checks if a local Steam client is running
|
// checks if a local Steam client is running
|
||||||
S_API bool SteamAPI_IsSteamRunning();
|
S_API bool SteamAPI_IsSteamRunning();
|
||||||
|
|
||||||
// restart your app through Steam to enable required Steamworks features
|
// Detects if your executable was launched through the Steam client, and restarts your game through
|
||||||
|
// the client if necessary. The Steam client will be started if it is not running.
|
||||||
|
//
|
||||||
|
// Returns: true if your executable was NOT launched through the Steam client. This function will
|
||||||
|
// then start your application through the client. Your current process should exit.
|
||||||
|
//
|
||||||
|
// false if your executable was started through the Steam client or a steam_appid.txt file
|
||||||
|
// is present in your game's directory (for development). Your current process should continue.
|
||||||
|
//
|
||||||
|
// NOTE: This function should be used only if you are using CEG or not using Steam's DRM. Once applied
|
||||||
|
// to your executable, Steam's DRM will handle restarting through Steam if necessary.
|
||||||
S_API bool SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
|
S_API bool SteamAPI_RestartAppIfNecessary( uint32 unOwnAppID );
|
||||||
|
|
||||||
// crash dump recording functions
|
// crash dump recording functions
|
||||||
S_API void SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
|
S_API void SteamAPI_WriteMiniDump( uint32 uStructuredExceptionCode, void* pvExceptionInfo, uint32 uBuildID );
|
||||||
S_API void SteamAPI_SetMiniDumpComment( const char *pchMsg );
|
S_API void SteamAPI_SetMiniDumpComment( const char *pchMsg );
|
||||||
|
|
||||||
|
// this should be called before the game initialized the steam APIs
|
||||||
|
// pchDate should be of the format "Mmm dd yyyy" (such as from the __DATE__ macro )
|
||||||
|
// pchTime should be of the format "hh:mm:ss" (such as from the __TIME__ macro )
|
||||||
|
// bFullMemoryDumps (Win32 only) -- writes out a uuid-full.dmp in the client/dumps folder
|
||||||
|
// pvContext-- can be NULL, will be the void * context passed into m_pfnPreMinidumpCallback
|
||||||
|
// PFNPreMinidumpCallback m_pfnPreMinidumpCallback -- optional callback which occurs just before a .dmp file is written during a crash. Applications can hook this to allow adding additional information into the .dmp comment stream.
|
||||||
|
S_API void SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback );
|
||||||
|
S_API void SteamAPI_SetBreakpadAppID( uint32 unAppID );
|
||||||
|
|
||||||
// interface pointers, configured by SteamAPI_Init()
|
// interface pointers, configured by SteamAPI_Init()
|
||||||
S_API ISteamClient *SteamClient();
|
S_API ISteamClient *SteamClient();
|
||||||
|
|
||||||
|
@ -149,7 +168,7 @@ public:
|
||||||
|
|
||||||
CCallResult()
|
CCallResult()
|
||||||
{
|
{
|
||||||
m_hAPICall = 0;
|
m_hAPICall = k_uAPICallInvalid;
|
||||||
m_pObj = NULL;
|
m_pObj = NULL;
|
||||||
m_Func = NULL;
|
m_Func = NULL;
|
||||||
m_iCallback = P::k_iCallback;
|
m_iCallback = P::k_iCallback;
|
||||||
|
@ -170,31 +189,35 @@ public:
|
||||||
|
|
||||||
bool IsActive() const
|
bool IsActive() const
|
||||||
{
|
{
|
||||||
return ( m_hAPICall != 0 );
|
return ( m_hAPICall != k_uAPICallInvalid );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cancel()
|
void Cancel()
|
||||||
{
|
{
|
||||||
m_hAPICall = 0;
|
if ( m_hAPICall != k_uAPICallInvalid )
|
||||||
|
{
|
||||||
|
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
||||||
|
m_hAPICall = k_uAPICallInvalid;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~CCallResult()
|
~CCallResult()
|
||||||
{
|
{
|
||||||
if ( m_hAPICall )
|
Cancel();
|
||||||
SteamAPI_UnregisterCallResult( this, m_hAPICall );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void Run( void *pvParam )
|
virtual void Run( void *pvParam )
|
||||||
{
|
{
|
||||||
m_hAPICall = 0;
|
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||||
(m_pObj->*m_Func)( (P *)pvParam, false );
|
(m_pObj->*m_Func)( (P *)pvParam, false );
|
||||||
}
|
}
|
||||||
void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )
|
||||||
{
|
{
|
||||||
if ( hSteamAPICall == m_hAPICall )
|
if ( hSteamAPICall == m_hAPICall )
|
||||||
{
|
{
|
||||||
m_hAPICall = 0;
|
m_hAPICall = k_uAPICallInvalid; // caller unregisters for us
|
||||||
(m_pObj->*m_Func)( (P *)pvParam, bIOFailure );
|
(m_pObj->*m_Func)( (P *)pvParam, bIOFailure );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,13 @@ enum EResult
|
||||||
k_EResultAdministratorOK = 46, // allowed to take this action, but only because requester is admin
|
k_EResultAdministratorOK = 46, // allowed to take this action, but only because requester is admin
|
||||||
k_EResultContentVersion = 47, // A Version mismatch in content transmitted within the Steam protocol.
|
k_EResultContentVersion = 47, // A Version mismatch in content transmitted within the Steam protocol.
|
||||||
k_EResultTryAnotherCM = 48, // The current CM can't service the user making a request, user should try another.
|
k_EResultTryAnotherCM = 48, // The current CM can't service the user making a request, user should try another.
|
||||||
|
k_EResultPasswordRequiredToKickSession = 49,// You are already logged in elsewhere, this cached credential login has failed.
|
||||||
|
k_EResultAlreadyLoggedInElsewhere = 50, // You are already logged in elsewhere, you must wait
|
||||||
|
k_EResultSuspended = 51, // Long running operation (content download) suspended/paused
|
||||||
|
k_EResultCancelled = 52, // Operation canceled (typically by user: content download)
|
||||||
|
k_EResultDataCorruption = 53, // Operation canceled because data is ill formed or unrecoverable
|
||||||
|
k_EResultDiskFull = 54, // Operation canceled - not enough disk space.
|
||||||
|
k_EResultRemoteCallFailed = 55, // an remote call or IPC call failed
|
||||||
};
|
};
|
||||||
|
|
||||||
// Error codes for use with the voice functions
|
// Error codes for use with the voice functions
|
||||||
|
@ -170,7 +176,7 @@ enum EAccountType
|
||||||
k_EAccountTypeContentServer = 6, // content server
|
k_EAccountTypeContentServer = 6, // content server
|
||||||
k_EAccountTypeClan = 7,
|
k_EAccountTypeClan = 7,
|
||||||
k_EAccountTypeChat = 8,
|
k_EAccountTypeChat = 8,
|
||||||
k_EAccountTypeP2PSuperSeeder = 9, // a fake steamid used by superpeers to seed content to users of Steam P2P stuff
|
// k_EAccountTypeP2PSuperSeeder = 9, // unused
|
||||||
k_EAccountTypeAnonUser = 10,
|
k_EAccountTypeAnonUser = 10,
|
||||||
|
|
||||||
// Max of 16 items in this field
|
// Max of 16 items in this field
|
||||||
|
@ -221,6 +227,7 @@ enum EChatRoomEnterResponse
|
||||||
k_EChatRoomEnterResponseFull = 4, // Chat room has reached its maximum size
|
k_EChatRoomEnterResponseFull = 4, // Chat room has reached its maximum size
|
||||||
k_EChatRoomEnterResponseError = 5, // Unexpected Error
|
k_EChatRoomEnterResponseError = 5, // Unexpected Error
|
||||||
k_EChatRoomEnterResponseBanned = 6, // You are banned from this chat room and may not join
|
k_EChatRoomEnterResponseBanned = 6, // You are banned from this chat room and may not join
|
||||||
|
k_EChatRoomEnterResponseLimited = 7, // Joining this chat is not allowed because you are a limited user (no value on account)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,11 +257,29 @@ enum EChatSteamIDInstanceFlags
|
||||||
|
|
||||||
k_EChatInstanceFlagClan = ( k_unSteamAccountInstanceMask + 1 ) >> 1, // top bit
|
k_EChatInstanceFlagClan = ( k_unSteamAccountInstanceMask + 1 ) >> 1, // top bit
|
||||||
k_EChatInstanceFlagLobby = ( k_unSteamAccountInstanceMask + 1 ) >> 2, // next one down, etc
|
k_EChatInstanceFlagLobby = ( k_unSteamAccountInstanceMask + 1 ) >> 2, // next one down, etc
|
||||||
|
k_EChatInstanceFlagMMSLobby = ( k_unSteamAccountInstanceMask + 1 ) >> 3, // next one down, etc
|
||||||
|
|
||||||
// Max of 8 flags
|
// Max of 8 flags
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose: Marketing message flags that change how a client should handle them
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
enum EMarketingMessageFlags
|
||||||
|
{
|
||||||
|
k_EMarketingMessageFlagsNone = 0,
|
||||||
|
k_EMarketingMessageFlagsHighPriority = 1 << 0,
|
||||||
|
k_EMarketingMessageFlagsPlatformWindows = 1 << 1,
|
||||||
|
k_EMarketingMessageFlagsPlatformMac = 1 << 2,
|
||||||
|
|
||||||
|
//aggregate flags
|
||||||
|
k_EMarketingMessageFlagsPlatformRestrictions =
|
||||||
|
k_EMarketingMessageFlagsPlatformWindows | k_EMarketingMessageFlagsPlatformMac,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Possible positions to tell the overlay to show notifications in
|
// Purpose: Possible positions to tell the overlay to show notifications in
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -869,10 +894,6 @@ private:
|
||||||
const int k_cchGameExtraInfoMax = 64;
|
const int k_cchGameExtraInfoMax = 64;
|
||||||
|
|
||||||
|
|
||||||
// Max number of credit cards stored for one account
|
|
||||||
const int k_nMaxNumCardsPerAccount = 1;
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Constants used for query ports.
|
// Constants used for query ports.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -880,4 +901,17 @@ const int k_nMaxNumCardsPerAccount = 1;
|
||||||
#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet.
|
#define QUERY_PORT_NOT_INITIALIZED 0xFFFF // We haven't asked the GS for this query port's actual value yet.
|
||||||
#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server.
|
#define QUERY_PORT_ERROR 0xFFFE // We were unable to get the query port for this server.
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose: Passed as argument to SteamAPI_UseBreakpadCrashHandler to enable optional callback
|
||||||
|
// just before minidump file is captured after a crash has occurred. (Allows app to append additional comment data to the dump, etc.)
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
typedef void (*PFNPreMinidumpCallback)(void *context);
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose: Used by ICrashHandler interfaces to reference particular installed crash handlers
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
typedef void *BREAKPAD_HANDLE;
|
||||||
|
#define BREAKPAD_INVALID_HANDLE (BREAKPAD_HANDLE)0
|
||||||
|
|
||||||
#endif // STEAMCLIENTPUBLIC_H
|
#endif // STEAMCLIENTPUBLIC_H
|
||||||
|
|
|
@ -15,6 +15,12 @@
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined( __GNUC__ ) && !defined(POSIX)
|
||||||
|
#if __GNUC__ < 4
|
||||||
|
#error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)"
|
||||||
|
#endif
|
||||||
|
#define POSIX 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(_WIN64)
|
#if defined(__x86_64__) || defined(_WIN64)
|
||||||
#define X64BITS
|
#define X64BITS
|
||||||
|
@ -61,7 +67,14 @@ typedef unsigned int uintp;
|
||||||
const int k_cubSaltSize = 8;
|
const int k_cubSaltSize = 8;
|
||||||
typedef uint8 Salt_t[ k_cubSaltSize ];
|
typedef uint8 Salt_t[ k_cubSaltSize ];
|
||||||
|
|
||||||
typedef uint64 GID_t; // globally unique identifier
|
//-----------------------------------------------------------------------------
|
||||||
|
// GID (GlobalID) stuff
|
||||||
|
// This is a globally unique identifier. It's guaranteed to be unique across all
|
||||||
|
// racks and servers for as long as a given universe persists.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// NOTE: for GID parsing/rendering and other utils, see gid.h
|
||||||
|
typedef uint64 GID_t;
|
||||||
|
|
||||||
const GID_t k_GIDNil = 0xffffffffffffffffull;
|
const GID_t k_GIDNil = 0xffffffffffffffffull;
|
||||||
|
|
||||||
// For convenience, we define a number of types that are just new names for GIDs
|
// For convenience, we define a number of types that are just new names for GIDs
|
||||||
|
@ -71,9 +84,11 @@ typedef GID_t TxnID_t; // Each financial transaction has a unique ID
|
||||||
const GID_t k_TxnIDNil = k_GIDNil;
|
const GID_t k_TxnIDNil = k_GIDNil;
|
||||||
const GID_t k_TxnIDUnknown = 0;
|
const GID_t k_TxnIDUnknown = 0;
|
||||||
|
|
||||||
|
|
||||||
// this is baked into client messages and interfaces as an int,
|
// this is baked into client messages and interfaces as an int,
|
||||||
// make sure we never break this.
|
// make sure we never break this.
|
||||||
typedef uint32 PackageId_t;
|
typedef uint32 PackageId_t;
|
||||||
|
const PackageId_t k_uPackageIdFreeSub = 0x0;
|
||||||
const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,9 +111,11 @@ const DepotId_t k_uDepotIdInvalid = 0x0;
|
||||||
typedef uint32 RTime32;
|
typedef uint32 RTime32;
|
||||||
|
|
||||||
typedef uint32 CellID_t;
|
typedef uint32 CellID_t;
|
||||||
|
const CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
|
||||||
|
|
||||||
// handle to a Steam API call
|
// handle to a Steam API call
|
||||||
typedef uint64 SteamAPICall_t;
|
typedef uint64 SteamAPICall_t;
|
||||||
|
const SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue