Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func_8093A0A8(void *this, s32 arg1)
- {
- void *otherRova;
- void *temp_a0;
- void *pillarXYZ;
- otherRova = (void *) this->unk118; //other rova
- this->unk5F8 = (u8)1;
- this->unk4 = (s32) (this->unk4 | 1);
- this->unk14C = &func_8093A2AC;
- temp_a0 = &this->0x568;
- temp_a0->unk-A0 = 0.0f;
- func_800A534C(temp_a0, 0x6000000 + 0x6f28, 0xc1200000); //animation related
- //arena bounds: x: -359 to 359 z: -359 to 359
- if (Math_Rand_ZeroOne() < 0.5f) //50/50 coin toss
- {
- if (otherRova != 0) //if another rova exists (if its phase 1)
- {
- if (otherRova->unk14C == &func_8093B1AC) //if the other rova is shooting
- {
- //set next x pos to other-rova-x plus or minus 100 units
- this->targetX_4B0 = (f32) (Math_Rand_CenteredFloat(0x43480000) + otherRova->x);
- //set next y pos between 0 and 200 + 340
- this->targetY_4B4 = (f32) (Math_Rand_ZeroFloat(0x43480000) + 340.0f);
- //set next z pos to other-rova-z plus or minus 100 units
- this->targetZ_4B8 = (f32) (Math_Rand_CenteredFloat(0x43480000) + otherRova->z);
- //set animation timer to 50 + a number between 0 and 50. range of 50-100 frames
- this->timer_178 = (s16) ((s32) Math_Rand_ZeroFloat(0x42480000) + 0x32);
- return;
- }
- }
- }
- if (Math_Rand_ZeroOne() < 0.5f) //50/50 coin toss
- {
- //set next x pos plus or minus 200 units
- this->targetX_4B0 = Math_Rand_CenteredFloat(0x44480000);
- //set next y pos between 0 and 200 + 340
- this->targetY_4B4 = (f32) (Math_Rand_ZeroFloat(0x43480000) + 340.0f);
- //set next z pos plus or minus 200 units
- this->targetZ_4B8 = Math_Rand_CenteredFloat(0x44480000);
- //set animation timer to 50 + a number between 0 and 50. range of 50-100 frames
- this->timer_178 = (s16) ((s32) Math_Rand_ZeroFloat(0x42480000) + 0x32);
- return;
- }
- //generate random number between 0.0 and 3.99. truncate and use result to index list of pillar positions
- pillarXYZ = (((s32) ((s32) Math_Rand_ZeroFloat(3.99f) << 0x10) >> 0x10) * 0xc) + &D_8094A8AC;
- //set target x, y, and z to pillar
- this->targetX_4B0 = pillarXYZ->x;
- this->targetY_4B4 = pillarXYZ->y;
- this->targetZ_4B8 = pillarXYZ->z;
- this->timer_178 = 0xc8; //flying timer. when this reaches 0 rova will shoot if no other rova is shooting
- this->canShoot_15E = 1; //can shoot, this case is guranteed
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment