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

Enemies stuck in the ground and T-posing #25

Open
Berzerk2k2 opened this issue Mar 10, 2023 · 12 comments
Open

Enemies stuck in the ground and T-posing #25

Berzerk2k2 opened this issue Mar 10, 2023 · 12 comments

Comments

@Berzerk2k2
Copy link

I don't know if this is just a bug with the GOG version or a unwanted side effect of using the c1-launcher but sometimes this happened:
CrysisStuckTPose

@ccomrade
Copy link
Owner

Oh that's a lot of them. It's yet another game bug. I would rather avoid touching gameplay-related stuff here. This project (c1-launcher) is meant to be just a launcher that makes the vanilla game working on modern systems by fixing technical issues. For example, take a look at #3. A request to enable ragdoll physics for dead bodies. Sounds pretty simple, but it ended up to be a deep rabbit hole. Mostly due to having basically no source code access to the game in this project. It's like that on purpose to keep the launcher small and without side effects.

However, i also participate in the crymp-client project, which is like a big launcher replacing parts of the game/engine code with its own implementation. That means all kind of fixes and improvements. It's primarily focused on multiplayer, but singleplayer is supported as well. Would be nice if you can try to play with it and report bugs like this one there. Ideally with a way to reproduce the bug. To install it, simply get its EXEs from releases and drop them into Crysis main directory. Or go to crymp.net and click on Play now to get the installer, which also takes care of auto-updates.

@ccomrade
Copy link
Owner

By the way, crymp-client also enables mentioned ragdoll physics for dead bodies.

@Berzerk2k2
Copy link
Author

Would be nice if you can try to play with it and report bugs like this one there. Ideally with a way to reproduce the bug.

I'll give it a try. As for these enemies being stuck etc. I don't really know a way to reproduce it. This is something that happened totally out of nowhere.

@georgeli94
Copy link

This is an older thread, but I can say the glitch happens often but randomly and usually when you revisit old areas and corpses are still present. This is particularly obvious if you make the ragdolls stay forever, so there are a lot of dead enemies that are still around. Not entirely sure if it’s a glitch with the base game or with the mod I’m using (since all my saves are on the Tactical Expansion mod), though the OP seems to be using the vanilla game. If you touch the bodies in any way, they’ll often go back down to their normal state and reloading saves sometimes solves the issue too (though may then cause other bodies to t-pose).

I still don’t know exactly why this happens. I’m wondering if it’s a collision thing and the despawning of bodies in the base game was to hide this. If so, some way to fix it by maybe increasing the draw distance where ragdolls are tracked may help? I did try using g_ragdollmindistance to see if that’d fix anything but didn’t seem like it.

@ccomrade
Copy link
Owner

ccomrade commented Nov 3, 2023

I suspect it's also related to game saving/loading. If you can figure out a reliable way to reproduce the issue, fixing it might be possible.

@georgeli94
Copy link

Doesn’t seem to be since I’ve encountered it even without saving or loading before. The only consistent thing I can find is if I’m too far away, then sometimes the corpses will t pose, though not always. Though the distance isn’t really consistent. Maybe it may be a zone thing where physics objects aren’t tracked properly outside a certain zone? I’ve never encountered the t pose issue while in the same general area, but once I leave for the next area, it happens.

@georgeli94
Copy link

Hmm, I just did some more extensive testing, and you might be right, it may have something to do with save and loading. I never noticed the save and load aspect since it was always distance and zones that seemed to be important, and now I don't entirely remember if I ever encountered the issue without reloading a save since I do always play on Delta so I die fairly often.

But one thing I did notice from some limited testing (I did about 3 or so loads each after killing a bunch of enemies in a level with their non-despawned bodies) is that the bodies t-pose if you load from the in-game but don't t-pose if you load from the main menu, at least of the 3 or so times that I tested it. I know loading a save file from the same level but on two different playthroughs via the in-game menu will glitch up, at least with the mod I'm using. It'll break a lot of things since I assume the save file is trying to re-use things from memory but the specific parts are wrong due to being two different playthroughs and therefore everything is slightly different. I'd have to quit to the main menu, then load the other save file for it to work properly.

Again, my testing has been extremely limited so far so I can't say for certain that this is the issue, but at the very least it does seem to mitigate it significantly. I'm wondering now if it's possible to modify the save loading behavior to make it always load like it does from the main menu. Would make the loading longer, potentially, but also more stable. Though knowing this behavior, I may be willing to just deal with it since I usually am going through one particular area to the next (and none of the bodies near me have t-posing issues if I quickload) and if I backtrack, I can always just load from the main menu again since that does seem to fix the issue. But at least for this problem, we're a bit closer to seeing what causes it and if it can be fixed, it would be glorious since we can have all the corpses lying in the places they should without despawning.

@ccomrade
Copy link
Owner

ccomrade commented Nov 4, 2023

It's strange because if it would be some issue with serializing game state, there would be T-posing enemies always after game load. Maybe it's somehow related to distance as you mentioned.

@georgeli94
Copy link

Did some more testing and it never occurred when the save file is loaded from the main menu, so I suspect the problem is the game doesn’t fully track everything outside of a certain zone and when you load a save file via quick load, it just keeps as much of the stuff already in memory and simply moves some previous stuff around, which if they’re not tracked outside of that zone can occasionally cause the physics to glitch up. Doesn’t happen all the time, but often enough since it’s not being tracked properly. But if you load from the main menu, it’s loading everything from the save file directly without reusing anything in memory, so everything is tracked better and the issue doesn’t crop up.

I can’t say if this explanation is actually true or just bullshit, but I do know the infamous constantly respawning enemies in Far Cry 2 occur because the game can’t track anything outside of a certain zone sos everything just resets back to original state. Crysis thankfully doesn’t do that, but there’s still probably some zone shenanigans going on since distance (or at least obvious areas) do seem to play a role in which corpses t-pose.

@georgeli94
Copy link

btw, since I'm back to playing Crysis again after such a while, I can confirm that it's a loading thing. Enemies only t-pose (in both Crysis and Crysis Warhead) if I quickload or load from the in-game menu. If I quit back to main menu and load a game from there, the problem goes away every single time I've tried it. This even applies if I save at some enemies that are t-posing since if I quit and load from main menu, the enemies go back to normal. I've gotten the habit of loading from the main menu anytime I die (unless I'm at a particularly difficult spot where I'm stuck for a while) and never encountered the t-posing enemies bug ever again, which also allowed me to enable the permanent corpses cvars so enemy bodies don't disappear in the entire level, which is a nice bit of aftermath after some big fights.

Don't know if it's worth fixing for you, but for anyone else who's encountering this, just load the game from the main menu if you encounter this and the problem will go away.

@ccomrade
Copy link
Owner

ccomrade commented Jun 1, 2024

Is there a reliable way to easily reproduce this issue? No chance to fix this otherwise. Having almost no source code already makes many issues nearly impossible to fix. 😄

@georgeli94
Copy link

Best way to reproduce this issue is to have persistent corpses, play through a level with a lot of enemies, quickload, then walk back to older areas with a bunch of dead enemies. But if you load from the main menu, the problem goes away.

So the only way to fix this would be to change how loading works by always forcing the game to fully reload as akin to the main menu. It's most likely impossible to fix as you said, so I just wanted to put this information on this thread and tell people "if you run into this issue, exit the game and reload back from main menu". That'll solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants