-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
You can be shot and killed by hallucination NPCs #53510
Comments
Oddly enough, we have a |
I don't know how to test this but I think the fix could be this: if ( source.is_hallucination() ) {
gun_mode mode = source.get_wielded_item().gun_current_mode();
source.pretend_fire( source, mode.qty, *mode );
} else {
source.fire_gun( location );
} in here: npc_attack.cpp This piece of code is immediately followed by a |
I'm at work and can't compile anything right now, but the best way to test this would be to do just that. Compile the project with that code added in, and run it. See if it works as you expect. If it doesn't, make a test procedure and repeat it in the debugger, though playing Cataclysm through a debugger is like walking while neck deep in quicksand. The game slows down to the point of being damn near unplayable. |
For what it's worth, this looks like the correct answer, but I have a busy day today and can't implement it myself. If nobody does this by tomorrow, and assuming the COVID booster doesn't kick my ass, I'll try it. |
Congratulations sir. You were almost 100% correct. |
Describe the bug
Hallucinatory NPCs can shoot and kill you.
Steps to reproduce
Here's a savegame you can use. There is an armed hallucination inside the cabin directly to the east. Make them angry and they can shoot you!
Alfred.zip
Expected behavior
I would expect hallucinatory NPCs to NOT be able to shoot me.
Screenshots
Versions and configuration
Dark Days Ahead [dda],
Bionic Slots [cbm_slots],
Disable NPC Needs [no_npc_food],
No Fungal Growth [no_fungal_growth],
Bionic Professions [package_bionic_professions],
No Rail Stations [No_Rail_Stations],
sees-player, run, crouch, bleed icons, retrodays [sees_player_retro],
Fewer Soldier Extras [Fewer_Soldiers]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: