aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/shared/gamepresence.h
blob: 439ec65c20f2a27b10458e1c4d7aa86751c97ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include "server/serverpresence.h"

class GameStateServerPresenceReporter : public ServerPresenceReporter
{
	void RunFrame(double flCurrentTime, const ServerPresence* pServerPresence);
};

class GameStatePresence
{
  public:
	std::string id;
	std::string name;
	std::string description;
	std::string password; // NOTE: May be empty

	bool isServer;
	bool isLocal = false;
	bool isLoading;
	bool isLobby;
	std::string loadingLevel;

	std::string uiMap;

	std::string map;
	std::string mapDisplayname;
	std::string playlist;
	std::string playlistDisplayname;

	int currentPlayers;
	int maxPlayers;

	int ownScore;
	int otherHighestScore; // NOTE: The highest score OR the second highest score if we have the highest
	int maxScore;

	int timestampEnd;

	GameStatePresence();
	void RunFrame();

  protected:
	GameStateServerPresenceReporter m_GameStateServerPresenceReporter;
};

extern GameStatePresence* g_pGameStatePresence;