diff --git a/Copy_Command.hpp b/Copy_Command.hpp index 08554a2..5b85043 100644 --- a/Copy_Command.hpp +++ b/Copy_Command.hpp @@ -237,8 +237,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu 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; @@ -250,29 +248,20 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu { if (*(__int8*)((unsigned __int32)Local_Player + 7322) == 0) { - if (*(void**)((unsigned __int32)Local_Player + 10008) != INVALID_HANDLE_VALUE) + if (*(void**)((unsigned __int32)Local_Player + 10008) == INVALID_HANDLE_VALUE) { - Sequence_Shift(2); + __int8 Is_Jockey_Victim = *(void**)((unsigned __int32)Local_Player + 10056) != INVALID_HANDLE_VALUE; + + if ((*(void**)((unsigned __int32)Local_Player + 10012) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10024) != INVALID_HANDLE_VALUE) + Is_Jockey_Victim != 0) + { + Command->Buttons |= Is_Jockey_Victim * 2; + + Absolute_Speed(); + } } 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(); - } + Sequence_Shift(2); } } else @@ -611,6 +600,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu if (Cancelable_Shove == 1) { + //note: may be asynchronous float Shove_Multiplier = min((Global_Variables->Current_Time - *(float*)((unsigned __int32)Weapon + 2704) + *(float*)((unsigned __int32)Weapon + 2700)) / *(float*)((unsigned __int32)Weapon + 2700), 1.f); Command->Angles[1] += -45.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier); diff --git a/Entry_Point.cpp b/Entry_Point.cpp index 6f4d8e9..67e95bf 100755 --- a/Entry_Point.cpp +++ b/Entry_Point.cpp @@ -300,6 +300,8 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2930985), 1, 235); Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 3118720), (void*)Redirected_Draw_Crosshair); + + //rem: vehicle crosshair } } } diff --git a/Write_Texture.hpp b/Write_Texture.hpp index b30b142..167ed60 100755 --- a/Write_Texture.hpp +++ b/Write_Texture.hpp @@ -14,10 +14,10 @@ void __thiscall Redirected_Write_Texture(void* Unknown_Parameter_1, void* Unknow unsigned __int32 Offset_X = Width; - unsigned __int32 Offset_Y = Height; - unsigned __int32 Character_Width = 0; + unsigned __int32 Offset_Y = Height; + unsigned __int32 Character_Height = 0; Traverse_Horizontal_Label: @@ -28,11 +28,11 @@ void __thiscall Redirected_Write_Texture(void* Unknown_Parameter_1, void* Unknow { if (*(unsigned __int32*)((unsigned __int32)Texture + X * 4 + Y * 4 * Width) != 0) { - Offset_X = min(Offset_X, X); + Offset_X = min(X, Offset_X); Character_Width = max(Character_Width, X + 1); - Offset_Y = min(Offset_Y, Y); + Offset_Y = min(Y, Offset_Y); Character_Height = max(Character_Height, Y + 1); }