Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid configstring index clash with base_entranced #1218

Merged
merged 1 commit into from Mar 5, 2024

Conversation

Razish
Copy link
Member

@Razish Razish commented Feb 27, 2024

Alereon pointed out that CS index 26 is used by deathsythe47/base_entranced@e62eda6, so let's try to not stamp over that with our CS_LEGACY_FIXES.
Our configstring was only introduced very recently, so we can probably get away with just changing our index now.

base_entranced now also makes use of most of the other free CS indexes:

  • 26: base_entranced: CS_ENHANCEDLOCATIONS / clash with our CS_LEGACY_FIXES
  • [...] used by basejka
  • 33: base_entranced: CS_CUSTOMOBITUARIES
  • 34: base_entranced: CS_CUSTOMVOTES
  • 35: <free>
  • 36: <free>
  • [...] used by basejka

So I chose 36. I don't know if/what other mods might use this.

The next free slot is 1644 (max: 1700). We could also insert our new configstrings after this index, which hopefully no one else has?
It would look like this:

diff --git a/codemp/game/bg_public.h b/codemp/game/bg_public.h
index 0326fb64f..69287fee3 100644
--- a/codemp/game/bg_public.h
+++ b/codemp/game/bg_public.h
@@ -120,8 +120,6 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
 #define CS_CLIENT_DUELHEALTHS	31		// nmckenzie: DUEL_HEALTH.  Hopefully adding this cs is safe and good?
 #define CS_GLOBAL_AMBIENT_SET	32
 
-#define CS_LEGACY_FIXES			36
-
 #define CS_AMBIENT_SET			37
 
 #define CS_SIEGE_STATE			(CS_AMBIENT_SET+MAX_AMBIENT_SETS)
@@ -152,7 +150,11 @@ Ghoul2 Insert End
 #define CS_TERRAINS				(CS_LIGHT_STYLES + (MAX_LIGHT_STYLES*3))
 #define CS_BSP_MODELS			(CS_TERRAINS + MAX_TERRAINS)
 
-#define CS_MAX					(CS_BSP_MODELS + MAX_SUB_BSP)
+#define CS_MAX_RETAIL			(CS_BSP_MODELS + MAX_SUB_BSP)
+
+#define CS_LEGACY_FIXES			(CS_MAX_RETAIL+1)
+
+#define CS_MAX					(CS_LEGACY_FIXES+1)
 
 #if (CS_MAX) > MAX_CONFIGSTRINGS
 #error overflow: (CS_MAX) > MAX_CONFIGSTRINGS

Otherwise, we can work our way backwards from MAX_CONFIGSTRINGS, but I don't like that idea 馃し

Copy link

@bartrpe bartrpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As much as I don't like it it looks like there's no choice to remove it for now, given how popular base_entranced is?

There's really no code quality to check and the decision is sadly simple?

@Razish Razish merged commit 2a7c526 into master Mar 5, 2024
16 checks passed
@Razish Razish deleted the legacyfixes-configstring-clash branch March 5, 2024 06:59
taysta added a commit to taysta/TaystJK that referenced this pull request Mar 5, 2024
* damagenumbers improvement, mandatory checkpoint logic improvement

* fix damage number for npc

* typo fix

* add courseid to checkpoints for eventual mandatory checkpoint

* Update japro_docs.md

* Update w_force.c

nerf tribes shield/protect

* deadstop fix for mv_tribes?

* shield nerf tribes

* ability to unset checkpoints

* tribes wep tweaks, dodgemove

* dodge tweak

* tribes dodge tweak

* tribes weapon tweaks

* oops

* wep tweak

* oops

* tribes wep tweaks, no more mortar weapontweak its part of tribes now

* rocket fix

* rewrite firetime overwrites

* redeemer tribes tweakz

* Update g_weapon.c

* dashfix?

* epic

* fix redeemer tribes

* buff dodge

* dodge uses fuel

* ep

* s6

* Update g_trigger.c

* Update g_trigger.c

* s6

* splashdmg flag,  edgebug fix option (test)

* epic

* 1flag ctf

* flagpunt nerf, racemode ctf fix?

* g_neutralflag 5 for other style of 1flagctf

* 1flagctf timers

* checkpoint and neutral flag timer tweak

* timerfix

* add fix explosive hitbox as a wt

* spawnflags 256 + 4 on newpush for absolute z vel

* allowedstyle for trigger_newpush

* auto return pitted flags even if there is no surf_nodrop

* strange return fix?

* bug?

* ok

* flag splash knockback fix, bounce fix

* fixes from tom

* tribes class system test

* tribes class fix

* tribes heavy hitbox

* tribes class fix

* modelname c hange

* tribes tweaks

* tribes balance

* tayst fix 1stperson ski view

* tribes fixes

* tribes fix

* tribes tweaks

* eweb tweaks

* tribes vel tweaks (t2c) , crashfix, aagun

* fixfff

fff

* fix pill ghosting, score bug

* heavy physics tweak

* fix

* ammo fix

* faster jet refuel, give jetfuel on pills

* make tribes jetpack use forcepower instead of jetpackfuel

also blow up redeemer if we weaponswitch

* nerf shrike ram damage in tribes mode

* redeemer rework to not require perfect aim

* make tribes alt rockets easier to hit

* re add redeemer explode when swap wep

* redeemer tweak

* redeemer tweak for turnspeed cap

* redeemer tweak

* instantupdate tribesclass, showhealth settings

* heavy healthbar

* chaingun overheat mechanic

* stunbaton for tribes

* let us walk up steeper slopes in tribes

* test push, sabers in tribes.  hardcode jetpack regen in tribes.

* re add full grapple to tribes but make it cost fuel

* fix

* fix

* push strength fix tribes

* crash fix

* backslash tribes

* tribes push

* longer sabers in tribes

* fix shields in tribes

* fix

* rCompare command

todo: sorted by difference instead of course popularity

* plasma gun v1

* dont healthbar racemoders

* 3rd class for tribes (light)

* boltlauncher tweak

* fix

* dont require forcepoint menu for tribes powers

* fix

* fix2

* tweak

* charge

* crashfix

* fix

* fix for tribes GLs not rendering explosions on direct hits with terrain......

* scale net health when increasing health instead of just in g_damage

* superheavy damage nerf, superheavy knockback reduce, class based knockback scale, class based push scale

also half energy gained by pills if you are using protect

* tribes class detection tweak

* tribes respawn delay

discjump nerf
light items fix
bowcaster flag punt

* no respawntimer in tffa

* nugget gives items, integer mins/maxs

* revert test?

* deadstop/stepsize fix

* light chain,

* fix?

* balances

* flagthrow physics

* crashfix

* jetpack hackscale fix, jetapck fuel regen delay, punting fix

* passive heal

* fix i guess

* tribesclass health rework

* fix

* tribes health regen, armor pickup fix

* tribes light mass fix, regen fix, kb fix

* fix health scaling, kb

* protect fix

* dmg tribesmode tweaks

* tribes weps

* crashfix, npc damage fix

* vehicle damage scaling

* better npc health fix

* tribes fixes, trigger newpush spawnflags 512

* coop conc fix

* tribes grapple tweaks

* conc sniper uses energy like phase rifle, mortar  FX tweak, bounce strength

* lt fix

* pill regen

* superheavy dmg fix, pill amt fix

* redo tribes grapple

* tribes grapple change

* crashfix???

* tribes grapple tweaks

* hook forcepoints

* proj sniper no drop

* proj sniper tweak

* swap firemodes for stun and e11 in tribes mode.

increase max slope walkable in tribes mode
rework hook (max 4s duration) in tribes mode
buff grapple range tribesmode
buff light chain overheat

* start of special pack moves for tribes

testing blink

* blink tweak

* blinkmove tweaks

* thrust pack

* pack fix

* oops

* cgame compilefix?

* cgame compile fix

* overdrive pack test

* do the overdrive speed here so its predicted without needing client

* sniepr dmg fix

* overdrive balance tweaks

* compilefix

* /pack to choose pack item

* pack default, proj sniper nerf tribes, inc course limit

* absorb delay tribes

* jetpack racemode fix, allowedstyle fix?

* few more warps

* conc racemode fix, hitbox scaling (?),

* flag phys tweak

* tribes racemode stuff

* conc splash fix, some typo fixes

* typo fix, will this change something with elevators in racemode?

* int to time function change

* fix racemode tribes kb

* tribes jet tweak (effective 20% energy drain buff heavy)

* crashfix?

* let search for rtop mapnames with spaces by using &

* tribes balance tweaks for pack/grapple

* don't consume tribes jetfuel in water

* mortar fix

* grapple speedloss fix

* trigger_hurt spawnflags 32 is npc only,  adjust  tr_gravity in tribes

* tired

* cosmetics unlock fix

* thrownade command

* throw grenade fix

* grapple tribes race fix

* test per-weapon delays

* test slick terrain fix

* oops

* re add some delay to doomet wepswitch

* tribes fixes

* surf v1 from devy / css

* surf fix?

* surf fix ?

* test surf strength cmd

* A few small changes (cl_filterGames + MAX_PATCH_PLANES increase) (JACoders#1188)

* [MP] Add cl_filterGames cvar to discard servers that use an fs_game matching one listed in the cvar (separated by spaces).

* [MP] Use known MB2 (incompatible mod using the default serverlist) fs_game values as default for cl_filterGames to filter them out.

* [Shared] Increase MAX_PATCH_PLANES from 2048 to 4096.

Due to precision/rounding differences the vanilla engine on Windows, Linux and Mac effectively treated this limit different and the behavior for never consistent. For that reason jk2mv doubled the value back in 2015 and by now some maps require the limit to be increased.

* [MP] Improve cl_filterGames.

Skip cl_filterGames entry if it matches the current fs_game.
Add support for filtering servers without fs_game set (BASEGAME).

* surf strength

* replace PATCH_STITCHING preprocessor define with r_patchStitching cvar (JACoders#1199)

* re add crashland in skii but adjust it so it doesn't affect zspeed

* quick fix to stop crouching down tribes slopes to give more speed

* comment rcompare

* cache pb/wr sounds

* downjet tribes tweak, self kb buff

* dont affect racemode with this until finalized

* blink nerf range

* fix thrownade

* render local entities as late as possible (JACoders#1200)

this should defer an overflow of refents occurring that would result in e.g. map models disappearing (light poles on mp/ffa5)
localents are a lower priority, we can afford to miss out on force push/grip effects in these cases

* Fix endless loop in Z_Malloc due to imageDeleted always being qtrue, even if no images were deleted. (JACoders#1209)

Co-authored-by: Tom <tomarrowtomarrow@hotmail.com>

* ignore numBones assert if we're mixing jk2/jka models (JACoders#1210)

* [Meta] trim EOL whitespace (JACoders#1202)

* trim EOL whitespace

* draw the rest of the owl

* fix encoding issue with JK2 cg_effects.cpp

* [Meta] deprecated WinXP builds, introduce macOS-14 runner for M1 builds (JACoders#1206)

* deprecated WinXP builds, introduce macOS-14 runner for M1 builds

* also allow running deprecated actions manually

* [Shared] misc loop overrun fixes (JACoders#1201)

* misc loop overrun fixes

* revert RT_BEAM changes

the extra iteration is intentional to seal the tri strip

* revert inadvertent whitespace changes

* [Meta] Update readme (JACoders#1171)

* update readme

* github-friendly emoji

* normalise build links

* missed a build link, clarified linux instructions

* link to publicly viewable org, normalise paths

* remove mention of OpenJKDF2

* [MP] reconcile game module changes with the original source releases by diffing codemp/game (JACoders#1178)

* reconcile game module changes with the SDK release by diffing codemp/game

* revert saberMoveData changes to match basejka, provide a new cvar (g_fixSaberMoveData) to patch it if desired
* introduce a new configstring (26: CS_LEGACY_FIXES) to inform the client of which fixes it should also apply, e.g. saberMoveData
* client module obtains gamestate (including configstrings) earlier to prevent use before initialisation, which is now checked for in debug builds
* revert a change to saber disarm bonus calculation if g_fixSaberDisarmBonus is not enabled
* G_CanBeEnemy considers private duels once again (removed from modbase before its git history)

* add disclaimer to legacyFixes_e

* revert: client module obtains gamestate (including configstrings) earlier to prevent use before initialisation

this was causing issues loading incorrect clientinfo

* [MP] Remove BASE_COMPAT define (JACoders#1211)

* move BASE_COMPAT flag behind cmake option BuildMPWithCompatMode, add g_fixWeaponAttackAnim making use of CS_LEGACY_FIXES

* remove BASE_COMPAT and BuildMPWithCompatMode, add g_fixRunWalkAnims

* actually remove BuildMPWithCompatMode

* remove bloat

* let passengers eject from vehicles

* Thomas

* crashfix

* replace saberthrow with backslash in tribes

* messy jetpack tribes test

* thrust buff, spread for light chain

* better dropped flag physics (slide downhill)

* flag slide tweak

* [MP] fix g_weaponDisable + g_forcePowerDisable regression when creating listen servers (JACoders#1217)

* fix g_weaponDisable + g_forcePowerDisable regression when creating listen servers.

re-enabling this block that turns e.g. g_weaponDisable 1 --> g_weaponDisable 524279
also fix some stray uninitialised warnings

* replace commented code with commented words

* g_forcelogin 2 blocks chat from people not logged in

* g_forcelogin 3 block rename - need testing

* add support for df_trigger_stop having worldrecordnoise field

* cs style crouch to surf style

* valid surf

* better highspeed jets

* river current support for trigger_newpush

1) a trigger brush w/ spawnflags 512 that covers the river
2) a target_position for each bend in the river.  push angle will be interpolated between the nearest two positions

* Update g_trigger.c

adjust trigger water push speed

* dynamic scoring for CTF flag returns based on distance from bases

* v0 of tribes bots

* adjust ctf scoring option

* print fix

* dynamic scoring for CTF flag returns based on distance from bases

(cherry picked from commit 3f21a83)

* v0 of tribes bots

(cherry picked from commit 8b4454a)

* adjust ctf scoring option

(cherry picked from commit 1715267)

* print fix

(cherry picked from commit ddf712c)

* better tribes bot weapon decisions, jet Z tweak,

* avoid configstring index clash with base_entranced (JACoders#1218)

* [Shared] add a custom CMake target to copy compilation DB from build dir to source dir (JACoders#1177)

* add a custom cmake target to copy compilation DB from build dir to source dir

see https://clang.llvm.org/docs/JSONCompilationDatabase.html for further details

* gitignore compile_commands.json

* better tribes bot weapon decisions, jet Z tweak,

(cherry picked from commit 375e215)

* Fixup merge conflicts

* Fixup merge conflicts - japro

---------

Co-authored-by: videoP <videoprofess@gmail.com>
Co-authored-by: Daggolin <Daggolin@Gmx.de>
Co-authored-by: razor <mrrazish@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants