Skip to content
Permalink
Browse files

Added a check to HDMobAI.Chase to prevent jumping immediately back to…

… spawn from the first see frame, which hopefully will resolve the infinite recursion issue some people are having.
  • Loading branch information...
MatthewTheGlutton committed Jul 13, 2019
1 parent a5aa886 commit e67db26c67387705b2b008567a634f8912bc3269
Showing with 4 additions and 2 deletions.
  1. +4 −2 zscript/mob.zs
@@ -377,8 +377,10 @@ struct HDMobAI play{
double oldang=caller.angle;
if(!caller.target){
caller.A_ClearTarget();
if(caller.findstate("idle"))caller.setstatelabel("idle");
else caller.setstatelabel("spawn");
if(curstate==resolvestate("see")){
if(caller.findstate("idle"))caller.setstatelabel("idle");
else caller.setstatelabel("spawn");
}
return;
}else if(!caller.checkmove(caller.pos.xy)){
caller.A_Wander();

0 comments on commit e67db26

Please sign in to comment.
You can’t perform that action at this time.