Add more stuff for discord rpc
This commit is contained in:
parent
81e39ddfda
commit
3d8378419f
@ -383,6 +383,8 @@ DoingMission = "Doing mission"
|
||||
Driving = "Driving"
|
||||
In = "in"
|
||||
InsideMenus = "Inside Menus"
|
||||
InsideInterior = "Inside interior"
|
||||
OnRampage = "On rampage with cops"
|
||||
PlayingFor = "Playing for {}:{}:{}"
|
||||
Walking = "Walking"
|
||||
Wasted = "Wasted!"
|
||||
|
21
src/rpc.cpp
21
src/rpc.cpp
@ -89,6 +89,11 @@ void RPC::Process()
|
||||
#else
|
||||
size_t wantedLevel = pPed->m_pWanted->m_nWantedLevel;
|
||||
#endif
|
||||
if (BY_GAME(Util::IsOnMission(), false, false))
|
||||
{
|
||||
stateText = TEXT("RPC.DoingMission");
|
||||
}
|
||||
|
||||
if (wantedLevel > 0)
|
||||
{
|
||||
detailsText = std::format("{}: ", TEXT("Player.WantedLevel"));
|
||||
@ -96,11 +101,21 @@ void RPC::Process()
|
||||
{
|
||||
detailsText += "☆";
|
||||
}
|
||||
|
||||
if (wantedLevel > 3)
|
||||
{
|
||||
stateText = TEXT("RPC.OnRampage");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
detailsText = std::format("{}: ${}", TEXT("Player.Money"), pInfo->m_nMoney);
|
||||
}
|
||||
|
||||
if (pPed->m_nAreaCode != 0) // world
|
||||
{
|
||||
stateText = TEXT("RPC.InsideInterior");
|
||||
}
|
||||
|
||||
if (BY_GAME(pPed->m_nPedFlags.bInVehicle, pPed->m_bInVehicle, pPed->m_bInVehicle))
|
||||
{
|
||||
@ -115,16 +130,12 @@ void RPC::Process()
|
||||
smallImgText = std::format("{} {} {}", TEXT("RPC.Walking"), TEXT("RPC.In"), Util::GetLocationName(&pPed->GetPosition()));
|
||||
}
|
||||
|
||||
if (BY_GAME(Util::IsOnMission(), false, false))
|
||||
{
|
||||
stateText = TEXT("RPC.DoingMission");
|
||||
}
|
||||
|
||||
if (CheatMenu::IsMenuShown())
|
||||
{
|
||||
stateText = TEXT("RPC.BrowsingCheatMenu");
|
||||
}
|
||||
|
||||
|
||||
if (Command<Commands::IS_CHAR_DEAD>(CPools::GetPedRef(pPed)))
|
||||
{
|
||||
stateText = TEXT("RPC.Wasted");
|
||||
|
@ -107,46 +107,6 @@ static float LimitRadarPoint(CVector2D& point)
|
||||
return 1.1f;
|
||||
}
|
||||
|
||||
static double __cdecl LimitRadarPoint2(CVector2D *pos)
|
||||
{
|
||||
float vroot = pos->Magnitude();
|
||||
if (FrontEndMenuManager.m_bDrawRadarOrMap)
|
||||
{
|
||||
return vroot;
|
||||
}
|
||||
|
||||
if (vroot > 1.0)
|
||||
{
|
||||
if (pos->x > -1.0 && pos->x < 1.0 && pos->y > -1.0 && pos->y < 1.0)
|
||||
{
|
||||
return 0.99;
|
||||
}
|
||||
|
||||
float posYd = pos->y * 57.295779513;
|
||||
if (posYd > 45.0 || posYd <= -45.0)
|
||||
{
|
||||
pos->x = cos(posYd / 57.295779513) * sqrt(2);
|
||||
if (posYd > 45.0 && posYd <= 135.0)
|
||||
{
|
||||
pos->y = 1.0;
|
||||
return vroot;
|
||||
}
|
||||
if (posYd <= 135.0 && posYd > -135.0)
|
||||
{
|
||||
pos->y = -1.0;
|
||||
return vroot;
|
||||
}
|
||||
pos->x = -1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos->x = 1.0;
|
||||
}
|
||||
pos->y = sin(posYd / 57.295779513) * sqrt(2);
|
||||
}
|
||||
|
||||
return vroot;
|
||||
}
|
||||
#elif GTAVC
|
||||
#define TOTAL_WEATHERS 7
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user