mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 10:52:19 -05:00
Random Enemy Sizes fixes (#3452)
This commit is contained in:
parent
717074ff86
commit
420bdab328
@ -1033,8 +1033,16 @@ void RegisterRandomizedEnemySizes() {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
|
||||
// Only apply to enemies and bosses. Exclude the wobbly platforms in Jabu because they need to act like platforms.
|
||||
if (!CVarGetInteger("gRandomizedEnemySizes", 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || actor->id == ACTOR_EN_BROB) {
|
||||
// Exclude wobbly platforms in Jabu because they need to act like platforms.
|
||||
// Exclude Dead Hand hands and Bongo Bongo main body because they make the fights (near) impossible.
|
||||
uint8_t excludedEnemy = actor->id == ACTOR_EN_BROB || actor->id == ACTOR_EN_DHA || (actor->id == ACTOR_BOSS_SST && actor->params == -1);
|
||||
|
||||
// Dodongo, Volvagia and Dead Hand are always smaller because they're impossible when bigger.
|
||||
uint8_t smallOnlyEnemy =
|
||||
actor->id == ACTOR_BOSS_DODONGO || actor->id == ACTOR_BOSS_FD || actor->id == ACTOR_BOSS_FD2 || ACTOR_EN_DH;
|
||||
|
||||
// Only apply to enemies and bosses.
|
||||
if (!CVarGetInteger("gRandomizedEnemySizes", 0) || (actor->category != ACTORCAT_ENEMY && actor->category != ACTORCAT_BOSS) || excludedEnemy) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1043,9 +1051,8 @@ void RegisterRandomizedEnemySizes() {
|
||||
|
||||
uint8_t bigActor = rand() % 2;
|
||||
|
||||
// Big actor. Dodongo and Volvagia are always smaller because they're impossible when bigger.
|
||||
if (bigActor && actor->id != ACTOR_BOSS_DODONGO && actor->id != ACTOR_BOSS_FD &&
|
||||
actor->id != ACTOR_BOSS_FD2) {
|
||||
// Big actor
|
||||
if (bigActor && !smallOnlyEnemy) {
|
||||
randomNumber = rand() % 200;
|
||||
// Between 100% and 300% size.
|
||||
randomScale = 1.0f + (randomNumber / 100);
|
||||
|
Loading…
Reference in New Issue
Block a user