Skip to content

Commit

Permalink
Allowed witches to target all playable characters
Browse files Browse the repository at this point in the history
This change is monstly for if any plugins use characters above 7 on survivor team.
  • Loading branch information
LuxLuma committed Mar 23, 2020
1 parent c84fef4 commit 40abd15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Expand Up @@ -25,20 +25,20 @@
{
"WitchAttack::GetVictim"
{
"linux" "13"
"windows" "6"
"linux" "13" //0x74 --> 0xEB
"windows" "6" //0x75 --> 0x90
}
"WitchAttack::OnStart"
{
"windows" "72"
"windows" "72" //0x75 --> 0x90
}
"WitchAttack::OnAnimationEvent"
{
"windows" "17"
"windows" "17" //0x75 --> 0x90
}
"WitchAttack::Update"
{
"windows" "60"
"windows" "60" //0x75 --> 0x90
}
}
"Signatures"
Expand Down
20 changes: 10 additions & 10 deletions left 4 fix/witch/witch_target_patch/scripting/Witch_Target_patch.sp
Expand Up @@ -75,15 +75,15 @@ public void OnPluginStart()
if(byte == 0x74)
{
GetVictim = patch + view_as<Address>(offset);
StoreToAddress(GetVictim, 0x7E, NumberType_Int8);
StoreToAddress(GetVictim, 0xEB, NumberType_Int8);
PrintToServer("WitchPatch Targeting patch applied 'WitchAttack::GetVictim'");
bDidPatch = true;
return;
}
else if(byte == 0x75)
{
GetVictim = patch + view_as<Address>(offset);
StoreToAddress(GetVictim, 0x7F, NumberType_Int8);
StoreToAddress(GetVictim, 0x90, NumberType_Int8);
PrintToServer("WitchPatch Targeting patch applied 'WitchAttack::GetVictim'");
bDidPatch = true;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ public void OnPluginStart()
if(byte == 0x75)
{
OnStart = patch + view_as<Address>(offset);
StoreToAddress(OnStart, 0x7F, NumberType_Int8);
StoreToAddress(OnStart, 0x90, NumberType_Int8);
PrintToServer("WitchPatch Targeting patch applied 'WitchAttack::OnStart'");
bDidPatch = true;
}
Expand Down Expand Up @@ -142,7 +142,7 @@ public void OnPluginStart()
if(byte == 0x75)
{
OnAnimationEvent = patch + view_as<Address>(offset);
StoreToAddress(OnAnimationEvent, 0x7F, NumberType_Int8);
StoreToAddress(OnAnimationEvent, 0x90, NumberType_Int8);
PrintToServer("WitchPatch Targeting patch applied 'WitchAttack::OnAnimationEvent'");
bDidPatch = true;
}
Expand Down Expand Up @@ -171,7 +171,7 @@ public void OnPluginStart()
if(byte == 0x75)
{
Update = patch + view_as<Address>(offset);
StoreToAddress(Update, 0x7F, NumberType_Int8);
StoreToAddress(Update, 0x90, NumberType_Int8);
PrintToServer("WitchPatch Targeting patch applied 'WitchAttack::Update'");
bDidPatch = true;
}
Expand Down Expand Up @@ -202,13 +202,13 @@ public void OnPluginEnd()
if(GetVictim != Address_Null)
{
byte = LoadFromAddress(view_as<Address>(GetVictim), NumberType_Int8);
if(byte == 0x7E)
if(byte == 0xEB)
{
StoreToAddress(view_as<Address>(GetVictim), 0x74, NumberType_Int8);
PrintToServer("WitchPatch restored 'WitchAttack::GetVictim'");
return;
}
else if(byte == 0x7F)
else if(byte == 0x90)
{
StoreToAddress(view_as<Address>(GetVictim), 0x75, NumberType_Int8);
PrintToServer("WitchPatch restored 'WitchAttack::GetVictim'");
Expand All @@ -218,7 +218,7 @@ public void OnPluginEnd()
if(OnStart != Address_Null)
{
byte = LoadFromAddress(OnStart, NumberType_Int8);
if(byte == 0x7F)
if(byte == 0x90)
{
StoreToAddress(OnStart, 0x75, NumberType_Int8);
PrintToServer("WitchPatch restored 'WitchAttack::OnStart'");
Expand All @@ -228,7 +228,7 @@ public void OnPluginEnd()
if(OnAnimationEvent != Address_Null)
{
byte = LoadFromAddress(OnAnimationEvent, NumberType_Int8);
if(byte == 0x7F)
if(byte == 0x90)
{
StoreToAddress(OnAnimationEvent, 0x75, NumberType_Int8);
PrintToServer("WitchPatch restored 'WitchAttack::OnAnimationEvent'");
Expand All @@ -238,7 +238,7 @@ public void OnPluginEnd()
if(Update != Address_Null)
{
byte = LoadFromAddress(Update, NumberType_Int8);
if(byte == 0x7F)
if(byte == 0x90)
{
StoreToAddress(Update, 0x75, NumberType_Int8);
PrintToServer("WitchPatch restored 'WitchAttack::Update'");
Expand Down

0 comments on commit 40abd15

Please sign in to comment.