diff options
author | Tim Angus <tim@ngus.net> | 2001-06-23 20:44:54 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-06-23 20:44:54 +0000 |
commit | be48c257834436e7adc2b20540da105a13b68688 (patch) | |
tree | c086cbb12c0d768b788819a876ddbf2dc247f606 /src/game | |
parent | 1b4dc4940ed0c844a3bb30cff551c9465be859c6 (diff) |
Various tweaks and additions. Additive lights hacked in (pre-source 1.29 release)
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 420 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 11 | ||||
-rw-r--r-- | src/game/bg_public.h | 26 | ||||
-rw-r--r-- | src/game/g_active.c | 6 | ||||
-rw-r--r-- | src/game/g_client.c | 18 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 36 |
7 files changed, 474 insertions, 45 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 61ac0e23..0ecf96db 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1438,7 +1438,99 @@ classAttributes_t bg_classList[ ] = 350, 0.5f, 1.0f, - { PCL_D_D_BASE, PCL_D_O_BASE, PCL_NONE }, + { PCL_D_B_LEV1, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV1, + "BuilderLevel1", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 75, + 75, + SCA_CANJUMP|SCA_FOVWARPS, + 110, + 0.005f, + 200, + 1.0f, + 1.0f, + { PCL_D_B_LEV21, PCL_D_B_LEV22, PCL_D_B_LEV23 }, + 2000, + 100 + }, + { + PCL_D_B_LEV21, + "BuilderLevel2-1", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 100, + 200, + SCA_TAKESFALLDAMAGE|SCA_FOVWARPS, + 90, + 0.015f, + 350, + 1.2f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV22, + "BuilderLevel2-2", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 120, + 100, + SCA_CANJUMP|SCA_FOVWARPS, + 120, + 0.002f, + 350, + 1.5f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 2000, + 100 + }, + { + PCL_D_B_LEV23, + "BuilderLevel2-3", + "lucy", + "default", + { -15, -15, -20 }, + { 15, 15, 20 }, + { 15, 15, 20 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 12, 12, + 100, + 100, + SCA_CANJUMP|SCA_FOVWARPS, + 100, + 0.015f, + 350, + 1.7f, + 1.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 2000, 100 }, @@ -1461,7 +1553,168 @@ classAttributes_t bg_classList[ ] = 25, 2.0f, 5.0f, - { PCL_D_D_BASE, PCL_D_B_BASE, PCL_NONE }, + { PCL_D_O_LEV11, PCL_D_O_LEV12, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV11, + "OffensiveLevel1-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.6f, + 5.0f, + { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV12, + "OffensiveLevel1-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.6f, + 5.0f, + { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV21, + "OffensiveLevel2-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 100, + 100, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 60, + 1.3f, + 5.0f, + { PCL_D_O_LEV31, PCL_D_O_LEV32, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV22, + "OffensiveLevel2-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 100, + 100, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 60, + 1.3f, + 5.0f, + { PCL_D_O_LEV32, PCL_D_O_LEV33, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV31, + "OffensiveLevel3-1", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV32, + "OffensiveLevel3-2", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 3000, + 100 + }, + { + PCL_D_O_LEV33, + "OffensiveLevel3-3", + "klesk", + "default", + { -15, -15, -15 }, + { 15, 15, 15 }, + { 15, 15, 15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 200, + 200, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 120, + 0.0f, + 200, + 1.0f, + 5.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 3000, 100 }, @@ -1484,7 +1737,168 @@ classAttributes_t bg_classList[ ] = 25, 1.5f, 3.0f, - { PCL_D_O_BASE, PCL_D_B_BASE, PCL_NONE }, + { PCL_D_D_LEV11, PCL_D_D_LEV12, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV11, + "DefensiveLevel1-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 100, + 0.0f, + 25, + 1.4f, + 3.0f, + { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV12, + "DefensiveLevel1-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 50, + 50, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 100, + 0.0f, + 25, + 1.4f, + 3.0f, + { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV21, + "DefensiveLevel2-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 150, + 150, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 110, + 0.0f, + 25, + 1.3f, + 3.0f, + { PCL_D_D_LEV31, PCL_D_D_LEV32, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV22, + "DefensiveLevel2-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 150, + 150, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 110, + 0.0f, + 25, + 1.3f, + 3.0f, + { PCL_D_D_LEV32, PCL_D_D_LEV33, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV31, + "DefensiveLevel3-1", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV32, + "DefensiveLevel3-2", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, + 1000, + 100 + }, + { + PCL_D_D_LEV33, + "DefensiveLevel3-3", + "orbb", + "default", + { -15, -15, -15 }, + { 15, 15 ,15 }, + { 15, 15 ,15 }, + { -15, -15, -4 }, + { 15, 15, 4 }, + 4, 4, + 250, + 250, + SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, + 130, + 0.0f, + 25, + 1.2f, + 3.0f, + { PCL_NONE, PCL_NONE, PCL_NONE }, 1000, 100 }, diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 440d4030..91bade11 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2111,9 +2111,8 @@ Generates weapon events and modifes the weapon counter ============== */ static void PM_Weapon( void ) { - int addTime; - int ammo, clips, maxclips; - static int chainGunAddTime; + int addTime; + int ammo, clips, maxclips; // don't allow attack until all buttons are up if ( pm->ps->pm_flags & PMF_RESPAWNED ) { @@ -2229,7 +2228,6 @@ static void PM_Weapon( void ) { if ( ! (pm->cmd.buttons & BUTTON_ATTACK) ) { pm->ps->weaponTime = 0; pm->ps->weaponstate = WEAPON_READY; - chainGunAddTime = 120; return; } @@ -2317,8 +2315,7 @@ static void PM_Weapon( void ) { addTime = 100; break; case WP_CHAINGUN: - if( chainGunAddTime > 30 ) chainGunAddTime -= 2; - addTime = chainGunAddTime; + addTime = 50; break; case WP_GRENADE_LAUNCHER: addTime = 800; @@ -2327,7 +2324,7 @@ static void PM_Weapon( void ) { addTime = 800; break; case WP_FLAMER: - addTime = 150; + addTime = 75; break; case WP_RAILGUN: addTime = 1500; diff --git a/src/game/bg_public.h b/src/game/bg_public.h index f0d7398c..1e9ab8b5 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -654,9 +654,35 @@ typedef enum { //TA: player classes typedef enum { PCL_NONE, + + //builder classes PCL_D_B_BASE, + PCL_D_B_LEV1, + PCL_D_B_LEV21, + PCL_D_B_LEV22, + PCL_D_B_LEV23, + + //offensive classes PCL_D_O_BASE, + PCL_D_O_LEV11, + PCL_D_O_LEV12, + PCL_D_O_LEV21, + PCL_D_O_LEV22, + PCL_D_O_LEV31, + PCL_D_O_LEV32, + PCL_D_O_LEV33, + + //defensive classes PCL_D_D_BASE, + PCL_D_D_LEV11, + PCL_D_D_LEV12, + PCL_D_D_LEV21, + PCL_D_D_LEV22, + PCL_D_D_LEV31, + PCL_D_D_LEV32, + PCL_D_D_LEV33, + + //human class PCL_H_BASE, PCL_NUM_CLASSES diff --git a/src/game/g_active.c b/src/game/g_active.c index e0a3654a..cc504339 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -827,18 +827,18 @@ void ClientThink_real( gentity_t *ent ) { if( ( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST ) && ucmd->upmove >= 0 ) { //subtract stamina - client->ps.stats[ STAT_STAMINA ] -= dTime/6.0f; + client->ps.stats[ STAT_STAMINA ] -= dTime/9.0f; } if( ( aForward <= 64 && aForward > 5 ) || ( aRight <= 64 && aRight > 5 ) ) { //restore stamina - client->ps.stats[ STAT_STAMINA ] += dTime/4.0f; + client->ps.stats[ STAT_STAMINA ] += dTime/6.0f; } else if( aForward <= 5 && aRight <= 5 ) { //restore stamina faster - client->ps.stats[ STAT_STAMINA ] += dTime/6.0f; + client->ps.stats[ STAT_STAMINA ] += dTime/9.0f; } // set up for pmove diff --git a/src/game/g_client.c b/src/game/g_client.c index 47d145d0..42e1f9b4 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1374,16 +1374,34 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) { switch( ent->client->pers.pclass ) { case PCL_D_B_BASE: + case PCL_D_B_LEV1: + case PCL_D_B_LEV21: + case PCL_D_B_LEV22: + case PCL_D_B_LEV23: BG_packWeapon( WP_ABUILD, client->ps.stats ); BG_packAmmoArray( WP_ABUILD, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_D_O_BASE: + case PCL_D_O_LEV11: + case PCL_D_O_LEV12: + case PCL_D_O_LEV21: + case PCL_D_O_LEV22: + case PCL_D_O_LEV31: + case PCL_D_O_LEV32: + case PCL_D_O_LEV33: BG_packWeapon( WP_VENOM, client->ps.stats ); BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; case PCL_D_D_BASE: + case PCL_D_D_LEV11: + case PCL_D_D_LEV12: + case PCL_D_D_LEV21: + case PCL_D_D_LEV22: + case PCL_D_D_LEV31: + case PCL_D_D_LEV32: + case PCL_D_D_LEV33: BG_packWeapon( WP_VENOM, client->ps.stats ); BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 ); break; diff --git a/src/game/g_local.h b/src/game/g_local.h index a84c7c49..a8170dff 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -602,7 +602,7 @@ void ShineTorch( gentity_t *self ); // g_weapon.c // qboolean LogAccuracyHit( gentity_t *target, gentity_t *attacker ); -void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ); +void CalcMuzzlePoint( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ); void SnapVectorTowards( vec3_t v, vec3_t to ); qboolean CheckGauntletAttack( gentity_t *ent ); void Weapon_HookFree (gentity_t *ent); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index fb2a85ee..ad637897 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -33,9 +33,6 @@ static float s_quadFactor; static vec3_t forward, right, up; static vec3_t muzzle; -//TA: for horizontal changes in muzzle point -static int hmuzzle = 10; - #define NUM_NAILSHOTS 10 /* @@ -82,7 +79,7 @@ qboolean CheckGauntletAttack( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePoint ( ent, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); VectorMA (muzzle, 32, forward, end); @@ -621,7 +618,7 @@ void Weapon_Venom_Fire( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePoint ( ent, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); VectorMA (muzzle, 32, forward, end); @@ -693,33 +690,10 @@ CalcMuzzlePoint set muzzle location relative to pivoting eye =============== */ -void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { - VectorCopy( ent->s.pos.trBase, muzzlePoint ); - muzzlePoint[2] += ent->client->ps.viewheight; - VectorMA( muzzlePoint, 8, forward, muzzlePoint ); - - //TA: move the muzzle a bit with BFG - if( ent->s.weapon == WP_BFG ) - { - VectorMA( muzzlePoint, hmuzzle, right, muzzlePoint ); - hmuzzle = -hmuzzle; - } - - // snap to integer coordinates for more efficient network bandwidth usage - SnapVector( muzzlePoint ); -} - -/* -=============== -CalcMuzzlePointOrigin - -set muzzle location relative to pivoting eye -=============== -*/ -void CalcMuzzlePointOrigin ( gentity_t *ent, vec3_t origin, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { +void CalcMuzzlePoint( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint ) { VectorCopy( ent->s.pos.trBase, muzzlePoint ); muzzlePoint[2] += ent->client->ps.viewheight; - VectorMA( muzzlePoint, 14, forward, muzzlePoint ); + VectorMA( muzzlePoint, 1, forward, muzzlePoint ); // snap to integer coordinates for more efficient network bandwidth usage SnapVector( muzzlePoint ); } @@ -745,7 +719,7 @@ void FireWeapon( gentity_t *ent ) { // set aiming directions AngleVectors (ent->client->ps.viewangles, forward, right, up); - CalcMuzzlePointOrigin ( ent, ent->client->oldOrigin, forward, right, up, muzzle ); + CalcMuzzlePoint( ent, forward, right, up, muzzle ); // fire the specific weapon switch( ent->s.weapon ) { |