From 83cf85e659244a3ef17d7a37779e7260f0c6c172 Mon Sep 17 00:00:00 2001 From: videoP Date: Thu, 11 Apr 2024 02:55:47 +0800 Subject: [PATCH 1/6] Update Defrag Mapping Guide.md (cherry picked from commit c5ed043fc5500e4d10d063a902270af1af9e5582) --- docs/Defrag Mapping Guide.md | 71 +++++++++++++++++++++++++++++ japro_docs.md => docs/japro_docs.md | 0 2 files changed, 71 insertions(+) create mode 100644 docs/Defrag Mapping Guide.md rename japro_docs.md => docs/japro_docs.md (100%) diff --git a/docs/Defrag Mapping Guide.md b/docs/Defrag Mapping Guide.md new file mode 100644 index 0000000000..e6599720a9 --- /dev/null +++ b/docs/Defrag Mapping Guide.md @@ -0,0 +1,71 @@ +**JKA Defrag Map Maker guide:** + +This guide will focus on making defrag maps for jaPRO mod. I don't know of any other JKA MP mod that does defrag timers except for CTF fast-caps (timers based on ctf flag capture). + +**Base concept:** +A defrag course has a start and a finish. Players spawn before the start line and their timer is started by crossing the start line. Their timer is stopped when they hit the finish line and their time is recorded if it is a personal best. Leaderboards exist to see how they compare to other players. You can have many courses in one map. + +**Movement styles:** +Currently there are 19 different movement styles in jaPRO defrag. A movement style is simply a different set of movement physics the player can choose to use. Leaderboards are specific to a movement style. The styles are: + +1. **siege** + This is the style used in siege mode of JKA. There is no air acceleration. Players typically use rolling, ramps, and wall-strafe to increase speed. +2. **jka** + Default JKA style. +3. **qw** + Inspired by quakeworld but with JKA force jump. Players can make tighter turns while maintaining their speed. It also has ramp jumps. +4. **cpm** + Inspired by CPM from q3 defrag. No forcejumps, faster basespeed (320), high air control, rampjumps, and double jumps. +5. **q3** + Inspired by vanilla mode from q3 defrag. Like CPM but without increased air control. +6. **pjk** + Like CPM but with force jump, and regular JKA basespeed. +7. **wsw** + Inspired by Warsow. Like CPM but with a dash move and a walljump move, which lets you redirect your speed to any angle without speed loss. Its version of ramp jump also does not reduce your horizontal speed at all. +8. **rjq3** + Q3 with rocket launcher. Players propel them selves with rocket knockback. +9. **rjcpm** + RJQ3 with air control. +10. **swoop** + Riding a swoop bike. It's modified to give you a grav boost option which lowers your gravity for a few seconds. +11. **jetpack** + Jetpack but with different jetpack physics and spiderman style grapple hook that lets you properly swing. It also has detpacks for self knockback boost. +12. **speed** + JKA but with faster base speed (same as forcespeed). It only gives you 50force which does not regen. +13. **sp** + SP inspired physics (higher air accelerate and your speed is halved when you land unless the landing point is lower than your takeoff point). +14. **slick** + All ground friction is removed and has super fast acceleration while on ground. No forcejump. +15. **botcpm** + Same as CPM but it has a button that makes your strafe angles perfect. +16. **coop** + 2 player mode. JKA physics with weaopns that let you boost eachother. +17. **ocpm** + Version of CPM which tries to be mroe accurate to Q3 defrags version of CPM. Specifically 125fps physics and velocity snapping. +18. **tribes** + Tries to mimic the skiing and jetpack style of movement from the tribes franchise. Has a gun that you can self boost with, and a thrust pack that you can trade forcepoints for speed with. +19. **surf** + Inspired by CS 1.6 physics. Can be used for surf maps or bhop maps. + +Seaons: +Furthermore, leaderboards can be broken down per season. The current seasons typically lasts 1 year, for example season 5 was 2023. A global leaderboard still exists which ignores seasons. + +**Mapping tips:** +There are a few things to take into account when making a defrag map. First is the start area. You don't want players to be able to build up a huge amount of speed before hitting the start trigger, as this is typically seen as boring gameplay called "loop starting". Areas before the start brush are typically very small and have a patchmesh infront of the start trigger so players cant re-trigger the start once they go past it. There are other options (trigger_newpush) that let you dynamically cap a players speed in certain directions (to prevent "loop starting") while in the start. +Checkpoint triggers are popular to scatter throughout the course so players can gauge their speed throughout the run. +Try to make use of noise, message, etc fields on the triggers. If you have multiple courses, the message field on the finish trigger is mandatory and acts as the courses name. + +**New/modified entities:** +See here https://github.com/videoP/jaPRO/blob/master/scripts/japro_entities.def + +**Examples:** +Challenge style map: https://www.youtube.com/watch?v=NqDdeNQkCjI + +Race map on built on an existing map: https://www.youtube.com/watch?v=m7W-88DdPKk + +Climb style map: https://www.youtube.com/watch?v=crhV1V4IndM + +Torture style map: https://www.youtube.com/watch?v=WlgNCN6MbtQ + +Montage: https://www.youtube.com/watch?v=sy3HdYTx0yE + diff --git a/japro_docs.md b/docs/japro_docs.md similarity index 100% rename from japro_docs.md rename to docs/japro_docs.md From 2c0bc8dd7855ac7e245a0df02dda15565c583bb2 Mon Sep 17 00:00:00 2001 From: videoP Date: Thu, 11 Apr 2024 17:31:33 -0400 Subject: [PATCH 2/6] terrain deadstop fix test (cherry picked from commit 3c44ae718c905eeda9ffb102465254b89424a675) --- codemp/game/bg_slidemove.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codemp/game/bg_slidemove.c b/codemp/game/bg_slidemove.c index f28f533a2f..2c7155f8c8 100644 --- a/codemp/game/bg_slidemove.c +++ b/codemp/game/bg_slidemove.c @@ -837,6 +837,13 @@ qboolean PM_SlideMove( qboolean gravity ) { PM_ClipVelocity(pm->ps->velocity, planes[i], clipVelocity, OVERCLIP); // slide along the plane PM_ClipVelocity (endVelocity, planes[i], endClipVelocity, OVERCLIP ); +#if 1 + if (pm->ps->stats[STAT_MOVEMENTSTYLE] == MV_TRIBES && (pml.groundTrace.surfaceFlags & MATERIAL_MASK) == MATERIAL_SHORTGRASS && (planes[i][2] == 0 || planes[i][2] == 1)) {//Vert collision in tribes mode + //For some reason I have to use pml.groundtrace results instead of trace results because trace results dont see the surfaceflags or contents (???). Need to add more material types for terrain detection. Or make use of surfaceparm terrain instead in the future. + pm->ps->pm_time = 250; + //Com_Printf("^3Deadstop detection! Mitigating! Contents is %i %i %i %i\n", trace.surfaceFlags & MATERIAL_MASK, pml.groundTrace.surfaceFlags & MATERIAL_MASK, trace.contents & CONTENTS_INSIDE, pml.groundTrace.contents & CONTENTS_INSIDE); + } +#endif #if _GAME //Always in coop? what if somehow there is no playerstate? crash? From 6066bc284d89310c68d26850408dad39eba8df32 Mon Sep 17 00:00:00 2001 From: videoP Date: Thu, 11 Apr 2024 17:39:11 -0400 Subject: [PATCH 3/6] fix (cherry picked from commit 3fb5934c72d4342fa5ce034efc2e3629a6aff688) --- codemp/game/bg_slidemove.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codemp/game/bg_slidemove.c b/codemp/game/bg_slidemove.c index 2c7155f8c8..2dbfba4d1a 100644 --- a/codemp/game/bg_slidemove.c +++ b/codemp/game/bg_slidemove.c @@ -838,7 +838,9 @@ qboolean PM_SlideMove( qboolean gravity ) { // slide along the plane PM_ClipVelocity (endVelocity, planes[i], endClipVelocity, OVERCLIP ); #if 1 - if (pm->ps->stats[STAT_MOVEMENTSTYLE] == MV_TRIBES && (pml.groundTrace.surfaceFlags & MATERIAL_MASK) == MATERIAL_SHORTGRASS && (planes[i][2] == 0 || planes[i][2] == 1)) {//Vert collision in tribes mode + if (pm->ps->stats[STAT_MOVEMENTSTYLE] == MV_TRIBES && + (((pml.groundTrace.surfaceFlags & MATERIAL_MASK) >= MATERIAL_SHORTGRASS && (pml.groundTrace.surfaceFlags & MATERIAL_MASK) <= MATERIAL_GRAVEL) || ((pml.groundTrace.surfaceFlags & MATERIAL_MASK) == MATERIAL_MUD) || ((pml.groundTrace.surfaceFlags & MATERIAL_MASK) == MATERIAL_ROCK)) && + (planes[i][2] == 0 || planes[i][2] == 1)) {//Vertical or horizontal brush collision in tribes mode //For some reason I have to use pml.groundtrace results instead of trace results because trace results dont see the surfaceflags or contents (???). Need to add more material types for terrain detection. Or make use of surfaceparm terrain instead in the future. pm->ps->pm_time = 250; //Com_Printf("^3Deadstop detection! Mitigating! Contents is %i %i %i %i\n", trace.surfaceFlags & MATERIAL_MASK, pml.groundTrace.surfaceFlags & MATERIAL_MASK, trace.contents & CONTENTS_INSIDE, pml.groundTrace.contents & CONTENTS_INSIDE); From 63f56518414e99c33703d506596fd49fabf7d858 Mon Sep 17 00:00:00 2001 From: videoP Date: Sun, 14 Apr 2024 13:08:13 -0400 Subject: [PATCH 4/6] 2 new forcetweaks (cherry picked from commit ab32ca0b101dbb9df1caac7b5123c6922079c90f) --- codemp/game/g_local.h | 4 ++-- codemp/game/w_force.c | 20 ++++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/codemp/game/g_local.h b/codemp/game/g_local.h index 733b5903ef..a40e331739 100644 --- a/codemp/game/g_local.h +++ b/codemp/game/g_local.h @@ -265,8 +265,8 @@ extern int dueltypes[MAX_CLIENTS];//JAPRO - Serverside - Fullforce Duels y is th #define FT_NORAGEFIRERATE (1<<18) #define FT_BUFFMINDTRICK (1<<19) #define FT_BUFFMELEE (1<<20) //not really a forcetweak but no room in weapon tweaks! -#define FT_DRAINDMGNERF (1<<21) -#define FT_FIXGRIPPEDREGEN (1<<22) //not really a forcetweak but no room in weapon tweaks! +#define FT_DRAINDMGNERF (1<<21) //drain takes 3 instead of 4fp from enemy +#define FT_FIXGRIPPEDREGEN (1<<22) //lets you regen during a jump if you are caught and not holding jump (?) //Saber tweaks diff --git a/codemp/game/w_force.c b/codemp/game/w_force.c index fd159d1dd9..0d35c19432 100644 --- a/codemp/game/w_force.c +++ b/codemp/game/w_force.c @@ -2116,6 +2116,7 @@ void ForceDrainDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, vec3_t int modPowerLevel = -1; int dmg = 0; //Q_irand( 1, 3 ); int dmg2 = 0; + int healthoverride = 0; if (self->client->ps.fd.forcePowerLevel[FP_DRAIN] == FORCE_LEVEL_1) { @@ -2123,16 +2124,22 @@ void ForceDrainDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, vec3_t } else if (self->client->ps.fd.forcePowerLevel[FP_DRAIN] == FORCE_LEVEL_2) { - dmg = 3; if (self->client->sess.raceMode) dmg = -4; + else + dmg = 3; } else if (self->client->ps.fd.forcePowerLevel[FP_DRAIN] == FORCE_LEVEL_3) { #if _draintest dmg = g_forceDrainDamage.integer;//4 #else - dmg = 4; + if (g_tweakForce.integer & FT_DRAINDMGNERF) { + healthoverride = 4; + dmg = 3; + } + else + dmg = 4; #endif } @@ -2185,7 +2192,10 @@ void ForceDrainDamage( gentity_t *self, gentity_t *traceEnt, vec3_t dir, vec3_t if (self->client->ps.stats[STAT_HEALTH] < self->client->ps.stats[STAT_MAX_HEALTH] && self->health > 0 && self->client->ps.stats[STAT_HEALTH] > 0) { - self->health += dmg; + if (healthoverride) + self->health += healthoverride; + else + self->health += dmg; if (self->health > self->client->ps.stats[STAT_MAX_HEALTH]) { self->health = self->client->ps.stats[STAT_MAX_HEALTH]; @@ -5969,7 +5979,9 @@ void WP_ForcePowersUpdate( gentity_t *self, usercmd_t *ucmd ) if ( !(self->client->ps.fd.forcePowersActive & (1<client->force.lightningDebounce = level.time; - if ( (!self->client->ps.fd.forcePowersActive || self->client->ps.fd.forcePowersActive == (1 << FP_DRAIN)) && //whats up with fp_drain being mentioned here + //Com_Printf("Forcepowers active %i for %s\n", self->client->ps.fd.forcePowersActive, self->client->pers.netname); + + if ( (!self->client->ps.fd.forcePowersActive || self->client->ps.fd.forcePowersActive == (1 << FP_DRAIN) || (self->client->ps.fd.forceGripBeingGripped && g_tweakForce.integer & FT_FIXGRIPPEDREGEN && self->client->ps.fd.forcePowersActive == (1 << FP_LEVITATION) && self->client->pers.cmd.upmove <= 0)) && //whats up with fp_drain being mentioned here ((self->client->sess.movementStyle != MV_TRIBES) || !(self->client->ps.eFlags & EF_JETPACK_ACTIVE)) && ((self->client->sess.movementStyle != MV_TRIBES) || ((self->client->jetPackDebReduce + 250) < level.time)) && //Extra time here? !self->client->ps.saberInFlight && (self->client->ps.stats[STAT_MOVEMENTSTYLE] != MV_SPEED) && (self->client->ps.weapon != WP_SABER || !BG_SaberInSpecial(self->client->ps.saberMove)) ) From ae0ce5c7884e829e6fef5e95729ad3ffae9c383b Mon Sep 17 00:00:00 2001 From: videoP Date: Sun, 14 Apr 2024 16:49:47 -0400 Subject: [PATCH 5/6] fix atst walk anim breaking on slopes (cherry picked from commit 3196ce7345614b5ec5512c647073dcdd6395ea73) --- codemp/game/bg_pmove.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemp/game/bg_pmove.c b/codemp/game/bg_pmove.c index d1ae23c0ea..9034a3ce2a 100644 --- a/codemp/game/bg_pmove.c +++ b/codemp/game/bg_pmove.c @@ -5754,7 +5754,8 @@ static void PM_GroundTrace( void ) { } // check if getting thrown off the ground - if ( pm->ps->velocity[2] > 0 && DotProduct( pm->ps->velocity, trace.plane.normal ) > 10 ) { + //Don't do this for vehicles + if ( (!pm_entSelf || pm_entSelf->s.NPC_class != CLASS_VEHICLE) && (pm->ps->velocity[2] > 0 && DotProduct( pm->ps->velocity, trace.plane.normal ) > 10 )) { if ( pm->debugLevel ) { Com_Printf("%i:kickoff\n", c_pmove); } From f4e195501e300e4d6448cb64471bab6b97af3bc7 Mon Sep 17 00:00:00 2001 From: taysta Date: Mon, 15 Apr 2024 17:49:59 +0800 Subject: [PATCH 6/6] [jaPRO/cgame] Restore cg_scorePlums default value and introduce cg_strafeTrailPlums and cg_spotIconPlums where new cg_scorePlums usages had occurred in jaPRO --- codemp/cgame/cg_effects.c | 2 +- codemp/cgame/cg_snapshot.c | 2 +- codemp/cgame/cg_xcvar.h | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/codemp/cgame/cg_effects.c b/codemp/cgame/cg_effects.c index 4b7bc4f665..06c3bab045 100644 --- a/codemp/cgame/cg_effects.c +++ b/codemp/cgame/cg_effects.c @@ -1051,7 +1051,7 @@ void CG_SpotIcon( int client, vec3_t org ) { static vec3_t lastPos; // only visualize for the client that scored - if (client != cg.predictedPlayerState.clientNum || cg_scorePlums.integer == 0) { + if (client != cg.predictedPlayerState.clientNum || cg_spotIconPlums.integer == 0) { return; } diff --git a/codemp/cgame/cg_snapshot.c b/codemp/cgame/cg_snapshot.c index 86033757a8..0c181c7706 100644 --- a/codemp/cgame/cg_snapshot.c +++ b/codemp/cgame/cg_snapshot.c @@ -644,7 +644,7 @@ void CG_StrafeTrailLine( vec3_t start, vec3_t end, int time, int clientNum, int cg.drawingStrafeTrails |= (1 << clientNum); - if (cg_scorePlums.integer && (number > 0) && (number % SVFPS == 0)) {//oh this is stupid, assume sv_fps is 30 on servers that create it i guess. + if (cg_strafeTrailPlums.integer && (number > 0) && (number % SVFPS == 0)) {//oh this is stupid, assume sv_fps is 30 on servers that create it i guess. localEntity_t *le; refEntity_t *re; vec3_t angles; diff --git a/codemp/cgame/cg_xcvar.h b/codemp/cgame/cg_xcvar.h index 16579533f4..ee7c2ccd8c 100644 --- a/codemp/cgame/cg_xcvar.h +++ b/codemp/cgame/cg_xcvar.h @@ -218,6 +218,8 @@ XCVAR_DEF( cg_strafeTrailRacersOnly, "0", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_strafeTrailRadius, "2", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_strafeTrailFPS, "40", NULL, 0 ) XCVAR_DEF( cg_strafeTrailGhost, "1", NULL, CVAR_ARCHIVE ) +XCVAR_DEF( cg_strafeTrailPlums, "0", NULL, CVAR_ARCHIVE ) +XCVAR_DEF( cg_spotIconPlums, "0", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_drainFX, "1", NULL, CVAR_NONE ) //Make maxpackets userinfo maybe idk @@ -331,7 +333,7 @@ XCVAR_DEF( cg_shaderSaberGlow, "0.625", NULL, CVAR_NONE )//1.25? XCVAR_DEF( cg_saberTeamColors, "1", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_noRGBSabers, "0", NULL, CVAR_ARCHIVE ) XCVAR_DEF( disco, "0", NULL, CVAR_INTERNAL ) //xD -XCVAR_DEF( cg_scorePlums, "0", NULL, CVAR_ARCHIVE ) +XCVAR_DEF( cg_scorePlums, "1", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_stereoSeparation, "0.4", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_shadows, "1", NULL, CVAR_ARCHIVE ) XCVAR_DEF( cg_simpleItems, "0", NULL, CVAR_ARCHIVE )