static void SteamGS_OnValidateTicket(NPAsync<NPValidateUserTicketResult>* async)
{
	NPValidateUserTicketResult* result = async->GetResult();

#ifndef KEY_DISABLED
	if (result->result == ValidateUserTicketResultOK)
	{
		GSClientApprove_t* retvals = (GSClientApprove_t*)malloc(sizeof(GSClientApprove_t));
		retvals->m_SteamID = CSteamID(result->id);
		CSteamBase::ReturnCall(retvals, sizeof(GSClientApprove_t), GSClientApprove_t::k_iCallback, 0);

		SteamGS_AddToGroupQueue(result->id, result->groupID);
	}
	else
	{
		GSClientDeny_t* retvals = (GSClientDeny_t*)malloc(sizeof(GSClientDeny_t));

		retvals->m_SteamID = CSteamID(result->id);
		retvals->m_eDenyReason = k_EDenyNoLicense;

		CSteamBase::ReturnCall(retvals, sizeof(GSClientDeny_t), GSClientDeny_t::k_iCallback, 0);
	}
#else
	GSClientApprove_t* retvals = (GSClientApprove_t*)malloc(sizeof(GSClientApprove_t));
	retvals->m_SteamID = CSteamID(result->id);
	CSteamBase::ReturnCall(retvals, sizeof(GSClientApprove_t), GSClientApprove_t::k_iCallback, 0);

	SteamGS_AddToGroupQueue(result->id, result->groupID);
#endif
}
CSteamID CSteamUser014::GetSteamID()
{
	if (GAME_FLAG(GAME_FLAG_DEDICATED))
	{
		return CSteamID(0xDED1CA7E, 1, k_EUniversePublic, k_EAccountTypeIndividual);
	}

	NPID npID;
	bool result = NP_GetNPID(&npID);
	
	return CSteamID(npID);
}
Example #3
0
/* <ee390> ../engine/sv_steam3.cpp:128 */
uint64 CSteam3Server::GetSteamID()
{
    if (m_bLanOnly)
        return CSteamID(0, k_EUniversePublic, k_EAccountTypeInvalid).ConvertToUint64();
    else
        return m_SteamIDGS.ConvertToUint64();
}
bool CSteamGameServer010::SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) {
	
	#ifdef KEY_DISABLED
	NPAuthenticateTicket* ticket = (NPAuthenticateTicket*)pvAuthBlob;

	GSClientApprove_t* retvals = (GSClientApprove_t*)malloc(sizeof(GSClientApprove_t));
	retvals->m_SteamID = CSteamID(ticket->clientID);
	CSteamBase::ReturnCall(retvals, sizeof(GSClientApprove_t), GSClientApprove_t::k_iCallback, 0);
	return true;
#endif

	NPAsync<NPValidateUserTicketResult>* async = NP_ValidateUserTicket(pvAuthBlob, cubAuthBlobSize, unIPClient, pSteamIDUser->ConvertToUint64());
	async->SetCallback(SteamGS_OnValidateTicket, NULL);
	return true;
}
SteamAPICall_t CSteamMatchmaking007::CreateLobby( ELobbyType eLobbyType, int )
{
	SteamAPICall_t result = CSteamBase::RegisterCall();
	LobbyCreated_t* retvals = (LobbyCreated_t*)malloc(sizeof(LobbyCreated_t));
	CSteamID id = CSteamID( 1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat );

	retvals->m_eResult = k_EResultOK;
	retvals->m_ulSteamIDLobby = id.ConvertToUint64();

	CSteamBase::ReturnCall(retvals, sizeof(LobbyCreated_t), LobbyCreated_t::k_iCallback, result);

	JoinLobby(id);

	return result;
}
Example #6
0
CSteamID RedactedFriends::GetFriendFromSourceByIndex(CSteamID steamIDSource, int32_t iFriend)
{
	PrintCurrentFunction();
	return CSteamID();
}
CSteamID CSteamMatchmaking007::GetLobbyByIndex( int iLobby ) {
	return CSteamID( 1337132, 0x40000, k_EUniversePublic, k_EAccountTypeChat );
}
CSteamID RedactedMatchmaking::GetLobbyByIndex(int iLobby)
{
	PrintCurrentFunction();
	CSteamID id = CSteamID(1111111, 0x40000, k_EUniversePublic, k_EAccountTypeChat);
	return id;
}
CSteamID CSteamGameServer010::GetSteamID() {
	
	NPID npID;
	NP_GetNPID(&npID);
	return CSteamID(npID);
}
CSteamID CSteamGameServer010::CreateUnauthenticatedUserConnection() {
	
	NPID npID;
	NP_GetNPID(&npID);
	return CSteamID(npID);
}
Example #11
0
CSteamID RedactedFriends::GetChatMemberByIndex(CSteamID steamIDClan, int32_t iUser)
{
	PrintCurrentFunction();
	return CSteamID();
}
Example #12
0
CSteamID RedactedFriends::GetClanOfficerByIndex(CSteamID steamIDClan, int32_t iOfficer)
{
	PrintCurrentFunction();
	return CSteamID();
}
CSteamID CSteamMatchmaking007::GetLobbyOwner( CSteamID steamIDLobby )
{
	return CSteamID(GetPlayerSteamID(), 1, k_EUniversePublic, k_EAccountTypeIndividual);
}
Example #14
0
CSteamID ProxiedApps::GetAppOwner()
{
	HHSDBG();
	return CSteamID(Global::Steam_UserID);
}
CSteamID CSteamMatchmaking007::GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember )
{
	//return CSteamID(GetPlayerSteamID(), 1, k_EUniversePublic, k_EAccountTypeIndividual);
	return CSteamID();
}
CSteamID CSteamMatchmaking007::GetLobbyOwner( CSteamID steamIDLobby ) {
	return CSteamID();
}
CSteamID CSteamMatchmaking007::GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) {
	return CSteamID();
}
Example #18
0
CSteamID RedactedApps::GetAppOwner()
{
	PrintCurrentFunction();

	return CSteamID(Global::Steam_UserID);
}
Example #19
0
CSteamID RedactedFriends::GetFriendByIndex(int32_t iFriend, int32_t iFriendFlags)
{
	PrintCurrentFunction();
	return CSteamID();
}
Example #20
0
/* <ee251> ../engine/sv_steam3.cpp:664 */
void CSteam3Server::RunFrame()
{
    bool bHasPlayers;
    char szOutBuf[4096];
    double fCurTime;

    static double s_fLastRunFragsUpdate;
    static double s_fLastRunCallback;
    static double s_fLastRunSendPackets;

    if (g_psvs.maxclients <= 1)
        return;

    fCurTime = Sys_FloatTime();
    if (fCurTime - s_fLastRunFragsUpdate > 1.0)
    {
        s_fLastRunFragsUpdate = fCurTime;
        bHasPlayers = false;
        for (int i = 0; i < g_psvs.maxclients; i++)
        {
            client_t* cl = &g_psvs.clients[i];
            if (cl->active || cl->spawned || cl->connected)
            {
                bHasPlayers = true;
                break;
            }
        }

        m_bHasActivePlayers = bHasPlayers;
        SendUpdatedServerDetails();
        bool iHasPW = (sv_password.string[0] && Q_stricmp(sv_password.string, "none"));
        CRehldsPlatformHolder::get()->SteamGameServer()->SetPasswordProtected(iHasPW);

        for (int i = 0; i < g_psvs.maxclients; i++)
        {
            client_t* cl = &g_psvs.clients[i];
            if (!cl->active)
                continue;

            CRehldsPlatformHolder::get()->SteamGameServer()->BUpdateUserData(CSteamID(cl->network_userid.m_SteamID), cl->name, cl->edict->v.frags);
        }

        if (CRehldsPlatformHolder::get()->SteamGameServer()->WasRestartRequested())
        {
            Con_Printf("%cMasterRequestRestart\n", 3);
            if (COM_CheckParm("-steam"))
            {
                Con_Printf("Your server needs to be restarted in order to receive the latest update.\n");
                Log_Printf("Your server needs to be restarted in order to receive the latest update.\n");
            }
            else
            {
                Con_Printf("Your server is out of date.  Please update and restart.\n");
            }
        }
    }

    if (fCurTime - s_fLastRunCallback > 0.1)
    {
        CRehldsPlatformHolder::get()->SteamGameServer_RunCallbacks();
        s_fLastRunCallback = fCurTime;
    }

    if (fCurTime - s_fLastRunSendPackets > 0.01)
    {
        s_fLastRunSendPackets = fCurTime;

        uint16 port;
        uint32 ip;
        int iLen = CRehldsPlatformHolder::get()->SteamGameServer()->GetNextOutgoingPacket(szOutBuf, sizeof(szOutBuf), &ip, &port);
        while (iLen > 0)
        {
            netadr_t netAdr;
            *((uint32*)&netAdr.ip[0]) = htonl(ip);
            netAdr.port = htons(port);
            netAdr.type = NA_IP;

            NET_SendPacket(NS_SERVER, iLen, szOutBuf, netAdr);

            iLen = CRehldsPlatformHolder::get()->SteamGameServer()->GetNextOutgoingPacket(szOutBuf, sizeof(szOutBuf), &ip, &port);
        }
    }
}
Example #21
0
CSteamID RedactedFriends::GetClanOwner(CSteamID steamIDClan)
{
	PrintCurrentFunction();
	return CSteamID();
}
Example #22
0
/* <ed9fb> ../engine/sv_steam3.cpp:816 */
int CSteam3Client::InitiateGameConnection(void *pData, int cbMaxData, uint64 steamID, uint32 unIPServer, uint16 usPortServer, bool bSecure)
{
    return SteamUser()->InitiateGameConnection(pData, cbMaxData, CSteamID(steamID), ntohl(unIPServer), ntohs(usPortServer), bSecure);
}
Example #23
0
CSteamID RedactedFriends::GetCoplayFriend(int32_t iCoplayFriend)
{
	PrintCurrentFunction();
	return CSteamID();
}
	bool CStats::GetUserAchievement(SteamID steamID, PConstantString name, bool *achieved)
	{
		return stats->GetUserAchievement(CSteamID(steamID), name, achieved);
	}
Example #25
0
CSteamID RedactedFriends::GetClanByIndex(int32_t iClan)
{
	PrintCurrentFunction();
	return CSteamID();
}
CSteamID CSteamMatchmaking007::GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) {
	NPID npID;
	NP_GetNPID(&npID);

	return CSteamID(npID);
}
	bool CStats::GetUserAchievementAndUnlockTime(SteamID steamID, PConstantString name, bool *achieved, u32 *unlockTime)
	{
		return stats->GetUserAchievementAndUnlockTime(CSteamID(steamID), name, achieved, unlockTime);
	}
CSteamID CSteamMatchmaking007::GetLobbyOwner( CSteamID steamIDLobby ) {
	NPID npID;
	NP_GetNPID(&npID);

	return CSteamID(npID);
}
	bool CStats::GetUserStat(SteamID steamID, PConstantString name, float *data)
	{
		return stats->GetUserStat(CSteamID(steamID), name, data);
	}
	void CStats::RequestUserStats(SteamID steamID)
	{
		// Will use the same callback as RequestCurrentStats
		stats->RequestUserStats(CSteamID(steamID));
	}