-
Notifications
You must be signed in to change notification settings - Fork 132
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
clipping issue with sprite heights and moving floors (e.g. lifts) #381
Comments
This was with "walk over/under monsters" enabled, right? |
I was able to reproduce it, requires some luck! I was having a "walk over/under monsters" enabled, but I've also catched two another problems - pay attention of how player (1) and Spectre (2) was jammed on the lift! Can it be a consequences of recently introduced code of monster's heights?
And by the way, my kindest greetings to jmtd! |
Thank you very much for the Savegame! What we actually need here is a demo reproducibly triggering this behaviour, but well, since this feature isn't demo compatible in the first place... 😉 I guess what we see here is |
I can take a part of MAP17 and with luck and patience can replicate it on demo. But am I got you right by the fact that "over/under" is a |
Yep, it's forcefully disabled in demos, because it changes game physics significantly. I will apply a proposed fix soon and we need to see if the bug is triggered when repeating the same steps e.g. 10 times. Just as you did to replicate the original bug here. |
Ah, good to know! Please notify me in the commit or provide a patch, I'll try to catch it on my side. |
This should be it:
|
For now, falling into the floor seems to be fixed. But there is still small problem with clipping, take a look: Lift can normally get up if I'm standing on monster's head, but later it becomes jammed and will not get down until monster is killed. Edit: maybe it's because of only radius of first thing is being checked by lift? Player's radius is Can't explain my thought more clear, it's sill morning. 😴 |
Yes, I know. Somehow I cannot save the spectre from getting slammed into the wall, but I talked to him and he said he is fine with it. 😁 No, seriously, this is the course of events -- at least up to the point where I fail to understand it: |
This at least prevents the player from falling through the floor of a lift if standing on a monster's head. Addresses #381, but not fixing it entirely.
😦 I know that you are an expert in Black Magic of the Code, but speaking with demons... My-my. Good thing it was a Demon, not a Cyber Demon! Otherwise we was forced to extend some areas in some maps where lifts are placed. Through the code, not through the maps editing! I have only a basic understanding of |
Indeed, I am tempted to close this bug with the fix I committed today. Let's see if I can iron out the last glitch in this implementation... |
This may be a solution:
|
Things I have learned so far: When on a moving platform, things have to re-evaluate their floor/ceiling values each tic. It is not sufficient to clip the player's floor/ceiling values against the monster it stands on, the monster will also need to clips its own floor/ceiling values against the player:
By doing so, though, we allow the monster to run away underneath the player's feet, just as the player is able to walk across its head. The former will leave the player hanging in the air until his next attempts to move or the sector's next attempt to change its heights. So this is exchanging one bug with the other. However, this brought me to another idea: How about removing the
This has become theoretically possible by the code I added in the last commit, the one that made sure that running over/under monsters will only raise the floor and lower the ceiling. I have a savegame here of MAP29 which leads to several Cacodemons piling up and Lost Soul flying through them if you lure them a bit. My idea is to turn this from an On/Off choice into a three choice feature: Off, Player (current code), All (unleashed code presented above). |
By now, it appears that I have the choice between two evils on how to proceed in moving sectors: Either, I let the player clip his floor/ceiling values against the monster and the monster against the player. This way I successfully circumvent that any of both clips into the walls, but the sector won't move at all anymore! This happens, because the monster (given that the player stands on its head) has already reached its ceiling by this way and so prevents the sector's floor from taking it any higher. Thus, both monster and player are stuck in the lift until one of both moves away (nb: there isn't always enough space around a lift for any of them to move, so this may be a game breaking situation). The other solution would be to let only the player clip his floor/ceiling values against the monster, but ignore the monster's floor and ceiling values (i.e. they will get set, but then reset to the moving sector's floor/ceiling values in the code path I outlined here #381 (comment)). Then, the lift will move as expected, but chances are that the monster will get stuck in any of the adjacent walls (but, in contrast to the bug reported here, not the player -- anyway, this may lead to a game breaking situation as well). |
Background
Version of Crispy Doom:
5.4 (debian 5.4-3)
Operating System and version:
Debian stable
Game: (Doom/Heretic/Hexen/Strife/other)
Doom (2)
Any loaded WADs and mods (please include full command line):
none
Bug description
Observed behavior:
MAP17, going down on the lift to the room wtih the spectres and a hell knight. I dropped down the hole that the lift made and landed on a spectre, still within the lift sector. When the lift returned, it passed me vertically and I ended up clipped out below the floor of the sector.
Expected behavior:
When the lift height raised above the spectre height I should have been carried up (possibly the spectre too, but I'm not sure whether it was within the lift sector or not)
The text was updated successfully, but these errors were encountered: