mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-02 19:58:01 +03:00
Several fixes
This commit is contained in:
@@ -1319,6 +1319,7 @@ namespace mdl {
|
||||
float_t stack_angle = (float_t)((M_PI / 2.0) - (double_t)i * stack_step);
|
||||
float_t xz = cosf(stack_angle);
|
||||
float_t y = sinf(stack_angle);
|
||||
y *= radius;
|
||||
|
||||
data.reserve(6ULL * 2 * slices);
|
||||
|
||||
@@ -1342,6 +1343,7 @@ namespace mdl {
|
||||
float_t stack_angle = (float_t)((M_PI / 2.0) - (double_t)i * stack_step);
|
||||
float_t xz = cosf(stack_angle);
|
||||
float_t y = sinf(stack_angle);
|
||||
y *= radius;
|
||||
|
||||
data.reserve(6ULL * 2 * slices);
|
||||
|
||||
|
||||
@@ -3821,7 +3821,7 @@ static void sub_14047D620(RobOsage* rob_osg, float_t step) {
|
||||
vec3 v7 = nodes.data()[0].trans;
|
||||
OsageCollision::Work* coli = rob_osg->coli;
|
||||
OsageCollision::Work* coli_ring = rob_osg->coli_ring;
|
||||
int32_t coli_type = rob_osg->skin_param_ptr->coli_type;
|
||||
SkinParam::RootCollisionType coli_type = rob_osg->skin_param_ptr->coli_type;
|
||||
RobOsageNode* i_begin = nodes.data() + 1;
|
||||
RobOsageNode* i_end = nodes.data() + nodes.size();
|
||||
for (RobOsageNode* i = i_begin; i != i_end; i++) {
|
||||
@@ -3834,7 +3834,8 @@ static void sub_14047D620(RobOsage* rob_osg, float_t step) {
|
||||
j->field_C8 += v17;
|
||||
}
|
||||
|
||||
if (coli_type && (coli_type != SkinParam::RootCollisionTypeBall || i != i_begin)) {
|
||||
if (coli_type != SkinParam::RootCollisionTypeEnd
|
||||
&& (coli_type != SkinParam::RootCollisionTypeBall || i != i_begin)) {
|
||||
float_t v20 = (float_t)(
|
||||
OsageCollision::osage_capsule_cls(coli_ring, i[0].trans, i[-1].trans, data->skp_osg_node.coli_r)
|
||||
+ OsageCollision::osage_capsule_cls(coli, i[0].trans, i[-1].trans, data->skp_osg_node.coli_r));
|
||||
|
||||
+2
-2
@@ -1678,7 +1678,7 @@ struct skin_param_osage_root {
|
||||
float_t wind_afc;
|
||||
int32_t yz_order;
|
||||
std::vector<skin_param_osage_root_boc> boc;
|
||||
int32_t coli_type;
|
||||
SkinParam::RootCollisionType coli_type;
|
||||
float_t stiffness;
|
||||
float_t move_cancel;
|
||||
std::string colli_tgt_osg;
|
||||
@@ -1695,7 +1695,7 @@ struct skin_param {
|
||||
float_t air_res;
|
||||
vec3 rot;
|
||||
vec3 init_rot;
|
||||
int32_t coli_type;
|
||||
SkinParam::RootCollisionType coli_type;
|
||||
float_t stiffness;
|
||||
float_t move_cancel;
|
||||
float_t coli_r;
|
||||
|
||||
@@ -117,13 +117,14 @@ skin_param_osage_root_boc::~skin_param_osage_root_boc() {
|
||||
}
|
||||
|
||||
skin_param_osage_root::skin_param_osage_root() : field_0(), force(), force_gain(),
|
||||
rot_y(), rot_z(), init_rot_y(), init_rot_z(), coli_r(), yz_order(), coli_type(), stiffness() {
|
||||
rot_y(), rot_z(), init_rot_y(), init_rot_z(), coli_r(), yz_order(), stiffness() {
|
||||
air_res = 0.5f;
|
||||
hinge_y = 90.0f;
|
||||
hinge_z = 90.0f;
|
||||
name ="NO-PARAM";
|
||||
name = "NO-PARAM";
|
||||
friction = 1.0f;
|
||||
wind_afc = 0.5f;
|
||||
coli_type = SkinParam::RootCollisionTypeEnd;
|
||||
move_cancel = -0.01f;
|
||||
coli.resize(13);
|
||||
}
|
||||
@@ -358,7 +359,7 @@ void skin_param_osage_root_parse(void* kv, const char* name,
|
||||
|
||||
int32_t coli_type = 0;
|
||||
if (_kv->read("coli_type", coli_type))
|
||||
skp_root.coli_type = coli_type;
|
||||
skp_root.coli_type = (SkinParam::RootCollisionType)coli_type;
|
||||
|
||||
float_t init_rot_y = 0.0f;
|
||||
float_t init_rot_z = 0.0f;
|
||||
|
||||
@@ -971,7 +971,7 @@ static void sub_14047D620(RobOsage* rob_osg, float_t step) {
|
||||
vec3 v7 = nodes.data()[0].trans;
|
||||
OsageCollision::Work* coli = rob_osg->coli;
|
||||
OsageCollision::Work* coli_ring = rob_osg->coli_ring;
|
||||
int32_t coli_type = rob_osg->skin_param_ptr->coli_type;
|
||||
SkinParam::RootCollisionType coli_type = rob_osg->skin_param_ptr->coli_type;
|
||||
RobOsageNode* i_begin = nodes.data() + 1;
|
||||
RobOsageNode* i_end = nodes.data() + nodes.size();
|
||||
for (RobOsageNode* i = i_begin; i != i_end; i++) {
|
||||
@@ -983,7 +983,8 @@ static void sub_14047D620(RobOsage* rob_osg, float_t step) {
|
||||
i->field_C8 += v17;
|
||||
j->field_C8 += v17;
|
||||
}
|
||||
if (coli_type && (coli_type != 1 || i != i_begin)) {
|
||||
if (coli_type != SkinParam::RootCollisionTypeEnd
|
||||
&& (coli_type != SkinParam::RootCollisionTypeBall || i != i_begin)) {
|
||||
float_t v20 = (float_t)(
|
||||
OsageCollision::osage_capsule_cls(coli_ring, i[0].trans, i[-1].trans, data->skp_osg_node.coli_r)
|
||||
+ OsageCollision::osage_capsule_cls(coli, i[0].trans, i[-1].trans, data->skp_osg_node.coli_r));
|
||||
|
||||
@@ -853,6 +853,13 @@ namespace SkinParam {
|
||||
CollisionTypeAABB = 0x5,
|
||||
CollisionTypeMax = 0x6,
|
||||
};
|
||||
|
||||
enum RootCollisionType {
|
||||
RootCollisionTypeEnd = 0x0,
|
||||
RootCollisionTypeBall = 0x1,
|
||||
RootCollisionTypeCapsule = 0x2,
|
||||
RootCollisionTypeMax = 0x3,
|
||||
};
|
||||
}
|
||||
|
||||
enum shadow_type_enum {
|
||||
@@ -2964,7 +2971,7 @@ struct skin_param_osage_root {
|
||||
float_t wind_afc;
|
||||
int32_t yz_order;
|
||||
prj::vector<skin_param_osage_root_boc> boc;
|
||||
int32_t coli_type;
|
||||
SkinParam::RootCollisionType coli_type;
|
||||
float_t stiffness;
|
||||
float_t move_cancel;
|
||||
prj::string colli_tgt_osg;
|
||||
@@ -3176,7 +3183,7 @@ struct skin_param {
|
||||
float_t air_res;
|
||||
vec3 rot;
|
||||
vec3 init_rot;
|
||||
int32_t coli_type;
|
||||
SkinParam::RootCollisionType coli_type;
|
||||
float_t stiffness;
|
||||
float_t move_cancel;
|
||||
float_t coli_r;
|
||||
|
||||
Reference in New Issue
Block a user