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

Hibernation-info #4961

Merged
merged 2 commits into from Dec 13, 2013

Conversation

Projects
None yet
4 participants
@KA101
Copy link
Contributor

commented Dec 9, 2013

Adds a specific safety-check on entering the Hibernation part of the food meter and provided a quick hint as to the general idea. Thanks for the merge-cleanup and the guidance, Kevin. Much appreciated.

Memlog's working now. Mergers, feel free.

Hibernation-info
Adds a specific safety-check on entering the Hibernation part of the
food meter and provided a quick hint as to the general idea.  Thanks for
the merge-cleanup and the guidance, Kevin.  Much appreciated.

Attempted to add memorial notes for engorgement, actually entering
hibernation, and successful exit; killed a successful hibernator and
just got the msglog and an empty killcount, though.  Not sure what I
missed.
@@ -6612,6 +6613,15 @@ bool player::eat(game *g, item *eaten, it_comest *comest)
!query_yn(_("You're full. Force yourself to eat?"))) {
return false;
}
if (hiberfood && !is_npc() && (((hunger - (comest->nutr)) < -60) || ((thirst - (comest->quench)) < -60))){

This comment has been minimized.

Copy link
@kevingranade

kevingranade Dec 9, 2013

Member

Did this actually work? I tried it like this and it wouldn't work correctly until I made a temp variable to hold hunger - 60, which is also evidently what happened down around line 6658.
Also the logic that seems like what we want is (hunger > -60 && thirst > -60) && (hunger - nutrition < -60 || thirst - quench < -60).

This comment has been minimized.

Copy link
@KA101

KA101 Dec 9, 2013

Author Contributor

Seemed to when testing with hunger, but looks like the thirst-check either doesn't fire right or the char starts with negative Thirst. Will fix. Good catch.

Changes as requested
Looks like these work.
@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Dec 10, 2013

So is it properly recording events to your memorial file now?

@KA101

This comment has been minimized.

Copy link
Contributor Author

commented Dec 10, 2013

Now that I found it, yeah.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Dec 10, 2013

Each time I try hibernating it starts sleeping like normal but after a few moments the program freezes.

@KA101

This comment has been minimized.

Copy link
Contributor Author

commented Dec 10, 2013

Came through fine here. Do you alt-tab often? That game me a lag burst when I was testing. ???

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Dec 10, 2013

It seems that usually the game will become responsive again after a few minutes. But even still, the massive nonresponsive lag chunk might make people think it's completely hung up. I know I did.

@KA101

This comment has been minimized.

Copy link
Contributor Author

commented Dec 10, 2013

OK, testing-procedure differential found the culprit. I'd tested underground and it runs like greased skis. Slept aboveground: sssllllooooowwwwww.

Weather and critter-movement, I suspect, and it went nonresponsive in Day 3--as soon as I alt-tabbed over to check here. So maybe I won't implement hibernation for Plants.

Apart from that, I'm not sure how best to handle people hibernating aboveground with in-game open windows and multitasking. Maybe disable vision and sound checks?

Good catch, in any event.

@atomicdryad atomicdryad merged commit a30fef8 into CleverRaven:master Dec 13, 2013

1 check passed

default
Details

@KA101 KA101 deleted the KA101:Ursine-Polishing branch Dec 24, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.