diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-06-22 16:12:48 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-06-22 16:12:48 +0200 |
commit | ef1dd29cd38abd1f2c008bdd32ca767620613895 (patch) | |
tree | 40ccd8a421ac8206a4de95600aac138f0467e74a /src | |
parent | 43763238a0187c885482283c8d7e5ae0137423b5 (diff) |
Remove Flamer primary.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/bg_misc.c | 10 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 85 | ||||
-rw-r--r-- | src/game/g_missile.c | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 31 | ||||
-rw-r--r-- | src/game/tremulous.h | 7 |
5 files changed, 9 insertions, 126 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 8a993aa..0780ab8 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -3336,12 +3336,12 @@ static const weaponAttributes_t bg_weapons[ ] = qfalse, //int infiniteAmmo; qfalse, //int usesEnergy; FLAMER_REPEAT, //int repeatRate1; - FLAMER_SECONDARY_REPEAT, //int repeatRate2; - FLAMER_REPEAT, //int repeatRate3; + 0, //int repeatRate2; + 0, //int repeatRate3; 3000, //int reloadTime; FLAMER_K_SCALE, //float knockbackScale; - qtrue, //qboolean hasAltMode; - qtrue, //qboolean hasThirdMode; + qfalse, //qboolean hasAltMode; + qfalse, //qboolean hasThirdMode; qfalse, //qboolean canZoom; 90.0f, //float zoomFov; qtrue, //qboolean purchasable; @@ -4646,7 +4646,7 @@ BG_PlayerCanChangeWeapon qboolean BG_PlayerCanChangeWeapon( playerState_t *ps ) { // Do not allow Lucifer Cannon "canceling" via weapon switch - if( (ps->weapon == WP_LUCIFER_CANNON || ps->weapon == WP_FLAMER) && + if( ps->weapon == WP_LUCIFER_CANNON && ps->stats[ STAT_MISC ] > LCANNON_CHARGE_TIME_MIN ) return qfalse; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 16132c3..3b36d9e 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2872,7 +2872,7 @@ static void PM_BeginWeaponChange( int weapon ) pm->ps->weaponTime = 0; //special case to prevent storing a charged up lcannon - if( (pm->ps->weapon == WP_LUCIFER_CANNON || pm->ps->weapon == WP_FLAMER ) ) + if( pm->ps->weapon == WP_LUCIFER_CANNON ) pm->ps->stats[ STAT_MISC ] = 0; pm->ps->weaponstate = WEAPON_DROPPING; @@ -3108,30 +3108,6 @@ static void PM_Weapon( void ) if( pm->ps->pm_flags & PMF_RESPAWNED ) return; - - - // Charging up a flamer - if( pm->ps->weapon == WP_FLAMER ) - { - if( !pm->ps->weaponTime && pm->ps->weaponstate != WEAPON_NEEDS_RESET && ( pm->cmd.buttons & BUTTON_ATTACK ) ) - { - pm->ps->stats[ STAT_MISC ] += pml.msec; - if( pm->ps->stats[ STAT_MISC ] >= FLAMER_CHARGE_TIME_MAX ) - pm->ps->stats[ STAT_MISC ] = FLAMER_CHARGE_TIME_MAX; - if( pm->ps->stats[ STAT_MISC ] > pm->ps->ammo * FLAMER_CHARGE_TIME_MAX / - FLAMER_CHARGE_AMMO ) - pm->ps->stats[ STAT_MISC ] = pm->ps->ammo * FLAMER_CHARGE_TIME_MAX / - FLAMER_CHARGE_AMMO; - } - // Set overcharging flag so other players can hear the warning beep - if( pm->ps->stats[ STAT_MISC ] > LCANNON_CHARGE_TIME_WARN ) - pm->ps->eFlags |= EF_WARN_CHARGE; - } - - // don't allow attack until all buttons are up - if( pm->ps->pm_flags & PMF_RESPAWNED ) - return; - // pump weapon delays (repeat times etc) if( pm->ps->weaponTime > 0 ) pm->ps->weaponTime -= pml.msec; @@ -3287,59 +3263,6 @@ static void PM_Weapon( void ) return; break; - case WP_FLAMER: - attack3 = qfalse; - - // Prevent firing of the Lucifer Cannon after an overcharge - if( pm->ps->weaponstate == WEAPON_NEEDS_RESET ) - { - if( attack1 ) - return; - pm->ps->weaponstate = WEAPON_READY; - } - - // Can't fire secondary while primary is charging - if( attack1 || pm->ps->stats[ STAT_MISC ] > 0 ) - attack2 = qfalse; - - if( ( attack1 || pm->ps->stats[ STAT_MISC ] == 0 ) && !attack2 ) - { - pm->ps->weaponTime = 0; - - // Charging - if( pm->ps->stats[ STAT_MISC ] < FLAMER_CHARGE_TIME_MAX ) - { - pm->ps->weaponstate = WEAPON_READY; - return; - } - - // Overcharge - pm->ps->weaponstate = WEAPON_NEEDS_RESET; - } - - if( pm->ps->stats[ STAT_MISC ] > FLAMER_CHARGE_TIME_MIN ) - { - // Fire primary attack - attack1 = qtrue; - attack2 = qfalse; - } - else if( pm->ps->stats[ STAT_MISC ] > 0 ) - { - // Not enough charge - pm->ps->stats[ STAT_MISC ] = 0; - pm->ps->weaponTime = 0; - pm->ps->weaponstate = WEAPON_READY; - return; - } - else if( !attack2 ) - { - // Idle - pm->ps->weaponTime = 0; - pm->ps->weaponstate = WEAPON_READY; - return; - } - break; - case WP_LUCIFER_CANNON: attack3 = qfalse; @@ -3625,12 +3548,6 @@ static void PM_Weapon( void ) LCANNON_CHARGE_TIME_MAX - 1 ) / LCANNON_CHARGE_TIME_MAX; } else pm->ps->ammo--; break; - case WP_FLAMER: - if( attack1 && !attack2 ) { - pm->ps->ammo -= ( pm->ps->stats[ STAT_MISC ] * FLAMER_CHARGE_AMMO + - FLAMER_CHARGE_TIME_MAX - 1 ) / FLAMER_CHARGE_TIME_MAX; - } else pm->ps->ammo--; - break; case WP_LAS_GUN: if( attack2 ) { pm->ps->ammo -= 25; diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 4bdd43f..164f49f 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -571,7 +571,7 @@ gentity_t *FlameTurretFireNormal( gentity_t *self, vec3_t start, vec3_t dir ) bolt = G_Spawn( ); bolt->classname = "mgturret2"; bolt->pointAgainstWorld = qfalse; - bolt->nextthink = level.time + FLAMER2_LIFETIME; + bolt->nextthink = level.time + 350; bolt->think = G_ExplodeMissile; bolt->s.eType = ET_MISSILE; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 705678d..586af40 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -585,31 +585,6 @@ void prifleStasisFire( gentity_t *ent ) fire_prifle_stasis( ent, muzzle, forward ); } - -/* -=============== -FLAME THROWER -Napalm Charge -=============== -*/ -void NapalmFire( gentity_t *ent, qboolean secondary ) -{ - int damage; - - damage = ent->client->ps.stats[ STAT_MISC ] * - LCANNON_DAMAGE / LCANNON_CHARGE_TIME_MAX; - - G_CombatStats_Fire( ent, CSW_FLAMER, damage ); - - NapalmChargeFire( ent, muzzle, forward, - damage, LCANNON_RADIUS, LCANNON_SPEED ); - - NapalmChargeImp( ent, muzzle, forward, - damage, LCANNON_RADIUS, LCANNON_SPEED ); - - ent->client->ps.stats[ STAT_MISC ] = 0; -} - /* =============== FLAME THROWER @@ -1747,10 +1722,6 @@ void FireWeapon2( gentity_t *ent ) case WP_CHAINGUN: bulletFire( ent, CHAINGUN_SPREAD2, CHAINGUN_DMG2, MOD_CHAINGUN ); break; - - case WP_FLAMER: - FlamerNormal( ent ); - break; case WP_LAS_GUN: lasGunFire2( ent ); @@ -1832,7 +1803,7 @@ void FireWeapon( gentity_t *ent ) bulletFire( ent, CHAINGUN_SPREAD, CHAINGUN_DMG, MOD_CHAINGUN ); break; case WP_FLAMER: - NapalmFire( ent, qfalse ); + FlamerNormal( ent ); break; case WP_PULSE_RIFLE: pulseRifleFire( ent ); diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 6d48530..99ec143 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -427,7 +427,7 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_PRICE 550 #define FLAMER_GAS 200 -#define FLAMER_REPEAT 150 +#define FLAMER_REPEAT 200 #define FLAMER_K_SCALE 2.0f #define FLAMER_DMG HDM(20) // DPS: 133.33 #define FLAMER_SPLASHDAMAGE HDM(12) @@ -437,11 +437,6 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_LIFETIME2 600.0f #define FLAMER_SPEED 550.0f #define FLAMER_LAG 0.65f // the amount of player velocity that is added to the fireball -#define FLAMER2_LIFETIME 350.0f -#define FLAMER_CHARGE_TIME_MIN 200 -#define FLAMER_CHARGE_TIME_MAX 3000 -#define FLAMER_CHARGE_AMMO 50 // ammo cost of a full charge shot -#define FLAMER_SECONDARY_REPEAT 200 #define PRIFLE_PRICE 450 #define PRIFLE_CLIPS 40 |