Skip to content

Commit

Permalink
eariest status is removed fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amazliah committed Dec 17, 2023
1 parent 66b28cd commit 8b9c735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/agents/agent_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func give_status(status: AgentStatus) -> void:
print(name, " already has this status, ignoring")
return
if len(statuses) >= max_status_count:
var status_to_remove = statuses.pop_back()
var status_to_remove = statuses.pop_front()
print(name, " has too many statuses, removing last status")
if status_to_remove.has_method("on_status_ended"):
status_to_remove.on_status_ended(self)
Expand Down

0 comments on commit 8b9c735

Please sign in to comment.