mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-27 19:44:40 +00:00
clarify "in range" of what it is
This commit is contained in:
parent
d8911078a4
commit
768297f400
1 changed files with 10 additions and 10 deletions
|
@ -856,7 +856,7 @@ s32 EnGo2_UpdateTalking(EnGo2* this, PlayState* play) {
|
||||||
EnGo2_GetTextId, EnGo2_UpdateTalkState);
|
EnGo2_GetTextId, EnGo2_UpdateTalkState);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Biggoron is close enough; see `EnGo2_IsInRange`
|
// Biggoron is close enough; see `EnGo2_IsWithinInteactionRange`
|
||||||
if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON && !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
|
if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON && !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1002,7 +1002,7 @@ s32 EnGo2_OrientInstant(EnGo2* this) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EnGo2_IsInRange(EnGo2* this) {
|
s32 EnGo2_IsWithinInteactionRange(EnGo2* this) {
|
||||||
s16 yawDiff;
|
s16 yawDiff;
|
||||||
f32 xyzDist = (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) ? 800.0f : 200.0f;
|
f32 xyzDist = (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) ? 800.0f : 200.0f;
|
||||||
f32 yDist = (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) ? 400.0f : 60.0f;
|
f32 yDist = (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) ? 400.0f : 60.0f;
|
||||||
|
@ -1206,10 +1206,10 @@ s32 EnGo2_ShouldStay(EnGo2* this, PlayState* play) {
|
||||||
Camera* mainCam = play->cameraPtrs[CAM_ID_MAIN];
|
Camera* mainCam = play->cameraPtrs[CAM_ID_MAIN];
|
||||||
|
|
||||||
if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) {
|
if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) {
|
||||||
if (EnGo2_IsInRange(this)) {
|
if (EnGo2_IsWithinInteactionRange(this)) {
|
||||||
Camera_RequestSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
Camera_RequestSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||||
Camera_UnsetStateFlag(mainCam, CAM_STATE_CHECK_BG);
|
Camera_UnsetStateFlag(mainCam, CAM_STATE_CHECK_BG);
|
||||||
} else if (!EnGo2_IsInRange(this) && (mainCam->setting == CAM_SET_DIRECTED_YAW)) {
|
} else if (!EnGo2_IsWithinInteactionRange(this) && (mainCam->setting == CAM_SET_DIRECTED_YAW)) {
|
||||||
Camera_RequestSetting(mainCam, CAM_SET_DUNGEON1);
|
Camera_RequestSetting(mainCam, CAM_SET_DUNGEON1);
|
||||||
Camera_SetStateFlag(mainCam, CAM_STATE_CHECK_BG);
|
Camera_SetStateFlag(mainCam, CAM_STATE_CHECK_BG);
|
||||||
}
|
}
|
||||||
|
@ -1229,7 +1229,7 @@ s32 EnGo2_ShouldStay(EnGo2* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGo2_SetupUncurledFlags_Default(EnGo2* this) {
|
void EnGo2_SetupUncurledFlags_Default(EnGo2* this) {
|
||||||
this->trackingMode = EnGo2_IsInRange(this) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
this->trackingMode = EnGo2_IsWithinInteactionRange(this) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||||
|
|
||||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||||
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
||||||
|
@ -1253,7 +1253,7 @@ void EnGo2_SetupUncurledFlags_NearTracking(EnGo2* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGo2_SetupUncurledFlags_Biggoron(EnGo2* this) {
|
void EnGo2_SetupUncurledFlags_Biggoron(EnGo2* this) {
|
||||||
if (EnGo2_IsInRange(this) || this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
if (EnGo2_IsWithinInteactionRange(this) || this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||||
this->isTalkative = true;
|
this->isTalkative = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1266,7 +1266,7 @@ void EnGo2_SetupUncurledFlags(EnGo2* this) {
|
||||||
switch (ENGO2_GET_TYPE(this)) {
|
switch (ENGO2_GET_TYPE(this)) {
|
||||||
case GORON_DMT_BOMB_FLOWER:
|
case GORON_DMT_BOMB_FLOWER:
|
||||||
this->isTalkative = true;
|
this->isTalkative = true;
|
||||||
this->trackingMode = EnGo2_IsInRange(this) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
this->trackingMode = EnGo2_IsWithinInteactionRange(this) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||||
break;
|
break;
|
||||||
case GORON_FIRE_GENERIC:
|
case GORON_FIRE_GENERIC:
|
||||||
EnGo2_SetupUncurledFlags_NearTracking(this);
|
EnGo2_SetupUncurledFlags_NearTracking(this);
|
||||||
|
@ -1473,7 +1473,7 @@ s32 EnGo2_IsGoronFireGeneric(EnGo2* this) {
|
||||||
|
|
||||||
s32 EnGo2_IsGoronLinkReversing(EnGo2* this) {
|
s32 EnGo2_IsGoronLinkReversing(EnGo2* this) {
|
||||||
if (ENGO2_GET_TYPE(this) != GORON_CITY_LINK || (this->waypoint >= this->reverseWaypoint) ||
|
if (ENGO2_GET_TYPE(this) != GORON_CITY_LINK || (this->waypoint >= this->reverseWaypoint) ||
|
||||||
!EnGo2_IsInRange(this)) {
|
!EnGo2_IsWithinInteactionRange(this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1702,7 +1702,7 @@ void EnGo2_CurledUp(EnGo2* this, PlayState* play) {
|
||||||
this->isTalkative = false;
|
this->isTalkative = false;
|
||||||
EnGo2_WakeUpAnimated(this, play);
|
EnGo2_WakeUpAnimated(this, play);
|
||||||
}
|
}
|
||||||
if ((ENGO2_GET_TYPE(this) != GORON_FIRE_GENERIC) && EnGo2_IsInRange(this)) {
|
if ((ENGO2_GET_TYPE(this) != GORON_FIRE_GENERIC) && EnGo2_IsWithinInteactionRange(this)) {
|
||||||
EnGo2_WakeUpAnimated(this, play);
|
EnGo2_WakeUpAnimated(this, play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1737,7 +1737,7 @@ void EnGo2_Standing(EnGo2* this, PlayState* play) {
|
||||||
(s16)((height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.endFrame)) + (height * 0.6f));
|
(s16)((height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.endFrame)) + (height * 0.6f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!EnGo2_ShouldStay(this, play)) && (!EnGo2_IsInRange(this))) {
|
if ((!EnGo2_ShouldStay(this, play)) && (!EnGo2_IsWithinInteactionRange(this))) {
|
||||||
EnGo2_AnimateRolling(this, play);
|
EnGo2_AnimateRolling(this, play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue