mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright 2021-2022 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
|