-
Notifications
You must be signed in to change notification settings - Fork 52
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
Game crashes, Imps always involved #371
Comments
Yes this instablility was here for a long time (not only imps, but maybe fireballs) |
Were does the logs land? I can check the logs next time it happens. The bug does not happen on the old build found here only your build |
@NPi2Loup Event viewer only gives this
More info from the error report file
|
Crash happened with a normal zombie soldier today, |
So as I was getting frustrated with the crashing, I installed visual studio 2022 and pulled the source from NPi's fork to see if I can troubleshoot this on my own. I believe this issue is happening in Projectile.cpp. Under the function idProjectile::Launch, there was logic to check if the player is throwing a grenade, but it's not correctly checking if the entity is a player or an enemy first. Sometimes when an enemy shoots a projectile, the function confuses the enemy as a player, which can result in an access violation. Here's the snippet, above it this line should be added: "if( ( owner.GetEntity() && owner.GetEntity()->IsType( idPlayer::Type ) ) )"
A previous commit for Koz's repo moved the grenade logic elsewhere which should also address the issue, but it's not implemented in the latest release. Instead it was incorporated into Doom3Quest. For now I implemented the fix on my local repository and I'm currently testing it to see if it helps with the crashing. I also backported Doom3Quest's fix for #363. If it stops the crashing I may share my own release, but I'm not very familiar with github so I'm not sure if it's better to merge with NPi's fork or make a fork on my own. |
If you're ok, I will make a new release with your fix :) |
@NPi2Loup Thanks! |
Game crashes often. Its always a imp involved when it crashes., Tested with
NPi2Loup build v0.021h-Alpha
The text was updated successfully, but these errors were encountered: