From b9c6fc91afc0b41a4935bfdb3652a45c0ca61171 Mon Sep 17 00:00:00 2001 From: perle Date: Thu, 2 Mar 2023 21:44:38 +0100 Subject: [PATCH] new roadmap --- engine/code/cgame/cg_weapons.c | 35 +++++----------------- engine/code/game/bg_public.h | 6 +--- engine/code/game/g_client.c | 45 +++++++++-------------------- engine/code/game/g_weapon.c | 16 +++++----- engine/code/qcommon/q_shared.h | 2 +- q3rallycode.ppr | Bin 32955 -> 33601 bytes roadmap_0.4.txt => roadmap_0.5.txt | 6 ++-- 7 files changed, 34 insertions(+), 76 deletions(-) rename roadmap_0.4.txt => roadmap_0.5.txt (91%) diff --git a/engine/code/cgame/cg_weapons.c b/engine/code/cgame/cg_weapons.c index 1c22b022..8f7bc689 100644 --- a/engine/code/cgame/cg_weapons.c +++ b/engine/code/cgame/cg_weapons.c @@ -676,6 +676,7 @@ void CG_RegisterWeapon( int weaponNum ) { } switch ( weaponNum ) { + case WP_GAUNTLET: MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/melee/fstrun.wav", qfalse ); @@ -696,20 +697,6 @@ void CG_RegisterWeapon( int weaponNum ) { break; -// Q3Rally Code Start - removed and added flamethrower -/* - case WP_GRAPPLING_HOOK: - MAKERGB( weaponInfo->flashDlightColor, 0.6f, 0.6f, 1.0f ); - weaponInfo->missileModel = trap_R_RegisterModel( "models/ammo/rocket/rocket.md3" ); - weaponInfo->missileTrailFunc = CG_GrappleTrail; - weaponInfo->missileDlight = 200; - MAKERGB( weaponInfo->missileDlightColor, 1, 0.75f, 0 ); - weaponInfo->readySound = trap_S_RegisterSound( "sound/weapons/melee/fsthum.wav", qfalse ); - weaponInfo->firingSound = trap_S_RegisterSound( "sound/weapons/melee/fstrun.wav", qfalse ); - cgs.media.lightningShader = trap_R_RegisterShader( "lightningBoltNew"); - break; -*/ - case WP_FLAME_THROWER: weaponInfo->readySound = trap_S_RegisterSound( "sound/weapons/flamer/fl_hum.wav", qfalse ); weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/flamer/fl_fly.wav", qfalse ); @@ -718,8 +705,6 @@ void CG_RegisterWeapon( int weaponNum ) { weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/flamer/fl_fire.wav", qfalse ); cgs.media.flameExplosionShader = trap_R_RegisterShader( "rocketExplosion" ); break; - -// Q3Rally Code END #ifdef MISSIONPACK case WP_CHAINGUN: @@ -829,7 +814,6 @@ void CG_RegisterWeapon( int weaponNum ) { weaponInfo->missileSound = trap_S_RegisterSound( "sound/weapons/rocket/rockfly.wav", qfalse ); break; -// Q3Rally Code Start case RWP_MINE: weaponInfo->missileModel = trap_R_RegisterModel( "models/rearfire/mine.md3" ); //weaponInfo->missileTrailFunc = CG_GrenadeTrail; @@ -847,7 +831,6 @@ void CG_RegisterWeapon( int weaponNum ) { MAKERGB( weaponInfo->flashDlightColor, 1, 1, 1 ); weaponInfo->flashSound[0] = 0; break; -// END default: MAKERGB( weaponInfo->flashDlightColor, 1, 1, 1 ); @@ -1369,10 +1352,8 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent } // add the flash -// Q3Rally Code Start -// if ( ( weaponNum == WP_LIGHTNING || weaponNum == WP_GAUNTLET || weaponNum == WP_GRAPPLING_HOOK ) if ( ( weaponNum == WP_LIGHTNING || weaponNum == WP_GAUNTLET ) -// END + && ( nonPredictedCent->currentState.eFlags & EF_FIRING ) ) { // continuous flash @@ -1682,9 +1663,9 @@ void CG_NextWeapon_f( void ) { if ( cg.weaponSelect == MAX_WEAPONS ) { cg.weaponSelect = 0; } - if ( cg.weaponSelect == WP_GAUNTLET ) { - continue; // never cycle to gauntlet - } +// if ( cg.weaponSelect == WP_GAUNTLET ) { +// continue; // never cycle to gauntlet +// } if ( CG_WeaponSelectable( cg.weaponSelect ) ) { break; } @@ -1718,9 +1699,9 @@ void CG_PrevWeapon_f( void ) { if ( cg.weaponSelect == -1 ) { cg.weaponSelect = MAX_WEAPONS - 1; } - if ( cg.weaponSelect == WP_GAUNTLET ) { - continue; // never cycle to gauntlet - } +// if ( cg.weaponSelect == WP_GAUNTLET ) { +// continue; // never cycle to gauntlet +// } if ( CG_WeaponSelectable( cg.weaponSelect ) ) { break; } diff --git a/engine/code/game/bg_public.h b/engine/code/game/bg_public.h index 441d3a85..e52f541b 100644 --- a/engine/code/game/bg_public.h +++ b/engine/code/game/bg_public.h @@ -453,23 +453,19 @@ typedef enum { WP_RAILGUN, WP_PLASMAGUN, WP_BFG, -// Q3Rally Code End WP_FLAME_THROWER, -// WP_GRAPPLING_HOOK, -// Q3Rally Code End + #ifdef MISSIONPACK WP_NAILGUN, WP_PROX_LAUNCHER, WP_CHAINGUN, #endif -// STONELANCE RWP_SMOKE, RWP_OIL, RWP_MINE, RWP_FLAME, RWP_BIO, -// END WP_NUM_WEAPONS } weapon_t; diff --git a/engine/code/game/g_client.c b/engine/code/game/g_client.c index 98384940..0191f677 100644 --- a/engine/code/game/g_client.c +++ b/engine/code/game/g_client.c @@ -879,8 +879,12 @@ void ClientUserinfoChanged( int clientNum ) { gclient_t *client; char c1[MAX_INFO_STRING]; char c2[MAX_INFO_STRING]; + char c3[MAX_INFO_STRING]; + char c4[MAX_INFO_STRING]; char redTeam[MAX_INFO_STRING]; char blueTeam[MAX_INFO_STRING]; + char greenTeam[MAX_INFO_STRING]; + char yellowTeam[MAX_INFO_STRING]; char userinfo[MAX_INFO_STRING]; ent = g_entities + clientNum; @@ -1027,17 +1031,6 @@ void ClientUserinfoChanged( int clientNum ) { if ( *s ) { client->pers.manualShift = atoi( s ); } -// END - - /* - s = Info_ValueForKey( userinfo, "cg_pmove_fixed" ); - if ( !*s || atoi( s ) == 0 ) { - client->pers.pmoveFixed = qfalse; - } - else { - client->pers.pmoveFixed = qtrue; - } - */ // team task (0 = none, 1 = offence, 2 = defence) teamTask = atoi(Info_ValueForKey(userinfo, "teamtask")); @@ -1047,9 +1040,13 @@ void ClientUserinfoChanged( int clientNum ) { // colors Q_strncpyz(c1, Info_ValueForKey( userinfo, "color1" ), sizeof( c1 )); Q_strncpyz(c2, Info_ValueForKey( userinfo, "color2" ), sizeof( c2 )); + Q_strncpyz(c3, Info_ValueForKey( userinfo, "color3" ), sizeof( c3 )); + Q_strncpyz(c4, Info_ValueForKey( userinfo, "color4" ), sizeof( c4 )); Q_strncpyz(redTeam, Info_ValueForKey( userinfo, "g_redteam" ), sizeof( redTeam )); Q_strncpyz(blueTeam, Info_ValueForKey( userinfo, "g_blueteam" ), sizeof( blueTeam )); + Q_strncpyz(greenTeam, Info_ValueForKey( userinfo, "g_greenteam" ), sizeof( greenTeam )); + Q_strncpyz(yellowTeam, Info_ValueForKey( userinfo, "g_yellowteam" ), sizeof( yellowTeam )); // STONELANCE - UPDATE: need to add names for green and yellow teams? // send over a subset of the userinfo keys so other clients can @@ -1508,15 +1505,16 @@ void ClientSpawn(gentity_t *ent) { VectorCopy (playerMins, ent->r.mins); VectorCopy (playerMaxs, ent->r.maxs); -// STONELANCE client->ps.pm_flags |= SVF_CAPSULE; -// END + client->ps.clientNum = index; -// STONELANCE (dont give machinegun on spawn in races) - if (!isRallyRace()/* TEMP DERBY && g_gametype.integer != GT_DERBY */){ - client->ps.stats[STAT_WEAPONS] = ( 1 << WP_MACHINEGUN ); +// dont give machinegun on spawn in races +// if (!isRallyRace()/* TEMP DERBY && g_gametype.integer != GT_DERBY */){ + if ( g_gametype.integer == GT_RACING || g_gametype.integer == GT_TEAM_RACING ) { + client->ps.stats[STAT_WEAPONS] = ( 1 << WP_GAUNTLET ); + if ( g_gametype.integer == GT_TEAM ) { client->ps.ammo[WP_MACHINEGUN] = 50; } else { @@ -1531,22 +1529,7 @@ void ClientSpawn(gentity_t *ent) { client->ps.stats[STAT_WEAPONS] &= ~( 1 << WP_GAUNTLET ); } -/* - client->ps.stats[STAT_WEAPONS] = ( 1 << WP_MACHINEGUN ); - if ( g_gametype.integer == GT_TEAM ) { - client->ps.ammo[WP_MACHINEGUN] = 50; - } else { - client->ps.ammo[WP_MACHINEGUN] = 100; - } - - client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GAUNTLET ); -*/ -// END - client->ps.ammo[WP_GAUNTLET] = -1; -// STONELANCE -// client->ps.ammo[WP_GRAPPLING_HOOK] = -1; -// END // health will count down towards max_health ent->health = client->ps.stats[STAT_HEALTH] = client->ps.stats[STAT_MAX_HEALTH] + 25; diff --git a/engine/code/game/g_weapon.c b/engine/code/game/g_weapon.c index 1aace816..1e3566d0 100644 --- a/engine/code/game/g_weapon.c +++ b/engine/code/game/g_weapon.c @@ -122,12 +122,9 @@ qboolean CheckGauntletAttack( gentity_t *ent ) { s_quadFactor *= 2; } #endif - + damage = 50 * s_quadFactor; - G_Damage( traceEnt, ent, ent, forward, tr.endpos, - - damage, DAMAGE_WEAPON, MOD_GAUNTLET ); - + G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, DAMAGE_WEAPON, MOD_GAUNTLET ); return qtrue; } @@ -470,7 +467,7 @@ void weapon_cluster_grenadelauncher_fire (gentity_t *ent) { m->splashDamage *= s_quadFactor; VectorScale(forward, 2000, m->s.pos.trDelta) ; -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics } /* @@ -488,7 +485,7 @@ void Weapon_RocketLauncher_Fire (gentity_t *ent) { m->damage *= s_quadFactor; m->splashDamage *= s_quadFactor; -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics } /* @@ -506,7 +503,7 @@ void Weapon_Homing_RocketLauncher_Fire (gentity_t *ent) { m->damage *= s_quadFactor; m->splashDamage *= s_quadFactor; -// VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics + VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta ); // "real" physics } @@ -912,6 +909,9 @@ void Weapon_LightningFire( gentity_t *ent ) { tent->s.otherEntityNum = traceEnt->s.number; tent->s.eventParm = DirToByte( tr.plane.normal ); tent->s.weapon = ent->s.weapon; + if( LogAccuracyHit( traceEnt, ent ) ) { + ent->client->accuracy_hits++; + } } else if ( !( tr.surfaceFlags & SURF_NOIMPACT ) ) { tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS ); tent->s.eventParm = DirToByte( tr.plane.normal ); diff --git a/engine/code/qcommon/q_shared.h b/engine/code/qcommon/q_shared.h index 8f706595..c0c2bd7f 100644 --- a/engine/code/qcommon/q_shared.h +++ b/engine/code/qcommon/q_shared.h @@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define BASETA "missionpack" #ifndef PRODUCT_VERSION -#define PRODUCT_VERSION "v0.4_r519" +#define PRODUCT_VERSION "v0.4_r520" #endif diff --git a/q3rallycode.ppr b/q3rallycode.ppr index 9bb15e04d77c42ee07468cb4ce9b972331134fc0..5be55f371ca26e1065266c89a76da22920476440 100644 GIT binary patch delta 525 zcmdnp$aJucX+uICqvhmK1|aTaK4CVljM5aah@tJ|MtNcG^3=qF z{5-J8$!}z2nGH?A3Mcc*aWNa3g4wLa1&QT(lVj?vCaL>(``0WX(xVo_>|t)Y&giGk(h#s;y;KkIsg42?`pk)({w4S`Z3ljUT& zrDJ)yLh=iIGV@YxjSUPDii{0G+C?Tmt``+CH8V#@7@C;^l|@gUC@4Bvv0)a_b|6ay z;!$M7jF9vgn;65i0E0jg90W*e4GrL~GdBXd9PDsSSjZqN1bPJS5(^zepeG^b%E%(C zvM@G*tI{#FFfjr9