Skip to content

Commit 73a5020

Browse files
committed
Fix modifier motion type always being inferred as none
1 parent d42a841 commit 73a5020

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

game/scripts/vscripts/lib/dota_ts_adapter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,16 @@ export const registerModifier = (name?: string) => (modifier: new () => CDOTA_Mo
8787

8888
let type = LuaModifierType.LUA_MODIFIER_MOTION_NONE;
8989
let base = (modifier as any).____super;
90-
while (base && type === undefined) {
90+
while (base) {
9191
if (base === BaseModifierMotionBoth) {
9292
type = LuaModifierType.LUA_MODIFIER_MOTION_BOTH;
93+
break;
9394
} else if (base === BaseModifierMotionHorizontal) {
9495
type = LuaModifierType.LUA_MODIFIER_MOTION_HORIZONTAL;
96+
break;
9597
} else if (base === BaseModifierMotionVertical) {
9698
type = LuaModifierType.LUA_MODIFIER_MOTION_VERTICAL;
99+
break;
97100
}
98101

99102
base = base.____super;

0 commit comments

Comments
 (0)