| 276 | } |
| 277 | |
| 278 | void InitializePuna(short itemNumber) |
| 279 | { |
| 280 | auto& item = g_Level.Items[itemNumber]; |
| 281 | |
| 282 | InitializeCreature(itemNumber); |
| 283 | SetAnimation(item, PUNA_ANIM_IDLE); |
| 284 | CheckForRequiredObjects(item); |
| 285 | |
| 286 | // Save Puna's default angle. It will be used while waiting (i.e. an active lizard is nearby). |
| 287 | // NOTE: Since Puna is oriented to face away from the player, add 180 degrees. |
| 288 | item.SetFlagField((int)BossItemFlags::Rotation, item.Pose.Orientation.y + ANGLE(180.0f)); |
| 289 | item.SetFlagField((int)BossItemFlags::AttackType, (int)PunaAttackType::AwaitPlayer); // Normal behaviour at start. |
| 290 | item.SetFlagField((int)BossItemFlags::ShieldIsEnabled, 1); // Activated at start. |
| 291 | item.SetFlagField((int)BossItemFlags::AttackCount, 0); |
| 292 | item.SetFlagField((int)BossItemFlags::DeathCount, 0); |
| 293 | item.SetFlagField((int)BossItemFlags::ItemNumber, NO_VALUE); |
| 294 | item.SetFlagField((int)BossItemFlags::ExplodeCount, 0); |
| 295 | |
| 296 | // If there is no lizard nearby, remove the lizard flag. |
| 297 | if (!IsLizardActiveNearby(item, true)) |
| 298 | item.ClearFlags((int)BossItemFlags::Object, (short)BossFlagValue::Lizard); |
| 299 | } |
| 300 | |
| 301 | void PunaControl(short itemNumber) |
| 302 | { |
nothing calls this directly
no test coverage detected