fcam simple controls but slightly less hacky
notable things:
- ability direction menu option is replaced with a play style submenu
- camera options now has headings and is super-expanded in simple controls mode
- all camera features from that mod I released on the MB
- G_BuildTiccmd/2 consolidated into one function because fuuuuuuuck keeping the two in sync
- relevant cvars are declared as two-long arrays instead of having to manually juggle things like cam_dist/cam2_dist (imo this should be done with all cvars/commands that are duplicated per local player but I didn't wanna bloat the mr)
internal differences from the mod version:
- instead of using a new abilitydirection cvar, simple controls is now defined as "configanalog plus directionchar both on". (for classic analog, use configanalog on and directionchar off, you fucking masochist)
- ticcmd forwardmove/sidemove are no longer destroyed, and instead the camera angle is used as angleturn (just like analog mode!). some movement code was tweaked to accomodate this, but it should feel identical in control to the mod version
- fixed spycam for simple control users being a total trash fire
- added G_ControlStyle (for ticcmd generation) and P_ControlStyle (for player physics) macros to simplify distinguishing different control styles, as well as an enum for the various options (this considers directionchar on/off as separate "Standard"/"Legacy" control styles just like the mod)
- CS_LMAOGALOG is my and toaster's combined magnum opus of variable names
thank you for considering this code
Edited by colette
Merge request reports
Activity
Filter activity
added 40 commits
-
f8a3e3b8...fc1eff6e - 39 commits from branch
STJr:next
- c133e645 - Merge remote-tracking branch 'upstream/next' into next-newcontrols
-
f8a3e3b8...fc1eff6e - 39 commits from branch
g_game.c: In function ‘G_BuildTiccmd’: g_game.c:1517:10: error: declaration of ‘lookaxis’ shadows a previous local [-Werror=shadow] 1517 | INT32 lookaxis = ssplayer == 1 ? cv_lookaxis.value : cv_lookaxis2.value; | ^~~~~~~~ g_game.c:1129:69: note: shadowed declaration is here 1129 | INT32 tspeed, forward, side, axis, strafeaxis, moveaxis, turnaxis, lookaxis, i; | ^~~~~~~~ g_game.c:1648:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 1648 | fixed_t factor = min(40, FixedMul(player->speed, abs(sine))*2 / FRACUNIT); | ^~~~~~~
Where is the controlstyle the demo was being recorded with written, actually? I just realised I saw it was being read for the UI but not written for the sake of replays, so even if the replay were being played with LMAOGALOG, it might display SIMPLE instead if the local player had SIMPLE applied...
Edited by toastermentioned in commit a63bd720
mentioned in issue #507
Please register or sign in to reply