-
Notifications
You must be signed in to change notification settings - Fork 45
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
tr1/objects/bear: apply AI fix in bear control #2562
tr1/objects/bear: apply AI fix in bear control #2562
Conversation
Download the built assets for this pull request: |
d5c73eb
to
5ec38d9
Compare
5ec38d9
to
bc5067b
Compare
@@ -76,6 +71,8 @@ static void M_Setup(OBJECT *const obj) | |||
|
|||
static void M_Control(const int16_t item_num) | |||
{ | |||
OBJECT *const obj = Object_Get(O_BEAR); |
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.
One last nitpick - can we use item->object_id
?
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.
Of course, my bad. I was a bit hasty with this 😄
This moves the bear AI fix to the control routine to avoid the setting having been changed before demos load, where the setting will be disabled. Resolves LostArtefacts#2559.
bc5067b
to
0298b08
Compare
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.
LGTM, and thank you. 👍
Resolves #2559.
Checklist
Description
This moves the bear AI fix to the control routine as otherwise when the demo alters the setting, its effect has already taken place in the bear setup function. It's not ideal calling it on every frame a bear is active, but I suppose a benefit is that it does allow changing the setting in-game with the console without having to reload.