-
Notifications
You must be signed in to change notification settings - Fork 78
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
Possible fix for Imps not searching for space in Treasure Room #3649
Conversation
@@ -1285,17 +1285,17 @@ short imp_drops_gold(struct Thing *spdigtng) | |||
if (is_thing_directly_controlled_by_player(spdigtng, my_player_number)) | |||
{ | |||
play_non_3d_sample(119); | |||
internal_set_thing_state(spdigtng, state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we set a state to a creature when it is possessed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep it under possession, if I recall correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not sound correct to me. Possession overwrites states, the states are used to direct creature behavior.
I think it was there (but outside of this if) to get imps to get back to mining when they fail to drop off gold anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may need to test again, but if I remember correctly, if the Imp is under possession, he'll do his own thing even though he's under possession, unless his state is reset. We do not want possessed Imps to be set to the last work state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you are setting possessed imps to last_work_state here right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Possessed Imps are set to the null state.
@AdamPlenty I tested it and found bugs:
|
I am unable to reproduce either bug. |
Sorry, my fault. Tested it incorrectly. |
Possibly fixes #3642