mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-24 14:51:46 -05:00
cleanup indentation around trees drop sticks (#4778)
* cleanup indentation around trees drop sticks * combine the range check
This commit is contained in:
parent
7e481c3f69
commit
6133ebe135
@ -358,23 +358,21 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
|
||||
dropsSpawnPt = this->actor.world.pos;
|
||||
dropsSpawnPt.y += 200.0f;
|
||||
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64) && (CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0)) && !(INV_CONTENT(ITEM_STICK) == ITEM_NONE)) {
|
||||
(numDrops = (Rand_ZeroOne() * 4));
|
||||
for (i = 0; i < numDrops; ++i) {
|
||||
Item_DropCollectible(play, &dropsSpawnPt, ITEM00_STICK);
|
||||
}
|
||||
} else {
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64)) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &dropsSpawnPt, this->unk_14C << 4);
|
||||
} else {
|
||||
if (this->actor.home.rot.z != 0) {
|
||||
this->actor.home.rot.z &= 0x1FFF;
|
||||
this->actor.home.rot.z |= 0xE000;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y,
|
||||
dropsSpawnPt.z, 0, this->actor.world.rot.y, 0, this->actor.home.rot.z, true);
|
||||
this->actor.home.rot.z = 0;
|
||||
if ((this->unk_14C >= 0) && (this->unk_14C < 0x64)) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TreesDropSticks"), 0) && INV_CONTENT(ITEM_STICK) != ITEM_NONE) {
|
||||
numDrops = Rand_ZeroOne() * 4;
|
||||
for (i = 0; i < numDrops; ++i) {
|
||||
Item_DropCollectible(play, &dropsSpawnPt, ITEM00_STICK);
|
||||
}
|
||||
} else {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &dropsSpawnPt, this->unk_14C << 4);
|
||||
}
|
||||
} else if (this->actor.home.rot.z != 0) {
|
||||
this->actor.home.rot.z &= 0x1FFF;
|
||||
this->actor.home.rot.z |= 0xE000;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, dropsSpawnPt.x, dropsSpawnPt.y,
|
||||
dropsSpawnPt.z, 0, this->actor.world.rot.y, 0, this->actor.home.rot.z, true);
|
||||
this->actor.home.rot.z = 0;
|
||||
}
|
||||
|
||||
// Spawn falling leaves
|
||||
|
Loading…
x
Reference in New Issue
Block a user