mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 22:03:36 -07:00
Merge pull request #18 from garrettjoecox/tweak-ice-bergs
Tweak icebergs
This commit is contained in:
commit
ffac2735f5
2 changed files with 11 additions and 10 deletions
|
@ -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,
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue