View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002416||The Dark Mod||AI||public||06.11.2010 05:26||06.10.2017 02:22|
|Target Version||TDM 2.00||Fixed in Version||TDM 2.00|
|Summary||0002416: Sleeping AI can fall through the ground when they wake up|
|Description||I'm not sure if this is a mapping error or code error, but sometimes if you wake up sleeping AI, they fall through the ground (then if you check the console you constantly get an error message about them being outside the world bounds, they probably keep falling forever). This happened to me in the Beleaguered Fence.|
|Tags||No tags attached.|
|This also happens from time to time in test/sleep.map (although my changes to it might have reduced the change of it happening). Just start the map and shoot a waterarrow to the first sleeper and see if he falls through.|
This might be happening because the wake up animation is getting out of sync with its surroundings.
In each frame, the AI checks below his origin to see if he's on the ground. His origin stays with his feet when he's getting on and off the bed, so it moves from a spot on the surface of the bed to a spot on the floor when he's waking up. When the wake up animation is running, this check is useless, because the AI is treated as if he's non-solid. This might have been done to keep the AI from treating the bed like a floor when his origin is above it, which could end up with him standing on the bed.
If the animation is disrupted for any reason, the AI's origin could move down below the floor before the animation finishes and the floor-testing code treats the AI as solid again. By this time, his feet are below the floor, the code thinks he's floating and not on the ground, and he just keeps on going as gravity pulls him down.
The solution to this problem is going to require understanding how the animation gets out of sync with its surroundings.
I’m not sure of the root cause of this problem, but doing the following caused it to stop:
1 - Disabled a Surprise animation when a rising AI is getting up from lying down and he enters Flee State when he sees the player before he’s standing.
2 - Disabled a sheathe weapon animation when the AI is getting up from lying down.
3 - Added a check during the animation for whether the AI’s origin has dropped below the floor. If the origin drops below the floor, it’s bumped up to where it belongs.
These changes appear to have stopped the bad behavior. In a map with 5 civilian sleepers, where 2 to 3 of them fell through the floor every time, none of them fall through now.
I also tested Beleaguered Fence, where the sleeping guard to the left of the door in the barracks fell through the floor most of the time when he spotted you in the middle of getting up.
|Wow, exciting to have this one fixed!|
The Lich Queen in “Lich Queen’s Demise” fell through the floor when getting out of bed, and it was because she was stimmed by a light that needed relighting, and she decided she was going to do that. Corrected the problem by disallowing visual stims while sitting down, standing up from sitting or lying down, sleeping, and lying down.
|We need spoiler code for the tracker!|
|06.11.2010 05:26||Ishtvan||New Issue|
|19.11.2010 11:19||tels||Relationship added||duplicate of 0001874|
|26.11.2010 16:28||tels||Note Added: 0003328|
|12.03.2012 05:08||grayman||Note Added: 0004397|
|28.03.2013 18:38||grayman||Assigned To||=> grayman|
|28.03.2013 18:38||grayman||Status||new => assigned|
|28.03.2013 19:58||grayman||Note Added: 0005254|
|28.03.2013 19:58||grayman||Status||assigned => resolved|
|28.03.2013 19:58||grayman||Resolution||open => fixed|
|28.03.2013 19:58||grayman||Fixed in Version||=> TDM 2.00|
|28.03.2013 19:58||grayman||Target Version||=> TDM 2.00|
|28.03.2013 21:42||Springheel||Note Added: 0005258|
|22.05.2013 20:02||grayman||Note Added: 0005492|
|23.05.2013 00:08||Springheel||Note Added: 0005496|
|06.10.2017 02:19||nbohr1more||Relationship added||related to 0001718|
|06.10.2017 02:22||nbohr1more||Relationship added||related to 0002159|