mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-10 19:06:51 -04:00
d_a_obj_item done (#2150)
* d_a_obj_item 99% done * item cleanup * remove asm * add actor attention dist type enum * change dist_entry names slightly
This commit is contained in:
@@ -793,7 +793,7 @@ f32 dAttention_c::calcWeight(int param_0, fopAc_ac_c* param_1, f32 param_2, s16
|
||||
type_tbl_entry* entry = &table[i];
|
||||
|
||||
if (mPlayerAttentionFlags & entry->field_0x2 & param_1->attention_info.flags) {
|
||||
u8 index = param_1->attention_info.field_0x0[entry->field_0x0];
|
||||
u8 index = param_1->attention_info.distances[entry->field_0x0];
|
||||
dist_entry* d_entry = &dist_table[index];
|
||||
|
||||
if (fopAcM_checkStatus(param_1, 0x20000000) ||
|
||||
@@ -802,7 +802,7 @@ f32 dAttention_c::calcWeight(int param_0, fopAc_ac_c* param_1, f32 param_2, s16
|
||||
} else if (check_flontofplayer(d_entry->mAngleSelect, param_3, param_4)) {
|
||||
dvar12 = 0.0f;
|
||||
} else if (!check_distace(&mOwnerAttnPos, param_3, ¶m_1->attention_info.position,
|
||||
d_entry->mRadius1, d_entry->mDistanceAdjust, d_entry->mUpperY,
|
||||
d_entry->mDistMax, d_entry->mDistanceAdjust, d_entry->mUpperY,
|
||||
d_entry->mLowerY)) {
|
||||
dvar12 = 0.0f;
|
||||
} else {
|
||||
@@ -1143,7 +1143,7 @@ bool dAttention_c::chaseAttention() {
|
||||
f32 weight = calcWeight(0x4C, actor, g1.R(), a1.Val(), a2.Val(), &type);
|
||||
if (weight <= 0.0f) {
|
||||
type = mLockOnList[offset].mType;
|
||||
int tbl_idx = actor->attention_info.field_0x0[type];
|
||||
int tbl_idx = actor->attention_info.distances[type];
|
||||
|
||||
if (!chkAttMask(type, actor->attention_info.flags)) {
|
||||
return false;
|
||||
@@ -1152,7 +1152,7 @@ bool dAttention_c::chaseAttention() {
|
||||
} else if (check_flontofplayer(dist_table[tbl_idx].mAngleSelect, a1.Val(), a2.Val())) {
|
||||
return false;
|
||||
} else if (check_distace(&mOwnerAttnPos, a1.Val(), &actor->attention_info.position,
|
||||
dist_table[tbl_idx].mRadius2,
|
||||
dist_table[tbl_idx].mDistMaxRelease,
|
||||
dist_table[tbl_idx].mDistanceAdjust,
|
||||
dist_table[tbl_idx].mUpperY, dist_table[tbl_idx].mLowerY)) {
|
||||
mLockOnList[offset].mWeight = distace_weight(g1.R(), a1.Val(), 0.5f);
|
||||
@@ -1198,7 +1198,7 @@ f32 dAttention_c::EnemyDistance(fopAc_ac_c* i_actor) {
|
||||
distance = -1.0f;
|
||||
} else {
|
||||
distance = fopAcM_searchActorDistance(mpPlayer, i_actor);
|
||||
u8 tmp = i_actor->attention_info.field_0x0[2];
|
||||
u8 tmp = i_actor->attention_info.distances[fopAc_attn_BATTLE_e];
|
||||
|
||||
if (distance < dist_table[tmp].field_0x0 + dist_table[tmp].field_0x8) {
|
||||
return distance;
|
||||
@@ -1958,7 +1958,7 @@ f32 dAttention_c::LockonReleaseDistanse() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int idx = actor->attention_info.field_0x0[mLockOnList[mLockOnOffset].mType];
|
||||
int idx = actor->attention_info.distances[mLockOnList[mLockOnOffset].mType];
|
||||
cSGlobe tmp_g(actor->attention_info.position - mOwnerAttnPos);
|
||||
cSAngle tmp_a(tmp_g.U() - fopAcM_GetShapeAngle_p(mpPlayer)->y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user