Merge branch 'develop' into aManchipelago
This commit is contained in:
@@ -1284,8 +1284,16 @@ void Actor_UpdatePos(Actor* actor) {
|
||||
}
|
||||
|
||||
void Actor_UpdateVelocityXZGravity(Actor* actor) {
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
uint8_t inCutscene = player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER ||
|
||||
player->stateFlags1 & PLAYER_STATE1_IN_CUTSCENE ||
|
||||
player->stateFlags2 & PLAYER_STATE2_CRAWLING;
|
||||
f32 speedModifier = 1.0f;
|
||||
if (actor->id == ACTOR_PLAYER && !inCutscene) {
|
||||
speedModifier = GameInteractor_MovementSpeedMultiplier();
|
||||
}
|
||||
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ * speedModifier;
|
||||
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ * speedModifier;
|
||||
|
||||
actor->velocity.y += actor->gravity;
|
||||
if (actor->velocity.y < actor->minVelocityY) {
|
||||
@@ -5047,8 +5055,8 @@ void Flags_SetRandomizerInf(RandomizerInf flag) {
|
||||
*/
|
||||
|
||||
s32 previouslyOff = !Flags_GetRandomizerInf(flag);
|
||||
gSaveContext.ship.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
if (previouslyOff) {
|
||||
gSaveContext.ship.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
|
||||
LUSLOG_INFO("RandomizerInf Flag Set - %#x", flag);
|
||||
GameInteractor_ExecuteOnFlagSet(FLAG_RANDOMIZER_INF, flag);
|
||||
}
|
||||
@@ -5068,8 +5076,8 @@ void Flags_UnsetRandomizerInf(RandomizerInf flag) {
|
||||
*/
|
||||
|
||||
s32 previouslyOn = Flags_GetRandomizerInf(flag);
|
||||
gSaveContext.ship.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
if (previouslyOn) {
|
||||
gSaveContext.ship.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
|
||||
LUSLOG_INFO("RandomizerInf Flag Unset - %#x", flag);
|
||||
GameInteractor_ExecuteOnFlagUnset(FLAG_RANDOMIZER_INF, flag);
|
||||
}
|
||||
|
||||
@@ -813,7 +813,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_SPIRIT_TEMPLE_BOSS) {
|
||||
if (GameInteractor_Should(VB_PLAY_BLUE_WARP_CS, !CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT),
|
||||
if (GameInteractor_Should(VB_PLAY_BLUE_WARP_CS,
|
||||
!Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE),
|
||||
RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE)) {
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE);
|
||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_BLUE_WARP, true, ITEM_MEDALLION_SPIRIT)) {
|
||||
@@ -831,7 +832,8 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_SHADOW_TEMPLE_BOSS) {
|
||||
if (GameInteractor_Should(VB_PLAY_BLUE_WARP_CS, !CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW),
|
||||
if (GameInteractor_Should(VB_PLAY_BLUE_WARP_CS,
|
||||
!Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE),
|
||||
RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE)) {
|
||||
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE);
|
||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_BLUE_WARP, true, ITEM_MEDALLION_SHADOW)) {
|
||||
|
||||
@@ -58,6 +58,11 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = (Rand_ZeroOne() - 0.5f) * 60000.0f;
|
||||
this->actionFunc = func_809B5670;
|
||||
|
||||
if (CVarGetInteger("gCrowdControl", 0) &&
|
||||
CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
|
||||
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, this, ACTORCAT_NPC);
|
||||
}
|
||||
}
|
||||
|
||||
void EnAttackNiw_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
@@ -7125,15 +7125,6 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) {
|
||||
if (this->meleeWeaponState == 0) {
|
||||
float maxSpeed = R_RUN_SPEED_LIMIT / 100.0f;
|
||||
|
||||
int32_t giSpeedModifier = GameInteractor_RunSpeedModifier();
|
||||
if (giSpeedModifier != 0) {
|
||||
if (giSpeedModifier > 0) {
|
||||
maxSpeed *= giSpeedModifier;
|
||||
} else {
|
||||
maxSpeed /= abs(giSpeedModifier);
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) == BUNNY_HOOD_FAST_AND_JUMP &&
|
||||
this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
maxSpeed *= 1.5f;
|
||||
@@ -8874,14 +8865,6 @@ void Player_Action_80842180(Player* this, PlayState* play) {
|
||||
Player_GetMovementSpeedAndYaw(this, &sp2C, &sp2A, SPEED_MODE_CURVED, play);
|
||||
|
||||
if (!func_8083C484(this, &sp2C, &sp2A)) {
|
||||
int32_t giSpeedModifier = GameInteractor_RunSpeedModifier();
|
||||
if (giSpeedModifier != 0) {
|
||||
if (giSpeedModifier > 0) {
|
||||
sp2C *= giSpeedModifier;
|
||||
} else {
|
||||
sp2C /= abs(giSpeedModifier);
|
||||
}
|
||||
}
|
||||
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("MMBunnyHood"), BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA &&
|
||||
this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
|
||||
@@ -124,7 +124,17 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
s16 pad2;
|
||||
s16 phi_s0_2;
|
||||
s16 sp208[3];
|
||||
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0);
|
||||
if (CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0)) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->stickRelX = -35;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->stickRelX = 35;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
pauseCtx->stickRelY = -35;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
pauseCtx->stickRelY = 35;
|
||||
}
|
||||
}
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
@@ -140,7 +150,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
} else {
|
||||
phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
if ((pauseCtx->stickRelX < -30)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][2];
|
||||
if (phi_s0 == -3) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
@@ -153,7 +163,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
phi_s0 = D_8082A1AC[phi_s0][2];
|
||||
}
|
||||
}
|
||||
} else if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
} else if ((pauseCtx->stickRelX > 30)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][3];
|
||||
if (phi_s0 == -2) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
@@ -168,7 +178,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
||||
if ((pauseCtx->stickRelY < -30)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][1];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
@@ -176,7 +186,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][1];
|
||||
}
|
||||
} else if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
} else if ((pauseCtx->stickRelY > 30)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][0];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
@@ -267,7 +277,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
if ((pauseCtx->stickRelX > 30)) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
@@ -285,7 +295,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
} else {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
if ((pauseCtx->stickRelX < -30)) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
Reference in New Issue
Block a user