Merge pull request #18 from garrettjoecox/tweak-ice-bergs

Tweak icebergs
This commit is contained in:
Caladius 2023-11-29 17:27:12 -05:00 committed by GitHub
commit ffac2735f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View file

@ -1083,14 +1083,8 @@ static u32 iceBlockParams[] = {
0x214, 0x214,
0x1, 0x1,
0x11, 0x11,
0x11,
0x10, 0x10,
0x12,
0x12,
0x12,
0x20, 0x20,
0x23,
0x123,
}; };
void RegisterSnowballs() { void RegisterSnowballs() {
@ -1129,15 +1123,15 @@ void RegisterSnowballs() {
int actorsSpawned = 0; int actorsSpawned = 0;
Vec3f spawnedIceBlockPos[20]; Vec3f spawnedIceBlockPos[15];
while (actorsSpawned < 20) { while (actorsSpawned < 15) {
Vec3f iceBlockPos; Vec3f iceBlockPos;
iceBlockPos.x = (float)(Random( iceBlockPos.x = (float)(Random(
(-4200) + 10000, (-4200) + 10000,
(3000) + 10000 (3000) + 10000
) - (float)10000.0f); ) - (float)10000.0f);
iceBlockPos.y = -1313.0; iceBlockPos.y = -1713.0f;
iceBlockPos.z = (float)(Random( iceBlockPos.z = (float)(Random(
(2600) + 10000, (2600) + 10000,
(9000) + 10000 (9000) + 10000
@ -1149,7 +1143,7 @@ void RegisterSnowballs() {
bool overlaps = false; bool overlaps = false;
for (int i = 0; i < actorsSpawned; i++) { for (int i = 0; i < actorsSpawned; i++) {
if (Math_Vec3f_DistXZ(&spawnedIceBlockPos[i], &iceBlockPos) < 300.0f) { if (Math_Vec3f_DistXZ(&spawnedIceBlockPos[i], &iceBlockPos) < 500.0f) {
overlaps = true; overlaps = true;
break; break;
} }
@ -1161,6 +1155,8 @@ void RegisterSnowballs() {
if (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER)) { if (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER)) {
iceBlockPos.y = raycastResult; iceBlockPos.y = raycastResult;
} else {
iceBlockPos.y = -1310.0f;
} }
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_BG_SPOT08_ICEBLOCK, iceBlockPos.x, iceBlockPos.y, Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_BG_SPOT08_ICEBLOCK, iceBlockPos.x, iceBlockPos.y,

View file

@ -332,6 +332,11 @@ void BgSpot08Iceblock_Init(Actor* thisx, PlayState* play) {
this->surfaceNormal.y = 1.0f; this->surfaceNormal.y = 1.0f;
this->rotationAxis.x = 1.0f; this->rotationAxis.x = 1.0f;
if (LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER) && play->sceneNum == SCENE_LAKE_HYLIA) {
BgSpot08Iceblock_SetupNoAction(this);
return;
}
switch (this->dyna.actor.params & 0xF) { switch (this->dyna.actor.params & 0xF) {
case 0: case 0:
case 1: case 1: