codenamecpp / carnage3d

Reimplementation of Grand Theft Auto 1 [GTA1]
MIT License
477 stars 38 forks source link

Cannot Change Inputs #43

Closed mossymossmoss closed 4 years ago

mossymossmoss commented 4 years ago

New to writing issues, sorry in advance.

I was trying to change the inputs for the game by editing gamedata/config/inputs.json but after changing anything, I got the error carnage3d-debug: ../src/enum_utils.h:98: bool cxx::parse_enum(const char *, TEnum &) [TEnum = eKeycode]: Assertion false' failed. make: *** [Makefile:39: run_demoversion] Aborted (core dumped) I am using arch linux if that helps, i am probably missing something obvious here

codenamecpp commented 4 years ago

Please show your inputs.json after making all the edits

mossymossmoss commented 4 years ago

{ "player1": { "controller_type": "Keyboard", "keys": { "LeaveCar": "e", "HandBrake": "Shift", "Accelerate": "w", "Reverse": "s", "SteerLeft": "a", "SteerRight": "d", "Horn": "Tab", "TurnLeft": "a", "TurnRight": "d", "Jump": "Space", "WalkBackward": "s", "Run": "w", "Shoot": "LCtrl", "NextWeapon": "x", "PrevWeapon": "z", "EnterCar": "e", "EnterCarAsPassenger": "f" }, "gamepad": { "LeaveCar": "X", "HandBrake": "Y", "Accelerate": "Up", "Reverse": "Down", "SteerLeft": "Left", "SteerRight": "Right", "Horn": "A", "TurnLeft": "Left", "TurnRight": "Right", "Jump": "LeftTrigger", "WalkBackward": "Down", "Run": "Up", "Shoot": "B", "NextWeapon": "LeftBumper", "PrevWeapon": "RightBumper", "EnterCar": "X", "EnterCarAsPassenger": "A" } }, "player2": { "controller_type": "Gamepad2" }, "player3": { "controller_type": "Gamepad3" }, "player4": { "controller_type": "Gamepad4" } }

I was also testing it by only changing EnterCarAsPassenger to ‘q’ and leaving everything else but it still gave me the same result

codenamecpp commented 4 years ago

Oh, yes, it's my fault - not all keycodes were defined. I've added some to solve the problem. Thanks for feedback.