mirror of
https://github.com/swordbluesword/PalWorld-NetCrack.git
synced 2025-04-28 18:37:16 +09:00
Merge pull request #69 from gir489returns/Speedhack
Refactored speedhack.
This commit is contained in:
commit
320c3727b4
36
feature.cpp
36
feature.cpp
@ -253,23 +253,19 @@ void SetFullbright(bool bIsSet)
|
||||
//
|
||||
void SpeedHack(float mSpeed)
|
||||
{
|
||||
UWorld* pWorld = Config.gWorld;
|
||||
if (!pWorld)
|
||||
auto player_controller = Config.GetPalPlayerController();
|
||||
if (!player_controller)
|
||||
return;
|
||||
|
||||
ULevel* pLevel = pWorld->PersistentLevel;
|
||||
if (!pLevel)
|
||||
auto acknowledged_pawn = player_controller->AcknowledgedPawn;
|
||||
|
||||
if (!acknowledged_pawn)
|
||||
return;
|
||||
|
||||
AWorldSettings* pWorldSettings = pLevel->WorldSettings;
|
||||
if (!pWorldSettings)
|
||||
return;
|
||||
|
||||
pWorld->PersistentLevel->WorldSettings->TimeDilation = mSpeed;
|
||||
|
||||
// pWorldSettings->TimeDilation = mSpeed;
|
||||
acknowledged_pawn->CustomTimeDilation = mSpeed;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
void SetDemiGodMode(bool bIsSet)
|
||||
{
|
||||
@ -360,24 +356,6 @@ void ResetStamina()
|
||||
return;
|
||||
|
||||
pParams->ResetSP();
|
||||
|
||||
|
||||
// Reset Pal Stamina ??
|
||||
TArray<APalCharacter*> outPals;
|
||||
Config.GetTAllPals(&outPals);
|
||||
DWORD palsSize = outPals.Count();
|
||||
for (int i = 0; i < palsSize; i++)
|
||||
{
|
||||
APalCharacter* cPal = outPals[i];
|
||||
if (!cPal || cPal->IsA(APalMonsterCharacter::StaticClass()))
|
||||
continue;
|
||||
|
||||
UPalCharacterParameterComponent* pPalParams = pPalCharacter->CharacterParameterComponent;
|
||||
if (!pPalParams)
|
||||
return;
|
||||
|
||||
pPalParams->ResetSP();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -78,7 +78,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)\lib</OutDir>
|
||||
<OutDir>$(SolutionDir)\libs\SDKLibrary\lib</OutDir>
|
||||
<TargetName>$(ProjectName)d</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -72,8 +72,7 @@ namespace DX11_Base
|
||||
|
||||
ImGui::Checkbox("InfStamina", &Config.IsInfStamina);
|
||||
|
||||
if (ImGui::Checkbox("InfAmmo", &Config.IsInfinAmmo))
|
||||
SetInfiniteAmmo(Config.IsInfinAmmo);
|
||||
ImGui::Checkbox("InfAmmo", &Config.IsInfinAmmo);
|
||||
|
||||
ImGui::Checkbox("Godmode", &Config.IsGodMode);
|
||||
|
||||
@ -789,5 +788,7 @@ namespace DX11_Base
|
||||
|
||||
if (Config.IsGodMode)
|
||||
SetPlayerHealth(INT_MAX);
|
||||
|
||||
SetInfiniteAmmo(Config.IsInfinAmmo);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user