GTR_ALLOWEXIT Conflicts with GTR_RINGSLINGER
While working on a custom co-op game mode, I made a bad discovery. For some reason in my custom game mode exit sectors doesn't want to work properly.
Thanks to Midiman, we found out why this was happening. Apparently exit sectors are hard coded to only work properly if the rules for ringslinger are not used. https://discord.com/channels/357945222111428609/357945601855586304/882066892037165066
This is in conflict with another snippit found in g_game.c
// G_RingSlingerGametype // // Returns true if the current gametype supports firing rings. // ANY gametype can be a ringslinger gametype, just flick a switch. // boolean G_RingSlingerGametype(void) { return ((gametyperules & GTR_RINGSLINGER) || (cv_ringslinger.value)); }
Unless there's another "switch", Not any gametype can be a ringslinger gametype.
This wad can be used to test out the issue. SonicDoom3.wad
The way I set up the custom game type was as follows and, according to the wiki, should allow for exit sectors to work. (done in lua form.)
freeslot('tol_doom') G_AddGametype({ name = "Sonic DOOM", identifier = "doom", typeoflevel = TOL_SP|TOL_COOP|TOL_DOOM, --can also define custom level type rules = GTR_CAMPAIGN|GTR_RINGSLINGER|GTR_FIRSTPERSON|GTR_LIVES|GTR_FRIENDLY|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_SPECIALSTAGES|GTR_EMERALDTOKENS|GTR_CUTSCENES, intermissiontype = int_coop, headercolor = 103, description = "testing ringslinger sp" })
(gitlab messed up the formatting)