New issue 702 by mrapsout...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702
What steps will reproduce the problem?
Not Sure see below
What version of CorsixTH are you using (e.g. "Beta 2", "SVN r123")?
Beta 4
What operating system / compile settings are you using?
Win7
What level was this on (e.g. "Demo level", "Full game level 12")?
See attached
Please provide any additional information below.
This has happened to me before on different levels and with different rooms.
In this case look at the inflation clinic.
Attachments:
Alex.sav 278 KB
Beta 4 is quite old. Could you try out Beta 5 or even better the latest
trunk version to see if it still happens as often?
Version: Beta 5
After a day of constant investigation on this issue, I have resolved the
issue of patients getting stuck seemingly at random. What clued me in was
a constant cycle of:
+ Diagnosed patient goes to GP
+ Then comes out and needs a drink
+ Then uses the restroom and goes back to GP
+ repeat
gp.lua was written so a diagnosed patient would leave the GP with meander
and idle, then nothing afterward. This fix targets that specific case in
two parts.
Attachments:
idle.lua 2.6 KB
gp.lua 7.7 KB
First off, the files are somewhat outdated (Jan 17th), so i guess updating
to the latest version and testing if the problem is present at all, is
necessary.
I don't think that modifing the idle action with behaviour which belongs to
other objects would be a good idea. It scatters responsibility. (For the
same reason action queues don't get "autofilled" with an idle or
anwser_call action if they are empty.)
This just shows us, that somewhere in the code base some seek_room action
isn't assigned properly or even removed.
The modifications made to the GP might fix this problem, but i'm not sure
if it introduces other problems; due to the fact, that the if-then-else
clause in question should never call the else-part if it behaves properly,
which brings up the question why is "else" there in the first place and why
does it get called at all.
Queueing another seek_room action in onHumanoidLeaveAction is undesirable,
as it will definetly add two seek_room actions to the patient once
diagnosis is successful.
Also, having a look at room.lua might help, as some code is duplicated
there. Maybe the whole problem is a copy-paste-issue from the
room-baseclass to the gp-subclass, when additional behaviour was added
later on.
From my point of view this needs further investigation, but i think we are
close.
The issue is the else-part is triggered when a patient goes back into the
GP after they already have their diagnosis flag set to True. I played an
entire game and not a single one of these patients had more than one
seek_room actions in their action queue. This is not a real fix for the
issue, its just a band-aid for having stuck patients. The main thing is
now there aren't any stuck patients. As for why the else-block in question
ever gets called ... needs investigation and a real fix.
Comment #5 on issue 702 by jorge...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702
To be completely honest, I think one problem with implementing a workaround
is that there no longer is any motivation to fix the problem.
I don't know if I am reading GP.lua correctly, but it looks to me as though
if you diagnose someone before the policy stop_procedure then the
else
patient:queueAction{name = "meander", count = 2}
patient:queueAction{name = "idle"}
is called
I could be completley wrong about this, as I am still picking this coding
stuff up...
Is this still happening?
I dont know, I have not managed to play the latest release recently.
Comment #9 on issue 702 by Grim...@gmail.com: Patient Stuck
http://code.google.com/p/corsix-th/issues/detail?id=702
(No comment was entered for this change.)
It is still happening with Beta8. See the scanner room to the left of the
main entrance.
Doctors also seem to be affected. There are a few doctors standing around
near the training room. I've tried to fire them in order to get rid of
them, but they won't disappear. Can't pick them up either. They can be
located inside and outside of rooms. I think I've observed the same
behaviour for patients.
Attachments:
Autosave12.sav 438 KB
When loading your save on the newest version of the game, I get an error
after a few seconds that freezes the game completely (no error inside the
game), but the log gives this:
A stack trace is included below, and the handler has been disconnected.
C:\Games\CorsixTH\Lua\hospital.lua:575: attempt to index field '?' (a nil
value)
stack traceback:
C:\Games\CorsixTH\Lua\hospital.lua:575: in function 'checkFacilites'
C:\Games\CorsixTH\Lua\hospital.lua:768: in function 'onEndDay'
C:\Games\CorsixTH\Lua\world.lua:756: in function 'onTick'
C:\Games\CorsixTH\Lua\app.lua:681: in function 'dispatch'
C:\Games\CorsixTH\Lua\app.lua:583: in function
<C:\Games\CorsixTH\Lua\ap
p.lua:578>
Warning: No event handler for timer
@ 11
I think your error comes about when there are stuck kicked patients in the
hospital at the time patients are being counted for the seating messages.
If you don't have stuck patients you don't get the error.
I did do a fix for this before Christmas, but I can't find it.
If no one fixes it before, I will attempt it again at the weekend
Hm. It can also be your fix already is in the game too?
Or didn't you upload it?
I can't remember if I uploaded it or not. I can remember seeing this issue
and your comment and error and realising what it was down to and doing the
fix before Christmas, then my wife took really ill, so I may have never got
around to posting it here.
I know what is needed, its whether I can remember how I did it! I tried
something last night, but it still crashed on this save, but then again
this save may be beyond help.....
I think that it needs a check to make sure that the patient is still
attached to the hospital before the counting of standing and seated
patients is carried out.
Hello,
I have a similar issue when a patient got stuck inside the general
diagnostic room.
I'm attaching a file that shows that: the patient in the general diagnostic
room couldn't leave because the door was blocked by a VP person. Please
allow 1 min of play to see that effect.
Attachments:
My2.sav 278 KB
I think that the reason he got stuck has already been fixed in the
development snapshot - here is a link for it
http://th.corsix.org/corsix-th-latest.html or wait a week and there will be
an update on beta 8.
Most likely cause may have been yawning, hard to tell for sure as the error
does not happen now.