Pre releases 0.0.1 (#20)

* update submodule, breast limit multiplier

* add type, add limit axis config

* update layout

* update submodule

* update workflow
This commit is contained in:
chinosk
2024-06-16 11:53:50 -05:00
committed by GitHub
parent f5a88a9127
commit 1855ae79cc
11 changed files with 432 additions and 48 deletions

View File

@@ -740,6 +740,9 @@ namespace GakumasLocal::HookMain {
static auto limitInfo_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("limitInfo");
static auto limitInfo_useLimit_field = LimitInfo_klass->Get<UnityResolve::Field>("useLimit");
static auto limitInfo_axisX_field = LimitInfo_klass->Get<UnityResolve::Field>("axisX");
static auto limitInfo_axisY_field = LimitInfo_klass->Get<UnityResolve::Field>("axisY");
static auto limitInfo_axisZ_field = LimitInfo_klass->Get<UnityResolve::Field>("axisZ");
auto swingBreastBones = Il2cppUtils::ClassGetFieldValue
<UnityResolve::UnityType::List<UnityResolve::UnityType::MonoBehaviour*>*>(initializeData, Data_swingBreastBones_field);
@@ -778,8 +781,26 @@ namespace GakumasLocal::HookMain {
Log::DebugFmt("orig bone: damping: %f, stiffness: %f, spring: %f, pendulum: %f, "
"pendulumRange: %f, average: %f, rootWeight: %f, useLimit: %d, useArmCorrection: %d, isDirty: %d",
damping, stiffness, spring, pendulum, pendulumRange, average, rootWeight, useLimit, useArmCorrection, isDirty);
if (!Config::bUseLimit) {
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, 0);
}
else {
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, 1);
auto axisX = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisX_field);
auto axisY = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisY_field);
auto axisZ = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Vector2Int>(limitInfo, limitInfo_axisZ_field);
axisX.m_X *= Config::bLimitXx;
axisX.m_Y *= Config::bLimitXy;
axisY.m_X *= Config::bLimitYx;
axisY.m_Y *= Config::bLimitYy;
axisZ.m_X *= Config::bLimitZx;
axisZ.m_Y *= Config::bLimitZy;
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisX_field, axisX);
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisY_field, axisY);
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_axisZ_field, axisZ);
}
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, Config::bUseLimit);
Il2cppUtils::ClassSetFieldValue(bone, damping_field, Config::bDamping);
Il2cppUtils::ClassSetFieldValue(bone, stiffness_field, Config::bStiffness);
Il2cppUtils::ClassSetFieldValue(bone, spring_field, Config::bSpring);