mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2024-12-22 14:47:24 +08:00
prediction, autoshove
fix undefined timing correction; add shove timing condition; adjust chainsaw shoving logic.
This commit is contained in:
parent
309a0f2c27
commit
0381620f7d
@ -251,6 +251,8 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Local_Player + 5620) = Command->Command_Number;
|
||||||
|
|
||||||
void* Prediction = (void*)((unsigned __int32)Client_Module + 8072728);
|
void* Prediction = (void*)((unsigned __int32)Client_Module + 8072728);
|
||||||
|
|
||||||
*(__int8*)((unsigned __int32)Prediction + 8) = 1;
|
*(__int8*)((unsigned __int32)Prediction + 8) = 1;
|
||||||
@ -388,16 +390,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
||||||
|
|
||||||
using Get_Sequence_Duration_Type = float(__thiscall*)(void* Entity, void* Studio_Header, __int32 Sequence);
|
|
||||||
|
|
||||||
using Select_Sequence_Type = __int32(__thiscall*)(void* Entity, __int32 Activity);
|
|
||||||
|
|
||||||
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon);
|
|
||||||
|
|
||||||
using Translate_Activity_Type = __int32(__thiscall**)(void* Weapon, __int32 Activity);
|
|
||||||
|
|
||||||
__int8 Holstering = min(*(float*)((unsigned __int32)Local_Player + 3872), *(float*)((unsigned __int32)Weapon + 2412)) + Get_Sequence_Duration_Type((unsigned __int32)Client_Module + 180400)(Weapon, Get_Studio_Header(Weapon), Select_Sequence_Type((unsigned __int32)Client_Module + 202896)(Weapon, (*Translate_Activity_Type(*(unsigned __int32*)Weapon + 1692))(Weapon, (*Get_Deploy_Activity_Type(*(unsigned __int32*)Weapon + 1600))(Weapon)))) > Global_Variables->Current_Time;
|
|
||||||
|
|
||||||
using Get_Weapon_Data_Type = void*(__thiscall*)(void* Weapon);
|
using Get_Weapon_Data_Type = void*(__thiscall*)(void* Weapon);
|
||||||
|
|
||||||
void* Weapon_Data = Get_Weapon_Data_Type((unsigned __int32)Client_Module + 86432)(Weapon);
|
void* Weapon_Data = Get_Weapon_Data_Type((unsigned __int32)Client_Module + 86432)(Weapon);
|
||||||
@ -406,14 +398,10 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time) * (*(__int32*)((unsigned __int32)Weapon + 2436) > 0 - Is_Melee * 2) * (Reloading ^ 1) * (*(float*)((unsigned __int32)Local_Player + 3872) <= Global_Variables->Current_Time);
|
__int8 Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time) * (*(__int32*)((unsigned __int32)Weapon + 2436) > 0 - Is_Melee * 2) * (Reloading ^ 1) * (*(float*)((unsigned __int32)Local_Player + 3872) <= Global_Variables->Current_Time);
|
||||||
|
|
||||||
Holstering *= Can_Attack ^ 1;
|
|
||||||
|
|
||||||
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
__int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
|
__int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
|
||||||
|
|
||||||
__int8 Is_Cold_Melee = Weapon_Identifier == 231;
|
|
||||||
|
|
||||||
using Get_Eye_Position_Type = void(__thiscall*)(void* Entity, float* Eye_Position);
|
using Get_Eye_Position_Type = void(__thiscall*)(void* Entity, float* Eye_Position);
|
||||||
|
|
||||||
float Eye_Position[3];
|
float Eye_Position[3];
|
||||||
@ -424,7 +412,19 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Target_Structure* Shove_Target = nullptr;
|
Target_Structure* Shove_Target = nullptr;
|
||||||
|
|
||||||
//td: timing condition
|
if (Cancelable_Shove + (*(float*)((unsigned __int32)Weapon + 2400) == *(float*)((unsigned __int32)Weapon + 2404)) > 1)
|
||||||
|
{
|
||||||
|
using Get_Sequence_Duration_Type = float(__thiscall*)(void* Entity, void* Studio_Header, __int32 Sequence);
|
||||||
|
|
||||||
|
using Select_Sequence_Type = __int32(__thiscall*)(void* Entity, __int32 Activity);
|
||||||
|
|
||||||
|
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon);
|
||||||
|
|
||||||
|
using Translate_Activity_Type = __int32(__thiscall**)(void* Weapon, __int32 Activity);
|
||||||
|
|
||||||
|
__int8 Holstering = (min(*(float*)((unsigned __int32)Local_Player + 3872), *(float*)((unsigned __int32)Weapon + 2412)) + Get_Sequence_Duration_Type((unsigned __int32)Client_Module + 180400)(Weapon, Get_Studio_Header(Weapon), Select_Sequence_Type((unsigned __int32)Client_Module + 202896)(Weapon, (*Translate_Activity_Type(*(unsigned __int32*)Weapon + 1692))(Weapon, (*Get_Deploy_Activity_Type(*(unsigned __int32*)Weapon + 1600))(Weapon)))) > Global_Variables->Current_Time) * (Can_Attack ^ 1);
|
||||||
|
|
||||||
|
__int8 Is_Cold_Melee = Weapon_Identifier == 231;
|
||||||
|
|
||||||
Shove_Traverse_Sorted_Target_List_Label:
|
Shove_Traverse_Sorted_Target_List_Label:
|
||||||
{
|
{
|
||||||
@ -434,7 +434,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Forced = 0;
|
__int8 Forced = 0;
|
||||||
|
|
||||||
if ((Reloading + Holstering + Is_Melee) * (Action + Reviving ^ 1) != 0)
|
if ((Reloading + Holstering + Is_Melee * (Weapon_Identifier * (Command->Buttons & 1) != 39)) * (Action + Reviving ^ 1) != 0)
|
||||||
{
|
{
|
||||||
if ((Target->Identifier ^ 72) % 348 >= 72)
|
if ((Target->Identifier ^ 72) % 348 >= 72)
|
||||||
{
|
{
|
||||||
@ -536,6 +536,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Cancelable_Shove != 0)
|
if (Cancelable_Shove != 0)
|
||||||
{
|
{
|
||||||
|
1
Move.hpp
1
Move.hpp
@ -35,7 +35,6 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
|||||||
{
|
{
|
||||||
(decltype(&Redirected_Move)(Original_Move_Caller))(Unknown_Parameter, Final);
|
(decltype(&Redirected_Move)(Original_Move_Caller))(Unknown_Parameter, Final);
|
||||||
|
|
||||||
//td: reprediction timing
|
|
||||||
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
||||||
|
|
||||||
if (Extra_Commands > 0)
|
if (Extra_Commands > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user