Skip to content

Commit

Permalink
fix AI_StartState
Browse files Browse the repository at this point in the history
don't override state endTime, otherwise routine gona break
  • Loading branch information
Try committed Jun 8, 2019
1 parent 55864c6 commit 7af7f0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Game/world/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,8 @@ void Npc::tick(uint64_t dt) {
}
else if(aiActions.size()==0) {
tickRoutine();
if(aiActions.size()>0)
nextAiAction(dt);
return;
}
nextAiAction(dt);
Expand Down Expand Up @@ -1142,7 +1144,7 @@ void Npc::nextAiAction(uint64_t dt) {
aiActions.push_front(std::move(act));
break;
case AI_StartState:
if(startState(act.func,act.s0,gtime::endOfTime(),act.i0==0))
if(startState(act.func,act.s0,aiState.eTime,act.i0==0))
setOther(act.target);
break;
case AI_PlayAnim:{
Expand Down

0 comments on commit 7af7f0c

Please sign in to comment.