CTerrorPlayer::IsInvulnerable embryo

i'll get rid of server's timer eventually

also there's bug (i'll take look on later) of "correction accumulation" on tickbase when server is paused which causes memory corruption
This commit is contained in:
explorer 2024-10-31 13:33:26 +03:00
parent 68cc187ac7
commit 6554d9e04e
6 changed files with 30 additions and 4 deletions

View File

@ -180,7 +180,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24); void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
auto Sequence_Shift = [&](__int32 Reserve) auto Sequence_Shift = [&](__int32 Reserve) -> void
{ {
if (Extended_Commands[*(__int32*)((unsigned __int32)Local_Player + 20) % 150].Sequence_Shift == 0) if (Extended_Commands[*(__int32*)((unsigned __int32)Local_Player + 20) % 150].Sequence_Shift == 0)
{ {

View File

@ -18,6 +18,8 @@ void* Client_Module;
#include "Post_Network_Data_Received.hpp" #include "Post_Network_Data_Received.hpp"
#include "Set_Move_Type.hpp"
#include "Interpolate.hpp" #include "Interpolate.hpp"
#include "Update_Animations.hpp" #include "Update_Animations.hpp"
@ -190,6 +192,8 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Engine_Module + 350575), 1, 94); Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Engine_Module + 350575), 1, 94);
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Engine_Module + 521741), 1, 235); Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Engine_Module + 521741), 1, 235);
*(void**)((unsigned __int32)Client_Module + 7492840) = (void*)Redirected_Set_Move_Type;
} }
_putws(L"[ + ] Interpolation"); _putws(L"[ + ] Interpolation");

View File

@ -102,7 +102,7 @@ void __thiscall Perform_Trace(void* Stack)
{ {
using Get_Difficulty_Type = __int32(__cdecl*)(); using Get_Difficulty_Type = __int32(__cdecl*)();
float Multipliers[3] = { 0.8f, 0.7f, 0.6f }; static float Multipliers[3] = { 0.8f, 0.7f, 0.6f };
Damage *= Multipliers[Get_Difficulty_Type((unsigned __int32)Client_Module + 2650448)()]; Damage *= Multipliers[Get_Difficulty_Type((unsigned __int32)Client_Module + 2650448)()];
}; };
@ -228,7 +228,14 @@ void __thiscall Perform_Trace(void* Stack)
} }
else else
{ {
if (Identifier != 13) if (Identifier == 13)
{
if (*(float*)((unsigned __int32)Entity + 336) - *(float*)((unsigned __int32)Entity + 472) < 0.5f)
{
Damage = 0;
}
}
else
{ {
if (Identifier + Bullet_Type == 284) if (Identifier + Bullet_Type == 284)
{ {
@ -237,7 +244,7 @@ void __thiscall Perform_Trace(void* Stack)
if ((Identifier != 276) + (Upgrade_Type != 1) == 2) if ((Identifier != 276) + (Upgrade_Type != 1) == 2)
{ {
float Multipliers[8] = { 1.f, 4.f, 1.f, 1.25f, 1.f, 1.f, 0.75f, 0.75f }; static float Multipliers[8] = { 1.f, 4.f, 1.f, 1.25f, 1.f, 1.f, 0.75f, 0.75f };
Damage *= Multipliers[Group]; Damage *= Multipliers[Group];
} }

11
Set_Move_Type.hpp Normal file
View File

@ -0,0 +1,11 @@
void __cdecl Redirected_Set_Move_Type(void* Input, void* Output)
{
if (*(__int8*)((unsigned __int32)Output + 324) == 0)
{
*(float*)((unsigned __int32)Output + 472) = *(float*)((unsigned __int32)Output + 336);
}
*(__int8*)((unsigned __int32)Output + 324) = *(__int8*)((unsigned __int32)Input + 4);
*(__int8*)((unsigned __int32)Output + 325) = 0;
}

View File

@ -84,6 +84,7 @@
<ItemGroup> <ItemGroup>
<ClInclude Include="Calculate_View.hpp" /> <ClInclude Include="Calculate_View.hpp" />
<ClInclude Include="Process_Movement.hpp" /> <ClInclude Include="Process_Movement.hpp" />
<ClInclude Include="Set_Move_Type.hpp" />
<ClInclude Include="Update.hpp" /> <ClInclude Include="Update.hpp" />
<ClInclude Include="Send_Move.hpp" /> <ClInclude Include="Send_Move.hpp" />
<ClInclude Include="Spawn_Grenade.hpp" /> <ClInclude Include="Spawn_Grenade.hpp" />

View File

@ -88,5 +88,8 @@
<ClInclude Include="Update_Animations.hpp"> <ClInclude Include="Update_Animations.hpp">
<Filter>Header++</Filter> <Filter>Header++</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Set_Move_Type.hpp">
<Filter>Header++</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>