1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-01-31 22:47:25 +00:00
This commit is contained in:
jugeeya 2019-05-21 08:41:05 -07:00
parent 09a50060ba
commit f555d43c76
2 changed files with 7 additions and 2 deletions

View file

@ -25,6 +25,11 @@ namespace app::sv_system
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 AttackModule

View file

@ -58,8 +58,8 @@ namespace app::lua_bind::WorkModule {
float angle = (DI_STATE - 1) * M_PI / 4.0;
// Either 0 (right) or PI (left)
if (DI_STATE = DI_RANDOM_IN_AWAY) {
angle = (rand() % 2) * M_PI;
if (DI_STATE == DI_RANDOM_IN_AWAY) {
angle = app::sv_math::rand(hash40("fighter"), 2) * M_PI;
}
// If facing left, reverse angle