mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-01-07 01:53:25 +08:00
fast actions, fix versus crash
"immobilized" attacks in versus are also considered as action
This commit is contained in:
parent
7b440b4004
commit
8496bfcbeb
@ -223,32 +223,85 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
}
|
||||
};
|
||||
|
||||
//td: disable clock correction serversidely abusing m_nChokedPackets
|
||||
if (*(__int32*)((unsigned __int32)Local_Player + 228) == 3)
|
||||
//td: m_nServerTick should be used inside of Set_Move_Type, on restoration
|
||||
auto Absolute_Speed = [&]() -> void
|
||||
{
|
||||
if (*(__int8*)((unsigned __int32)Local_Player + 7322) == 1)
|
||||
if (Interface_Extra_Commands_Action.Integer > 0)
|
||||
{
|
||||
if (*(__int32*)((unsigned __int32)Local_Player + 7324) == 0)
|
||||
if (Extended_Command == Initial_Extended_Command)
|
||||
{
|
||||
Sequence_Shift(-2);
|
||||
Extended_Command->Extra_Commands = 0;
|
||||
|
||||
Extra_Commands = Interface_Extra_Commands_Action.Integer;
|
||||
}
|
||||
|
||||
if (Initial_Extended_Command->Extra_Commands == 0)
|
||||
{
|
||||
*(float*)((unsigned __int32)Local_Player + 16) = 1.f;
|
||||
|
||||
*(__int32*)((unsigned __int32)Network_Channel + 16) = -1;
|
||||
|
||||
*(__int32*)((unsigned __int32)Network_Channel + 28) = 255;
|
||||
}
|
||||
}
|
||||
else
|
||||
};
|
||||
|
||||
if (*(__int32*)((unsigned __int32)Local_Player + 228) == 3)
|
||||
{
|
||||
if (*(__int8*)((unsigned __int32)Local_Player + 7322) == 0)
|
||||
{
|
||||
if (*(void**)((unsigned __int32)Local_Player + 10008) != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
Sequence_Shift(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
//td: fix prediction errors on jockey
|
||||
if ((*(void**)((unsigned __int32)Local_Player + 10012) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10024) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10056) != INVALID_HANDLE_VALUE) == 0)
|
||||
{
|
||||
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Local_Player + 7892) & 4095) - 4097) << 4));
|
||||
|
||||
if (Ability != nullptr)
|
||||
{
|
||||
if (*(__int32*)((unsigned __int32)Ability + 1700) == 3)
|
||||
{
|
||||
Absolute_Speed();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Absolute_Speed();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*(__int32*)((unsigned __int32)Local_Player + 7324) == 0)
|
||||
{
|
||||
Sequence_Shift(-2);
|
||||
}
|
||||
}
|
||||
|
||||
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
__int8 Action = *(__int32*)((unsigned __int32)Local_Player + 7080) != 0;
|
||||
|
||||
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
||||
|
||||
if ((*(float*)((unsigned __int32)Local_Player + 4604) + 800.f * Global_Variables->Interval_Per_Tick >= 560.f) + *(__int8*)((unsigned __int32)Local_Player + 8068) + *(__int8*)((unsigned __int32)Local_Player + 9708) != 0)
|
||||
{
|
||||
Sequence_Shift(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Action + Reviving != 0)
|
||||
{
|
||||
Absolute_Speed();
|
||||
}
|
||||
}
|
||||
|
||||
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
||||
|
||||
@ -274,8 +327,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
if ((*(__int32*)((unsigned __int32)Local_Player + 324) & 9) == 0)
|
||||
{
|
||||
__int8 Action = *(__int32*)((unsigned __int32)Local_Player + 7080) != 0;
|
||||
|
||||
if ((*(__int32*)((unsigned __int32)Local_Player + 5020) & 32) * (Action ^ 1) == 0)
|
||||
{
|
||||
using Can_Attack_Type = __int8(__thiscall*)(void* Player);
|
||||
@ -441,8 +492,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
size_t Target_Number = 0;
|
||||
|
||||
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
||||
|
||||
using Get_Eye_Position_Type = void(__thiscall*)(void* Entity, float* Eye_Position);
|
||||
|
||||
float Eye_Position[3];
|
||||
@ -863,7 +912,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
Correct_Movement();
|
||||
|
||||
*(__int8*)((unsigned __int32)__builtin_frame_address(0) + 235) = Extra_Commands <= 0;
|
||||
*(__int8*)((unsigned __int32)__builtin_frame_address(0) + 235) = max(Extra_Commands <= 0, *(__int32*)((unsigned __int32)Network_Channel + 16) == -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,8 @@ struct Interface_Structure
|
||||
|
||||
Interface_Structure Interface_Extra_Commands;
|
||||
|
||||
Interface_Structure Interface_Extra_Commands_Action;
|
||||
|
||||
Interface_Structure Interface_Interpolate_Extra_Commands;
|
||||
|
||||
Interface_Structure Interface_Target_On_Simulation;
|
||||
@ -54,6 +56,8 @@ void Implement_Extended_Interface()
|
||||
|
||||
Create_Interface(Pointer_Name(Interface_Extra_Commands), (char*)"5", nullptr);
|
||||
|
||||
Create_Interface(Pointer_Name(Interface_Extra_Commands_Action), (char*)"10", nullptr);
|
||||
|
||||
Create_Interface(Pointer_Name(Interface_Interpolate_Extra_Commands), (char*)"1", nullptr);
|
||||
|
||||
Create_Interface(Pointer_Name(Interface_Target_On_Simulation), (char*)"0", nullptr);
|
||||
|
@ -13,10 +13,13 @@ void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Playe
|
||||
|
||||
(decltype(&Redirected_Process_Movement)(Original_Process_Movement_Caller))(Unknown_Parameter, Player, Move_Data);
|
||||
|
||||
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
|
||||
|
||||
if (Ability != nullptr)
|
||||
if (Get_Identifier(Player, 0, 0) == 272)
|
||||
{
|
||||
*(float*)((unsigned __int32)Ability + 1636) = 0.f;
|
||||
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
|
||||
|
||||
if (Ability != nullptr)
|
||||
{
|
||||
*(float*)((unsigned __int32)Ability + 1636) = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
@ -62,7 +62,10 @@ void Redirected_Send_Move()
|
||||
|
||||
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
|
||||
|
||||
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
||||
if (*(__int32*)((unsigned __int32)Network_Channel + 16) != -1)
|
||||
{
|
||||
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
||||
}
|
||||
|
||||
using Send_Message_Type = void(__thiscall**)(void* Network_Channel, void* Message, void* Unknown_Parameter_1, void* Unknown_Parameter_2);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user