mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
adds aiming cue support for wall and gold skulls
This commit is contained in:
parent
08cdcd6610
commit
ddbb4db14e
2 changed files with 30 additions and 8 deletions
|
@ -223,7 +223,7 @@ void accessible_switch_cleanup(AccessibleActor* actor)
|
|||
else if ((actor->actor->params & 7) == 2) {
|
||||
if (sw->eyeTexIndex == 0) { //(!(Flags_GetSwitch(actor->play, (actor->params >> 8 & 0x3F))))
|
||||
// make it only play for open eye
|
||||
|
||||
actor->policy.aimAssist.isProvider = true;
|
||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_FOOT_SWITCH, false);
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ void accessible_area_change(AccessibleActor* actor) {
|
|||
} else if (actor->sceneIndex == 81) {
|
||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_HORSE_RUN_LEVEL, false);
|
||||
//hyrule field
|
||||
} else if (actor->sceneIndex == 0 && actor->play->sceneNum != 85) {
|
||||
} else if (actor->sceneIndex == 10 && actor->play->sceneNum != 85) {//temp
|
||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_OC_DOOR_OPEN, false);
|
||||
} else if (actor->sceneIndex <= 11) {
|
||||
ActorAccessibility_PlaySoundForActor(actor, 0, NA_SE_EV_FANTOM_WARP_L, false);
|
||||
|
@ -846,7 +846,7 @@ void accessible_stick_warning(AccessibleActor* actor) {
|
|||
policy.n = 1;
|
||||
policy.ydist = 200;
|
||||
policy.pitch = 1.1;
|
||||
policy.aimAssist.isProvider = true;
|
||||
|
||||
|
||||
ActorAccessibility_AddSupportedActor(ACTOR_OBJ_SWITCH, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "Ocarina Spots", NULL, NA_SE_EV_DIAMOND_SWITCH);
|
||||
|
@ -889,6 +889,12 @@ void accessible_stick_warning(AccessibleActor* actor) {
|
|||
ActorAccessibility_AddSupportedActor(ACTOR_OBJ_HANA, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "gold skulltula token", accessible_en_pickups, 0);
|
||||
ActorAccessibility_AddSupportedActor(ACTOR_EN_SI, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "Gold and Wall skulltulas", NULL, 0);
|
||||
policy.aimAssist.isProvider = true;
|
||||
policy.n = 1;
|
||||
policy.ydist = 500;
|
||||
policy.distance = 750;
|
||||
ActorAccessibility_AddSupportedActor(ACTOR_EN_SW, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "goma larva egg", accessible_larva, 0);
|
||||
policy.distance = 1000;
|
||||
policy.ydist = 1000;
|
||||
|
@ -910,7 +916,11 @@ void accessible_stick_warning(AccessibleActor* actor) {
|
|||
ActorAccessibility_AddSupportedActor(ACTOR_EN_AM, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "door of time", accessible_door_of_time, 0);
|
||||
ActorAccessibility_AddSupportedActor(ACTOR_BG_MJIN, policy);
|
||||
|
||||
ActorAccessibility_InitPolicy(&policy, "shooting gallery rupees", NULL, 0);
|
||||
policy.aimAssist.isProvider = true;
|
||||
policy.distance = 1000;
|
||||
policy.n = 1;
|
||||
ActorAccessibility_AddSupportedActor(ACTOR_EN_G_SWITCH, policy);
|
||||
ActorAccessibility_InitPolicy(&policy, "crawlspace", NULL, NA_SE_EN_MUSI_SINK);
|
||||
policy.volume = 1.5;
|
||||
policy.distance = 2000;
|
||||
|
@ -925,6 +935,7 @@ void accessible_stick_warning(AccessibleActor* actor) {
|
|||
policy.pitch = 1.1;
|
||||
policy.distance = 1000;
|
||||
ActorAccessibility_AddSupportedActor(VA_DOOR, policy);
|
||||
|
||||
ActorAccessibility_InitPolicy(&policy, "Area Change", accessible_area_change, 0);
|
||||
policy.n = 60;
|
||||
policy.distance = 100000;
|
||||
|
|
|
@ -582,14 +582,25 @@ int ActorAccessibility_GetRandomStartingFrameCount(int min, int max) {
|
|||
// 16384
|
||||
s32 angle = player->actor.focus.rot.x;
|
||||
angle = angle / -14000.0 * 16384;
|
||||
s32 yIntercept = ((Math_SinS(angle) / Math_CosS(angle)) * actor->xzDistToPlayer)+player->actor.focus.pos.y;
|
||||
s32 yHight = actor->actor->world.pos.y + 30;
|
||||
if ((yIntercept) > yHight + 30) {
|
||||
f32 slope = Math_SinS(angle) / Math_CosS(angle)*1.0;
|
||||
s32 yIntercept = (slope * (actor->xzDistToPlayer)) + player->actor.focus.pos.y;
|
||||
s32 yHight = actor->actor->world.pos.y+25;
|
||||
if (slope < 1) {
|
||||
slope = 1;
|
||||
}
|
||||
s32 correction = (1 - 1 / slope)*100;
|
||||
if ((yIntercept) > yHight + 25) {
|
||||
actor->aimAssist.pitch = 1.5;
|
||||
} else if ((yIntercept) < yHight - 30) {
|
||||
} else if ((yIntercept) < yHight - 25) {
|
||||
actor->aimAssist.pitch = 0.5;
|
||||
}
|
||||
s32 yDiff = fabs(yIntercept-yHight);
|
||||
if (yIntercept - yHight > 0) {
|
||||
yDiff -= correction;
|
||||
if (yDiff < 0) {
|
||||
yDiff = 0;
|
||||
}
|
||||
}
|
||||
if (yDiff > 300) {
|
||||
actor->aimAssist.frequency = 30;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue