-
Notifications
You must be signed in to change notification settings - Fork 65
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
Weapon cheating is working incorrectly. #362
Comments
Items can't be spawned, the cheat command is simply writing over the inventory structure. This is a hard problem; we'd have to load the level where a certain weapon is, put it in the inventory, save the level, then return to the original level. |
Since weapons acquired with the cheat command are not "world" objects, they aren't handled properly in some obscure ways. I think what's causing the strange ammo type behavior is that, for example, a projectile weapon in slot 4 with these values: is later modified with data for an energy weapon: causing the ammo type to now have a crazy value way out of bounds. I think one thing to do would be to try to modify any held weapons so that they change into cheat weapons. But if one such weapon was then dropped, I don't know if the world object would be correct. |
As a quick solution, can the cheat weapon set be replaced with non-energy weapons? |
Maybe I'm wrong (it's been a long time since I went digging into the code), but I don't think that would fix it, since an energy weapon can be in a slot before the cheat is applied. When the weapon inventory is overwritten by the cheat, the world objects that were there are caught in limbo and confuse the game in peculiar ways. The cheats were probably just quick, quite broken hacks, and aren't like the ones you see in, for example, DOOM. I recall fixing another that crashed when cycling through levels. |
As discovered in #360, cheating for weapons (
CTRL+2
) results in some problems. These problems are:The code which causes problems is in
src/GameSrc/hkeyfunc.c
intoggle_giveall_func()
.Is there any ideas how to fix it?
The text was updated successfully, but these errors were encountered: