| 637 | } |
| 638 | |
| 639 | void SethProjectileAttack(const Pose& pose, int roomNumber, int flags) |
| 640 | { |
| 641 | short fxNumber = CreateNewEffect(roomNumber); |
| 642 | if (fxNumber == -1) |
| 643 | return; |
| 644 | |
| 645 | auto& fx = EffectList[fxNumber]; |
| 646 | |
| 647 | fx.pos.Position.x = pose.Position.x; |
| 648 | fx.pos.Position.y = pose.Position.y - Random::GenerateInt(-32, 32); |
| 649 | fx.pos.Position.z = pose.Position.z; |
| 650 | |
| 651 | fx.pos.Orientation.x = pose.Orientation.x; |
| 652 | fx.pos.Orientation.y = pose.Orientation.y; |
| 653 | fx.pos.Orientation.z = 0; |
| 654 | fx.roomNumber = roomNumber; |
| 655 | fx.counter = (GetRandomControl() * 2) - ANGLE(180.0f); // TODO: This isn't an angle. Run tests on what it actually does. |
| 656 | fx.flag1 = flags; |
| 657 | fx.objectNumber = ID_ENERGY_BUBBLES; |
| 658 | fx.speed = Random::GenerateInt(0, 32) - ((flags == 1) ? 64 : 0) + 96; |
| 659 | fx.frameNumber = Objects[ID_ENERGY_BUBBLES].meshIndex + flags; |
| 660 | } |
| 661 | } |
no test coverage detected