mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-06-08 10:39:35 +08:00
prevent memory corruption on packet loss
realistically, shouldn't ever happen; theoretically, may happen on great uptime.
This commit is contained in:
parent
631d1e1358
commit
359928047c
@ -87,8 +87,6 @@ void __thiscall Redirected_Post_Network_Data_Received(void* Unknown_Parameter, _
|
||||
{
|
||||
Predicton_Copy.Construct(Local_Player, Prediction_Frame, (void*)Predicton_Copy_Compare);
|
||||
|
||||
Consistent_Time = Commands_Acknowledged > 150;
|
||||
|
||||
using Transfer_Data_Type = __int32(__thiscall*)(Prediction_Copy_Structure* Prediction_Copy, void* Unknown_Parameter, __int32 Entity_Number, Prediction_Descriptor_Structure* Descriptor);
|
||||
|
||||
Transfer_Data_Type((unsigned __int32)Client_Module + 1573744)(&Predicton_Copy, nullptr, -1, (Prediction_Descriptor_Structure*)((unsigned __int32)Client_Module + 7236480));
|
||||
|
@ -2,5 +2,7 @@ void* Original_Update_Caller;
|
||||
|
||||
void __thiscall Redirected_Update(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, __int32 Incoming_Sequence_Number, int Outgoing_Sequence_Number)
|
||||
{
|
||||
Consistent_Time = Outgoing_Sequence_Number - Incoming_Sequence_Number > 150;
|
||||
|
||||
(decltype(&Redirected_Update)(Original_Update_Caller))(Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Incoming_Sequence_Number, Incoming_Sequence_Number + (Outgoing_Sequence_Number - Incoming_Sequence_Number) % 150);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user