Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop NPCs getting confused by stashed outbounds activities #36316

Merged
merged 1 commit into from Dec 22, 2019
Merged

Stop NPCs getting confused by stashed outbounds activities #36316

merged 1 commit into from Dec 22, 2019

Conversation

ghost
Copy link

@ghost ghost commented Dec 21, 2019

Summary

SUMMARY: Bugfixes "Stop NPCs getting confused by stashed outbounds activities"

Purpose of change

Fix NPCs standing around and not doing activity.

Describe the solution

#36166 was a bug where NPCs believed pulping a corpse was out of bounds of the current map, they then stashed that activity, so any people whos saves were caught up in that bug, had NPCs with that stashed activity, and in the NPC AI it checked if their mission was MISSION_ACTIVITY, which it was when you assigned them a new activity, but it found they had one already stashed, ( the pulping ) but its targets were still outbounds, therefore it set moves to 0 and did nothing , thinking that they had just been loaded into reality bubble but the corpse was not.

This shouldnt happen anymore, but for those people whos saves are affected by this still, and to hopefully avoid similar problems in future, ive cleared the stashed activity when a new activity is assigned.

they now go and do vehicle deconstruction, the save I tested on i shere. https://www.reddit.com/r/cataclysmdda/comments/ec7jww/new_players_come_here_weekly_questions_and/fbh9z2z/

Ive also neatened up the set_mission() and set_attitude() everywhere that activities are assigned, as that is encapsulated in character::assign_activity() anyway.,

Describe alternatives you've considered

N/A

Testing

save in linked reddit report - now the NPC goes and does the deconstruction when prompted.

Additional context

N/A

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Missions Quests and missions NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Dec 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit 7cabc3f into CleverRaven:master Dec 22, 2019
@ghost ghost deleted the why_are_npcs_standing_still branch January 17, 2020 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Missions Quests and missions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant