Guest User

Untitled

a guest
Dec 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. void A_FastSerpentHumpDecide()
  2. {
  3. if (CheckLOF(CLOFF_SKIPOBJECT, maxTargetRange, meleeThreshold) && MissileState != NULL)
  4. {
  5. if (random[SerpentHump]() > 30)
  6. {
  7. return;
  8. }
  9. else if (random[SerpentHump]() < 40)
  10. { // Missile attack
  11. SetState (MeleeState);
  12. return;
  13. }
  14. }
  15. else if (random[SerpentHump]() > 3)
  16. {
  17. return;
  18. }
  19. if (!CheckMeleeRange ())
  20. { // The hump shouldn't occur when within melee range
  21. if (CheckLOF(CLOFF_SKIPOBJECT, maxTargetRange, meleeThreshold) && MissileState != NULL && random[SerpentHump]() < 128)
  22. {
  23. SetState (MeleeState);
  24. }
  25. else
  26. {
  27. SetStateLabel("Hump");
  28. A_PlaySound ("SerpentActive", CHAN_BODY);
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment