Skip to content

Commit 7a22ba9

Browse files
committed
2 parents f625415 + d1616b5 commit 7a22ba9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/OrdnanceVelocity.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,4 +308,24 @@ namespace ExtraUtilities::Lua::Patches
308308
}
309309
return 0;
310310
}
311+
312+
int GetOrdnanceVelocMode(lua_State* L)
313+
{
314+
lua_pushinteger(L, Patch::velocOnlyInheritFront);
315+
return 1;
316+
}
317+
318+
int SetOrdnanceVelocMode(lua_State* L)
319+
{
320+
int mode = luaL_checkinteger(L, 1);
321+
322+
if (mode < 0 || mode > 1)
323+
{
324+
luaL_argerror(L, 1, "Extra Utilities: Invalid Ordnance Mode");
325+
}
326+
327+
Patch::velocOnlyInheritFront = mode;
328+
329+
return 0;
330+
}
311331
}

src/luaexport.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ namespace ExtraUtilities::Lua
313313
{ "SetUnitTurbo", &Patches::SetUnitTurbo },
314314
{ "GetOrdnanceVelocInheritance", &Patches::GetOrdnanceVelocInheritance },
315315
{ "SetOrdnanceVelocInheritance", &Patches::SetOrdnanceVelocInheritance },
316+
{ "GetOrdnanceVelocMode", Patches::GetOrdnanceVelocMode },
317+
{ "SetOrdnanceVelocMode", Patches::SetOrdnanceVelocMode },
316318
{ "GetShotConvergence", &Patches::GetShotConvergence },
317319
{ "SetShotConvergence", &Patches::SetShotConvergence },
318320

0 commit comments

Comments
 (0)