mirror of
https://git.chinosk6.cn/chinosk/gkms-local.git
synced 2026-10-07 07:01:46 +07:00
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:
1 parent
f5a88a9127
commit
1855ae79cc
11 files changed
+432
-48
No files matched your search
@@ -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);
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace GakumasLocal::Config {
|
||||
int lodQualityLevel = 4;
|
||||
|
||||
bool enableBreastParam = false;
|
||||
int bUseLimit = 1;
|
||||
float bDamping = 0.33f;
|
||||
float bStiffness = 0.08f;
|
||||
float bSpring = 1.0f;
|
||||
@@ -40,6 +39,13 @@ namespace GakumasLocal::Config {
|
||||
bool bUseArmCorrection = true;
|
||||
bool bUseScale = false;
|
||||
float bScale = 1.0f;
|
||||
bool bUseLimit = true;
|
||||
float bLimitXx = 1.0f;
|
||||
float bLimitXy = 1.0f;
|
||||
float bLimitYx = 1.0f;
|
||||
float bLimitYy = 1.0f;
|
||||
float bLimitZx = 1.0f;
|
||||
float bLimitZy = 1.0f;
|
||||
|
||||
void LoadConfig(const std::string& configStr) {
|
||||
try {
|
||||
@@ -68,7 +74,6 @@ namespace GakumasLocal::Config {
|
||||
GetConfigItem(reflectionQualityLevel);
|
||||
GetConfigItem(lodQualityLevel);
|
||||
GetConfigItem(enableBreastParam);
|
||||
GetConfigItem(bUseLimit);
|
||||
GetConfigItem(bDamping);
|
||||
GetConfigItem(bStiffness);
|
||||
GetConfigItem(bSpring);
|
||||
@@ -79,6 +84,13 @@ namespace GakumasLocal::Config {
|
||||
GetConfigItem(bUseArmCorrection);
|
||||
GetConfigItem(bUseScale);
|
||||
GetConfigItem(bScale);
|
||||
GetConfigItem(bUseLimit);
|
||||
GetConfigItem(bLimitXx);
|
||||
GetConfigItem(bLimitXy);
|
||||
GetConfigItem(bLimitYx);
|
||||
GetConfigItem(bLimitYy);
|
||||
GetConfigItem(bLimitZx);
|
||||
GetConfigItem(bLimitZy);
|
||||
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace GakumasLocal::Config {
|
||||
extern int lodQualityLevel;
|
||||
|
||||
extern bool enableBreastParam;
|
||||
extern int bUseLimit;
|
||||
extern float bDamping;
|
||||
extern float bStiffness;
|
||||
extern float bSpring;
|
||||
@@ -39,6 +38,13 @@ namespace GakumasLocal::Config {
|
||||
extern bool bUseArmCorrection;
|
||||
extern bool bUseScale;
|
||||
extern float bScale;
|
||||
extern bool bUseLimit;
|
||||
extern float bLimitXx;
|
||||
extern float bLimitXy;
|
||||
extern float bLimitYx;
|
||||
extern float bLimitYy;
|
||||
extern float bLimitZx;
|
||||
extern float bLimitZy;
|
||||
|
||||
void LoadConfig(const std::string& configStr);
|
||||
}
|
||||
Reference in new issue
Block a user