Guest User

Untitled

a guest
Feb 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. /*
  2. =============
  3. ai_walk
  4.  
  5. The monster is walking it's beat
  6. =============
  7. */
  8. void ai_walk (edict_t *self, float dist)
  9. {
  10. M_MoveToGoal (self, dist);
  11.  
  12. // check for noticing a player
  13. if (FindTarget (self))
  14. return;
  15.  
  16. if ((self->monsterinfo.search) && (level.time > self->monsterinfo.idle_time))
  17. {
  18. if (self->monsterinfo.idle_time)
  19. {
  20. self->monsterinfo.search (self);
  21. self->monsterinfo.idle_time = level.time + 15 + random() * 15;
  22. }
  23. else
  24. {
  25. self->monsterinfo.idle_time = level.time + random() * 15;
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment