mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-03-04 22:02:19 +00:00
fix DI
This commit is contained in:
parent
09a50060ba
commit
f555d43c76
2 changed files with 7 additions and 2 deletions
|
@ -25,6 +25,11 @@ namespace app::sv_system
|
||||||
u64 battle_object_module_accessor(u64) asm("_ZN3app9sv_system29battle_object_module_accessorEP9lua_State") LINKABLE;
|
u64 battle_object_module_accessor(u64) asm("_ZN3app9sv_system29battle_object_module_accessorEP9lua_State") LINKABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace app::sv_math
|
||||||
|
{
|
||||||
|
int rand(u64 hash, int endIndex) asm("_ZN3app7sv_math4randEN3phx6Hash40Ei") LINKABLE;
|
||||||
|
}
|
||||||
|
|
||||||
namespace app::lua_bind
|
namespace app::lua_bind
|
||||||
{
|
{
|
||||||
namespace AttackModule
|
namespace AttackModule
|
||||||
|
|
|
@ -58,8 +58,8 @@ namespace app::lua_bind::WorkModule {
|
||||||
float angle = (DI_STATE - 1) * M_PI / 4.0;
|
float angle = (DI_STATE - 1) * M_PI / 4.0;
|
||||||
|
|
||||||
// Either 0 (right) or PI (left)
|
// Either 0 (right) or PI (left)
|
||||||
if (DI_STATE = DI_RANDOM_IN_AWAY) {
|
if (DI_STATE == DI_RANDOM_IN_AWAY) {
|
||||||
angle = (rand() % 2) * M_PI;
|
angle = app::sv_math::rand(hash40("fighter"), 2) * M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If facing left, reverse angle
|
// If facing left, reverse angle
|
||||||
|
|
Loading…
Add table
Reference in a new issue