Skip to content
Snippets Groups Projects

fcam simple controls but slightly less hacky

Merged colette requested to merge fickleheart/SRB2:next-newcontrols into next

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

Checking pipeline status.

Merged by avatar (Apr 12, 2025 5:02am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • colette added 40 commits

    added 40 commits

    Compare with previous version

  • 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);
          |     ^~~~~~~
  • colette added 2 commits

    added 2 commits

    • 5abf0c24 - oh god I forget why this is here but let's not remove it now
    • 6211c80a - Mixed code and declaration stuff

    Compare with previous version

  • Contributor

    Hi co! Has DEMOVERSION been incremented, given the different ticcmd layout (I think)? I gave the diff a quick readover but didn't see anything relating to demos updated except for adding the SIMPLE control display text'sve.

  • Author Contributor

    ticcmd's structure hasn't changed! this admittedly will cause some replays recorded with analog mode to become desynced, but it shouldn't cause catastrophic issues....

  • Contributor

    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 toaster
  • Contributor

    Wait no never mind I misread the thingy, it's not a global, woops

  • Author Contributor

    it uses the existing flags for PF_ANALOGMODE and PF_DIRECTIONCHAR. simple mode is just defined as those two together, whereas each one individually maintains old behavior

  • colette changed the description

    changed the description

  • merged

  • James R. mentioned in commit a63bd720

    mentioned in commit a63bd720

  • MascaraSnake mentioned in issue #507

    mentioned in issue #507

Please register or sign in to reply
Loading