forked from mumble-voip/mumble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
45 lines (30 loc) · 1.29 KB
/
Game.h
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
// Copyright 2021-2023 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#ifndef GTAV_GAME_H_
#define GTAV_GAME_H_
#include "structs.h"
#include "ProcessWindows.h"
#include "PluginComponents_v_1_0_x.h"
class Game {
public:
Mumble_PositionalDataErrorCode init();
static constexpr bool isMultiplayer(const CNetworkPlayerMgr &mgr) { return mgr.player; }
CNetworkPlayerMgr playerMgr() const { return m_proc.peek< CNetworkPlayerMgr >(m_playerMgr); }
CNetGamePlayer player(const CNetworkPlayerMgr &manager) const {
return m_proc.peek< CNetGamePlayer >(manager.player);
}
CPlayerInfo playerInfo(const CNetGamePlayer &player) const { return m_proc.peek< CPlayerInfo >(player.info); }
CPed playerEntity(const CPlayerInfo &info) const { return m_proc.peek< CPed >(info.ped); }
CPlayerAngles playerAngles() const;
const std::string &identity(const CNetGamePlayer &player, const CPlayerInfo &info, const CPed &entity);
Game(const procid_t id, const std::string &name);
protected:
bool setupPointers(const Module &module);
ptr_t m_playerMgr;
ptr_t m_cameraMgr;
std::string m_identity;
ProcessWindows m_proc;
};
#endif