Üye
Merhaba, Steam PUBG için hile gelebilir mi? İhtimali var mı? Teşekkürler.
Moderatörün son düzenlenenleri:
std::map<EMainMapType, float> WorldMapSize = {
{EMainMapType::Range, 101175.0f},
{EMainMapType::Erangel, 406387.5f},
{EMainMapType::Mirama, 408000.0f},
{EMainMapType::Taego, 408000.0f},
{EMainMapType::Sanhok, 202387.5f},
{EMainMapType::Vikendi, 306050.0f}
};
............................TslBaseHUD.EnumAllWidget([&](std::wstring Key, NativePtr < UUserWidget > WidgetPtr)-> bool
{
switch (WidgetPtr.GetHash())
{
case "NewWorldMapWidget_BP_C"h:
case "UI_TrainingWorldMapWidget_C"h:
{
UTslNewWorldMapWidget WorldMapWidget;
if (!WidgetPtr.ReadOtherType(WorldMapWidget))
break;
bWorldMap = WorldMapWidget.IsVisible();
if (!bWorldMap)
break;
WorldMapZoomFactor = WorldMapWidget.GetZoomFactor();
WorldMapPosition = WorldMapWidget.GetPosition();
}
}
return true;
});
............................DefClass(UTslNewWorldMapWidget, UBlockInputUserWidget,
MemberAtOffset(TWeakObjectPtr<UMapGridWidget>, MapGrid, Value)
,
constexpr static FVector2D DefaultSize = { 1080.0f, 1080.0f };
bool IsVisible() const;
float GetZoomFactor() const;
FVector2D GetPosition() const;
)
............................float UTslNewWorldMapWidget::GetZoomFactor() const {
NativePtr<UMapGridWidget> pMapGridWidget = MapGrid;
UMapGridWidget MapGridWidget;
if (!pMapGridWidget.Read(MapGridWidget))
return { };
UCanvasPanelSlot Slot;
if (!MapGridWidget.Slot.ReadOtherType(Slot))
return { };
const FVector2D CurrentSize = { Slot.LayoutData.Offsets.Right, Slot.LayoutData.Offsets.Bottom };
return CurrentSize.X / DefaultSize.X;
//return CurrentSize.Y / DefaultSize.Y;
}
FVector2D UTslNewWorldMapWidget::GetPosition() const {
NativePtr<UMapGridWidget> pMapGridWidget = MapGrid;
UMapGridWidget MapGridWidget;
if (!pMapGridWidget.Read(MapGridWidget))
return { };
UCanvasPanelSlot Slot;
if (!MapGridWidget.Slot.ReadOtherType(Slot))
return { };
const FVector2D CurrentPos = {
Slot.LayoutData.Offsets.Right * (Slot.LayoutData.Alignment.X - 0.5f) - Slot.LayoutData.Offsets.Left,
Slot.LayoutData.Offsets.Bottom * (Slot.LayoutData.Alignment.Y - 0.5f) - Slot.LayoutData.Offsets.Top
};
const float ZoomFactor = GetZoomFactor();
return { CurrentPos.X / DefaultSize.X / ZoomFactor * 2.0f, CurrentPos.Y / DefaultSize.Y / ZoomFactor * 2.0f };
}
bool UTslNewWorldMapWidget::IsVisible() const {
if (IsNearlyZero(GetZoomFactor()))
return false;
return Visibility == ESlateVisibility::ESlateVisibility__SelfHitTestInvisible;
}
............................
const float MapSize = WorldMapSize[MainMapType];
const float MapSizeFactored = MapSize / WorldMapZoomFactor;
const FVector WorldLocation = Info.Location + OriginLocation;
const FVector WorldCenterLocation = { MapSize * (1.0f + WorldMapPosition.X), MapSize * (1.0f + WorldMapPosition.Y), 0.0f };
const FVector RadarPos = WorldLocation - WorldCenterLocation;
const FVector RadarScreenCenterPos = { render.Width / 2.0f, render.Height / 2.0f, 0.0f };
const FVector RadarScreenPos = RadarScreenCenterPos + FVector{
RadarPos.X / MapSizeFactored * render.Height / 2.0f,
RadarPos.Y / MapSizeFactored * render.Height / 2.0f,
0.0f
};