Skip to content

Commit 7ddda7b

Browse files
committed
Fixed AXL [4]6S and Ram 214H hitboxes not displaying
1 parent e029e91 commit 7ddda7b

File tree

6 files changed

+22
-8
lines changed

6 files changed

+22
-8
lines changed

strivehitboxes/arcsys.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool asw_entity::is_active() const
8787
if (cinematic_flags & cinematic_flag::counter)
8888
return true;
8989

90-
return asw_entity_is_active(this, false);
90+
return asw_entity_is_active(this, !is_player);
9191
}
9292

9393
bool asw_entity::is_pushbox_active() const

strivehitboxes/arcsys.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ namespace cinematic_flag {
7878

7979
class asw_entity {
8080
public:
81+
FIELD(0x18, bool, is_player);
8182
FIELD(0x68, hitbox*, hitboxes);
8283
FIELD(0xFC, int, hurtbox_count);
8384
FIELD(0x100, int, hitbox_count);
@@ -86,6 +87,7 @@ class asw_entity {
8687
FIELD(0x308, asw_entity*, attached);
8788
FIELD(0x380, int, action_flags1);
8889
FIELD(0x384, int, action_flags2);
90+
FIELD(0x388, int, action_flags3);
8991
FIELD(0x394, direction, facing);
9092
FIELD(0x398, int, pos_x);
9193
FIELD(0x39C, int, pos_y);

strivehitboxes/main.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,17 @@ void draw_pushbox(UCanvas *canvas, const asw_entity *entity)
116116
draw_rect(canvas, corners, FLinearColor(1.f, 1.f, 0.f, .1f));
117117
}
118118

119-
void draw_hitboxes(UCanvas *canvas, const asw_entity *entity)
119+
void draw_hitboxes(UCanvas *canvas, const asw_entity *entity, bool active)
120120
{
121121
const auto count = entity->hitbox_count + entity->hurtbox_count;
122-
const auto *parent = entity->parent != nullptr ? entity->parent : entity;
123-
const auto active = parent->is_active();
124-
const auto invuln = entity->is_invuln();
125122

126123
for (auto boxidx = 0; boxidx < count; boxidx++) {
127124
const auto &box = entity->hitboxes[boxidx];
128125

129126
// Don't show inactive hitboxes
130127
if (box.type == hitbox::type::hit && !active)
131128
continue;
132-
else if (box.type == hitbox::type::hurt && invuln)
129+
else if (box.type == hitbox::type::hurt && entity->is_invuln())
133130
continue;
134131

135132
draw_hitbox(canvas, entity, box);
@@ -153,7 +150,14 @@ void draw_display(UCanvas *canvas)
153150
if (entity->is_pushbox_active())
154151
draw_pushbox(canvas, entity);
155152

156-
draw_hitboxes(canvas, entity);
153+
const auto active = entity->is_active();
154+
draw_hitboxes(canvas, entity, active);
155+
156+
const auto *attached = entity->attached;
157+
while (attached != nullptr) {
158+
draw_hitboxes(canvas, attached, active);
159+
attached = attached->attached;
160+
}
157161
}
158162
}
159163

strivehitboxes/strivehitboxes.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@
8282
</Link>
8383
</ItemDefinitionGroup>
8484
<ItemGroup>
85+
<ClCompile Include="bbscript.cpp" />
8586
<ClCompile Include="main.cpp" />
8687
<ClCompile Include="sigscan.cpp" />
8788
<ClCompile Include="arcsys.cpp" />
8889
<ClCompile Include="ue4.cpp" />
8990
</ItemGroup>
9091
<ItemGroup>
92+
<ClInclude Include="bbscript.h" />
9193
<ClInclude Include="sigscan.h" />
9294
<ClInclude Include="arcsys.h" />
9395
<ClInclude Include="struct_util.h" />

strivehitboxes/strivehitboxes.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<ClCompile Include="arcsys.cpp">
2828
<Filter>Source Files</Filter>
2929
</ClCompile>
30+
<ClCompile Include="bbscript.cpp">
31+
<Filter>Source Files</Filter>
32+
</ClCompile>
3033
</ItemGroup>
3134
<ItemGroup>
3235
<ClInclude Include="sigscan.h">
@@ -41,5 +44,8 @@
4144
<ClInclude Include="ue4.h">
4245
<Filter>Header Files</Filter>
4346
</ClInclude>
47+
<ClInclude Include="bbscript.h">
48+
<Filter>Header Files</Filter>
49+
</ClInclude>
4450
</ItemGroup>
4551
</Project>

striveinjector/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
const auto *exe = "GGST-Win64-Shipping.exe";
1212
const auto *dll = "strivehitboxes.dll";
13-
const auto *version = "v1.1";
13+
const auto *version = "v1.1.1";
1414

1515
bool elevate_privileges()
1616
{

0 commit comments

Comments
 (0)