mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2024-12-22 14:47:24 +08:00
bug fixes, logic fixes
This commit is contained in:
parent
1af4705b49
commit
2028a2886b
@ -179,20 +179,13 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (Extra_Commands < 1)
|
if (Extra_Commands < 1)
|
||||||
{
|
{
|
||||||
if (Reserve == 0)
|
__int32 Sequence_Shift = (*(__int32*)((unsigned __int32)Local_Player + 5324) + ~-150) / 150 * 150 + (Reserve * 150);
|
||||||
{
|
|
||||||
*(__int32*)((unsigned __int32)Network_Channel + 8) += 150;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
__int32 Sequence_Shift = (*(__int32*)((unsigned __int32)Local_Player + 5324) + ~- 150) / 150 * 150 + (Reserve * 150);
|
|
||||||
|
|
||||||
if (Sequence_Shift > 0)
|
if (Sequence_Shift > 0)
|
||||||
{
|
{
|
||||||
*(__int32*)((unsigned __int32)Network_Channel + 8) += Sequence_Shift;
|
*(__int32*)((unsigned __int32)Network_Channel + 8) += Sequence_Shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 20) = 1 + (Reserve > 0);
|
*(__int32*)((unsigned __int32)Local_Player + 20) = 1 + (Reserve > 0);
|
||||||
};
|
};
|
||||||
@ -363,10 +356,10 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Is_Melee = *(__int32*)((unsigned __int32)Weapon_Data + 352) * (*(__int32*)((unsigned __int32)Weapon_Data + 348) ^ 1) <= 1;
|
__int8 Is_Melee = *(__int32*)((unsigned __int32)Weapon_Data + 352) * (*(__int32*)((unsigned __int32)Weapon_Data + 348) ^ 1) <= 1;
|
||||||
|
|
||||||
__int8 Healing = (*(__int32*)((unsigned __int32)Local_Player + 7080) == 1) + (*(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE);
|
|
||||||
|
|
||||||
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
||||||
|
|
||||||
|
__int32 Healing = (*(__int32*)((unsigned __int32)Local_Player + 7080) == 1) + (*(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;
|
__int8 Is_Cold_Melee = Weapon_Identifier == 231;
|
||||||
@ -389,7 +382,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Forced = 0;
|
__int8 Forced = 0;
|
||||||
|
|
||||||
if (Is_Melee + Healing + Reloading != 0)
|
if ((Is_Melee + Reloading) * (Healing ^ 1) != 0)
|
||||||
{
|
{
|
||||||
if ((Target->Identifier ^ 72) % 348 >= 72)
|
if ((Target->Identifier ^ 72) % 348 >= 72)
|
||||||
{
|
{
|
||||||
@ -405,7 +398,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
||||||
|
|
||||||
if ((Infected ^ 1) + (*(__int32*)((unsigned __int32)Target->Self + 52) == 15) != 0)
|
__int32 Gender = *(__int32*)((unsigned __int32)Target->Self + 52);
|
||||||
|
|
||||||
|
if ((Infected ^ 1) + (Gender == 15) != 0)
|
||||||
{
|
{
|
||||||
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
||||||
|
|
||||||
@ -441,6 +436,8 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
Perform_Trace_Target = nullptr;
|
Perform_Trace_Target = nullptr;
|
||||||
|
|
||||||
if (Perform_Trace_Damage == 1)
|
if (Perform_Trace_Damage == 1)
|
||||||
|
{
|
||||||
|
if (Healing == 0)
|
||||||
{
|
{
|
||||||
Command->Tick_Number = Target->Tick_Number;
|
Command->Tick_Number = Target->Tick_Number;
|
||||||
|
|
||||||
@ -463,15 +460,17 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Block_Buttons = 1;
|
Block_Buttons = 1;
|
||||||
|
|
||||||
if (Interface_Riot_Deprioritize.Integer == 1)
|
Cancelable_Shove = (Gender * Interface_Riot_Deprioritize.Integer * (Forced ^ 1)) == 15;
|
||||||
{
|
|
||||||
Cancelable_Shove = Infected * 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
||||||
|
|
||||||
goto Shove_Found_Target_Label;
|
goto Shove_Found_Target_Label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cancelable_Shove = 0;
|
||||||
|
|
||||||
|
goto Shove_Found_Target_Label;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -492,7 +491,7 @@ 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) * (*(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) * (*(float*)((unsigned __int32)Local_Player + 3872) <= Global_Variables->Current_Time);
|
||||||
|
|
||||||
if (Healing + (Can_Attack ^ 1) + (Weapon_Identifier == 96) == 0)
|
if ((Weapon_Identifier == 96) + (Can_Attack ^ 1) == 0)
|
||||||
{
|
{
|
||||||
Target_Structure* Aim_Target = nullptr;
|
Target_Structure* Aim_Target = nullptr;
|
||||||
|
|
||||||
@ -700,34 +699,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Weapon_Identifier == 73)
|
|
||||||
{
|
|
||||||
//ideally 150 commands should always be buffered beforehand
|
|
||||||
//at worst buffer them right before slot* command
|
|
||||||
//current solution without buffering takes (interval_per_tick*150) seconds to prepare itself
|
|
||||||
//reason why i'm not doing that now is because it'll take time to redesign prediction code to function properly
|
|
||||||
//specifically:
|
|
||||||
//ignoring network time updates for good period of time isn't good idea
|
|
||||||
//viewmodel animations will jitter at moment of centering around network time
|
|
||||||
//so is interpolation
|
|
||||||
//besides all that, it'll invoke clock correction on server's side and that's pretty unstable (especially on ~100 tickrate)
|
|
||||||
|
|
||||||
Global_Variables->Current_Time -= Global_Variables->Interval_Per_Tick * 150;
|
|
||||||
|
|
||||||
//leaving other ones of sanity for later
|
|
||||||
if (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time)
|
|
||||||
{
|
|
||||||
if ((Command->Buttons & 2049) != 0)
|
|
||||||
{
|
|
||||||
Sequence_Shift(0);
|
|
||||||
|
|
||||||
Block_Buttons = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Command->Buttons & 1) == 1)
|
if ((Command->Buttons & 1) == 1)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
|||||||
{
|
{
|
||||||
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
||||||
{
|
{
|
||||||
if (*(__int32*)((unsigned __int32)Entity + 572) == 131088)
|
if ((*(__int32*)((unsigned __int32)Entity + 572) - 131088 & 255) == 0)
|
||||||
{
|
{
|
||||||
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
void __thiscall Perform_Shove_Trace(void* Stack)
|
void __thiscall Perform_Shove_Trace(void* Stack)
|
||||||
{
|
{
|
||||||
void* Entity = *(void**)((unsigned __int32)Stack - 276);
|
void* Entity = *(void**)((unsigned __int32)Stack + 332);
|
||||||
|
|
||||||
if (Entity == Perform_Trace_Target)
|
if (Entity == Perform_Trace_Target)
|
||||||
{
|
{
|
||||||
|
@ -6,20 +6,20 @@ void __thiscall Redirected_Spawn_Grenade(void* Entity)
|
|||||||
|
|
||||||
float Minimum[3] =
|
float Minimum[3] =
|
||||||
{
|
{
|
||||||
-16,
|
-16.f,
|
||||||
|
|
||||||
-16,
|
-16.f,
|
||||||
|
|
||||||
-16
|
-16.f
|
||||||
};
|
};
|
||||||
|
|
||||||
float Maximum[3] =
|
float Maximum[3] =
|
||||||
{
|
{
|
||||||
16,
|
16.f,
|
||||||
|
|
||||||
16,
|
16.f,
|
||||||
|
|
||||||
16
|
16.f
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);
|
Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);
|
||||||
|
Loading…
Reference in New Issue
Block a user