diff options
author | Mikko Tiusanen <ams@daug.net> | 2014-05-19 19:51:11 +0300 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2014-05-19 19:51:11 +0300 |
commit | 67a2767ff0f97fe39d603492d46e1c77b4621b78 (patch) | |
tree | 98859169aaa81633e28c94086300a568f4740998 | |
parent | 9fd2377cd037c272941aacd81c143a4128607b96 (diff) |
Re-worked hummel to a playable class with low hp and relatively high damage.
-rw-r--r-- | src/cgame/cg_event.c | 6 | ||||
-rw-r--r-- | src/game/bg_misc.c | 2 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 43 | ||||
-rw-r--r-- | src/game/bg_public.h | 1 | ||||
-rw-r--r-- | src/game/g_active.c | 29 | ||||
-rw-r--r-- | src/game/g_combat.c | 3 | ||||
-rw-r--r-- | src/game/g_weapon.c | 6 | ||||
-rw-r--r-- | src/game/tremulous.h | 32 |
8 files changed, 60 insertions, 62 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index ddce6a6..2baf545 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -387,7 +387,7 @@ static void CG_Obituary( entityState_t *ent ) BG_ClassConfig( PCL_ALIEN_LEVEL5 )->humanName ); message2 = className; break; - case MOD_LEVEL5_BOUNCEBALL: + case MOD_LEVEL5_BOUNCEBALL: message = "^5was sniped by^7"; Com_sprintf( className, 64, "^5's %s", BG_ClassConfig( PCL_ALIEN_LEVEL5 )->humanName ); @@ -406,7 +406,7 @@ static void CG_Obituary( entityState_t *ent ) message2 = className; break; - case MOD_LEVEL5_POUNCE: + case MOD_LEVEL5_POUNCE: message = "^5was air pounced upon by^7"; Com_sprintf( className, 64, "^5's %s", BG_ClassConfig( PCL_ALIEN_LEVEL5 )->humanName ); @@ -805,7 +805,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) break; - case EV_AIRPOUNCE: + case EV_AIRPOUNCE: trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.airpounce); //airpounce gfx effect { diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index c968d76..c826199 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2442,7 +2442,7 @@ static const classAttributes_t bg_classList[ ] = LEVEL5_UPG_HEALTH, //int health; 0.0f, //float fallDamage; LEVEL5_UPG_REGEN, //float regenRate; - SCA_FOVWARPS|SCA_ALIENSENSE|SCA_WALLCLIMBER, //int abilities; + SCA_FOVWARPS|SCA_ALIENSENSE|SCA_FLYING, //int abilities; WP_ALEVEL5, //weapon_t startWeapon 0.0f, //float buildDist; 90, //int fov; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 603f569..9fad4f4 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -50,6 +50,7 @@ float pm_flyaccelerate = 4.0f; float pm_friction = 6.0f; float pm_waterfriction = 1.0f; float pm_flightfriction = 6.0f; +float pm_hummelfriction = 2.5f; float pm_spectatorfriction = 5.0f; int c_pmove = 0; @@ -311,6 +312,7 @@ static void PM_Friction( void ) drop += speed * pm_spectatorfriction * pml.frametime; //smooth airpounce + /* TODO: This causes speed up when using primary attack if using torso if( pm->ps->pm_type == PM_HUMMEL && pm->ps->torsoTimer > 0 ) { pm->ps->torsoTimer -= pml.msec; @@ -319,10 +321,9 @@ static void PM_Friction( void ) pm->ps->torsoTimer = 0; } } - if( pm->ps->pm_type == PM_HUMMEL && pm->ps->torsoTimer <= 0 ) - drop += speed * pm_flightfriction * pml.frametime; - - + */ + if( pm->ps->pm_type == PM_HUMMEL /*&& pm->ps->torsoTimer <= 0*/ ) + drop += speed * pm_hummelfriction * pml.frametime; // scale the velocity newspeed = speed - drop; @@ -579,12 +580,14 @@ PM_CheckCharge */ static void PM_CheckCharge( void ) { + /* // Reset hummel pounce payload when walking if (pm->ps->weapon == WP_ALEVEL5) { pm->ps->stats[ STAT_STATE ] &= ~SS_CHARGING; pm->pmext->pouncePayload = 0; } + */ if( pm->ps->weapon != WP_ALEVEL4 ) return; @@ -714,7 +717,7 @@ static qboolean PM_CheckAirPounce( void ) return qfalse; // We were pouncing, but we've landed - if( /* pm->ps->groundEntityNum != ENTITYNUM_NONE && */ + if( pm->ps->groundEntityNum != ENTITYNUM_NONE && ( pm->ps->pm_flags & PMF_CHARGE ) ) { pm->ps->pm_flags &= ~PMF_CHARGE; @@ -1354,17 +1357,14 @@ static void PM_HUMMELFLY( void ) wishspeed *= scale ; PM_Accelerate( wishdir, wishspeed, BG_Class( pm->ps->stats[ STAT_CLASS ] )->airAcceleration ); - PM_StepSlideMove( qfalse, qtrue ); - + PM_StepSlideMove( qfalse, qfalse ); - if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) + if( pm->ps->weapon == WP_ALEVEL5 /*&& pm->cmd.buttons & BUTTON_WALKING*/ ) { + PM_ContinueLegsAnim( NSPA_SWIM ); + } else if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) PM_ContinueLegsAnim( LEGS_LAND ); else PM_ContinueLegsAnim( NSPA_LAND ); - //Fly - if( pm->ps->weapon == WP_ALEVEL5 && pm->cmd.buttons & BUTTON_WALKING ) - PM_ContinueLegsAnim( NSPA_SWIM ); - } /* @@ -2386,7 +2386,7 @@ static void PM_GroundClimbTrace( void ) } pml.groundPlane = qtrue; - pml.walking = qtrue; + pml.walking = BG_ClassHasAbility( pm->ps->stats[ STAT_CLASS ], SCA_FLYING ) ? qfalse : qtrue; // hitting solid ground will end a waterjump if( pm->ps->pm_flags & PMF_TIME_WATERJUMP ) @@ -2561,7 +2561,7 @@ static void PM_GroundTrace( void ) } pml.groundPlane = qtrue; - pml.walking = qtrue; + pml.walking = BG_ClassHasAbility( pm->ps->stats[ STAT_CLASS ], SCA_FLYING ) ? qfalse : qtrue; // hitting solid ground will end a waterjump if( pm->ps->pm_flags & PMF_TIME_WATERJUMP ) @@ -3064,7 +3064,6 @@ static void PM_Weapon( void ) qboolean attack1 = pm->cmd.buttons & BUTTON_ATTACK; qboolean attack2 = pm->cmd.buttons & BUTTON_ATTACK2; qboolean attack3 = pm->cmd.buttons & BUTTON_USE_HOLDABLE; - qboolean walk = pm->cmd.buttons & BUTTON_WALKING; // Ignore weapons in some cases if( pm->ps->persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) @@ -3098,7 +3097,7 @@ static void PM_Weapon( void ) break; } - if( attack2 && (pm->ps->weapon != WP_ALEVEL5 || walk) ) + if( attack2 ) pm->ps->stats[ STAT_MISC ] += pml.msec; else pm->ps->stats[ STAT_MISC ] -= pml.msec; @@ -3231,8 +3230,8 @@ static void PM_Weapon( void ) if( pm->ps->pm_flags & PMF_RESPAWNED ) return; - // no bite during pounce - if( ( pm->ps->weapon == WP_ALEVEL3 || pm->ps->weapon == WP_ALEVEL3_UPG || pm->ps->weapon == WP_ALEVEL5) + // no bite during pounce (except for level5) + if( ( pm->ps->weapon == WP_ALEVEL3 || pm->ps->weapon == WP_ALEVEL3_UPG ) && ( pm->cmd.buttons & BUTTON_ATTACK ) && ( pm->ps->pm_flags & PMF_CHARGE ) ) return; @@ -3721,14 +3720,14 @@ static void PM_Weapon( void ) if( !BG_Weapon( pm->ps->weapon )->infiniteAmmo || ( pm->ps->weapon == WP_ALEVEL3_UPG && attack3 ) || ( pm->ps->weapon == WP_ALEVEL2_UPG && attack3 ) || - ( pm->ps->weapon == WP_ALEVEL4 && attack3 )|| - ( pm->ps->weapon == WP_ALEVEL5 && attack3 )) + ( pm->ps->weapon == WP_ALEVEL4 && attack3 )|| + ( pm->ps->weapon == WP_ALEVEL5 && attack3 )) { // Special case for md third mode, need a bat for function (6+1) if( (pm->ps->weapon == WP_MASS_DRIVER) && attack3 ) pm->ps->ammo -= 7; - //prevent removing ammo from player if plasma isnt working yet but still eats all ammo if player has ammo >6 and no s3 - if( (pm->ps->weapon == WP_MASS_DRIVER) && attack3 && pm->ps->ammo < 7 ) + //prevent removing ammo from player if plasma isnt working yet but still eats all ammo if player has ammo >6 and no s3 + if( (pm->ps->weapon == WP_MASS_DRIVER) && attack3 && pm->ps->ammo < 7 ) pm->ps->ammo += 1; // Special case for lcannon if( (pm->ps->weapon == WP_LUCIFER_CANNON) && attack1 && !attack2 ) diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 271db7e..7ce0d12 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -239,6 +239,7 @@ typedef enum #define SCA_ALIENSENSE 0x00000010 #define SCA_CANUSELADDERS 0x00000020 #define SCA_WALLJUMPER 0x00000040 +#define SCA_FLYING 0x00000080 #define SS_WALLCLIMBING 0x00000001 #define SS_CREEPSLOWED 0x00000002 diff --git a/src/game/g_active.c b/src/game/g_active.c index 04ae3ec..b8d1bac 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -691,10 +691,10 @@ void ClientTimerActions( gentity_t *ent, int msec ) client->ps.eFlags &= ~EF_MOVER_STOP; else if( stopped && !jumping && !( ucmd->buttons & BUTTON_ATTACK ) && ent->health >= 80 ){ - client->ps.eFlags |= EF_MOVER_STOP; + client->ps.eFlags |= EF_MOVER_STOP; client->ps.stats[ STAT_STATE ] |= SS_INVI; - } - else + } + else client->ps.stats[ STAT_STATE ] &= ~SS_INVI; } @@ -950,7 +950,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) } } -// Regenerate Adv. Dragoon barbs + // Regenerate Adv. Dragoon barbs if( client->ps.weapon == WP_ALEVEL3_UPG ) { if( client->ps.ammo < BG_Weapon( WP_ALEVEL3_UPG )->maxAmmo ) @@ -987,7 +987,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) AddScore( ent, HUMAN_BUILDER_SCOREINC ); } -// Give score to basis that healed other aliens + // Give score to basis that healed other aliens if( ent->client->pers.hasHealed ) { if( client->ps.weapon == WP_ALEVEL1 ) @@ -999,8 +999,8 @@ void ClientTimerActions( gentity_t *ent, int msec ) } } -//LVL2UPG barb regen (new) - if( client->ps.weapon == WP_ALEVEL2_UPG ) + //LVL2UPG barb regen (new) + if( client->ps.weapon == WP_ALEVEL2_UPG ) { if( client->ps.ammo < BG_Weapon( WP_ALEVEL2_UPG )->maxAmmo ) { @@ -1022,15 +1022,15 @@ void ClientTimerActions( gentity_t *ent, int msec ) ent->timestamp = level.time; } -// Regenerate Hummel Prickles + // Regenerate Hummel Prickles if( client->ps.weapon == WP_ALEVEL5 ) { if( client->ps.ammo < BG_Weapon( WP_ALEVEL5 )->maxAmmo ) { - if( ent->timestamp + LEVEL5_PRICKLES_RELOADTIME < level.time ) + while( ent->timestamp + LEVEL5_PRICKLES_RELOADTIME < level.time ) { client->ps.ammo++; - ent->timestamp = level.time; + ent->timestamp += LEVEL5_PRICKLES_RELOADTIME; } } else if( client->ps.ammo < BG_Weapon( WP_ALEVEL5 )->maxAmmo ) @@ -1069,7 +1069,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) ent->timestamp = level.time; } -// Regenerate Tyrant FireBreath + // Regenerate Tyrant FireBreath if( client->ps.weapon == WP_ALEVEL4 ) { if( client->ps.ammo < BG_Weapon( WP_ALEVEL4 )->maxAmmo ) @@ -1644,6 +1644,9 @@ void ClientThink_real( gentity_t *ent ) client->ps.pm_type = PM_GRABBED; else if( BG_InventoryContainsUpgrade( UP_JETPACK, client->ps.stats ) && BG_UpgradeIsActive( UP_JETPACK, client->ps.stats ) ) client->ps.pm_type = PM_JETPACK; + else if( client->ps.weapon == WP_ALEVEL5 /*&& client->buttons & BUTTON_WALKING*/ ) + //hummel fly + client->ps.pm_type = PM_HUMMEL; else client->ps.pm_type = PM_NORMAL; @@ -1659,10 +1662,6 @@ void ClientThink_real( gentity_t *ent ) client->lastSlowTime + ABUILDER_BLOB_TIME < level.time ) client->ps.stats[ STAT_STATE ] &= ~SS_SLOWLOCKED; -//hummel fly -if( client->ps.weapon == WP_ALEVEL5 && client->buttons & BUTTON_WALKING ) -client->ps.pm_type = PM_HUMMEL; - // Update boosted state flags client->ps.stats[ STAT_STATE ] &= ~SS_BOOSTEDWARNING; if( client->ps.stats[ STAT_STATE ] & SS_BOOSTED ) diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 12de3a2..d104f78 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -118,10 +118,10 @@ char *modNames[ ] = "MOD_LEVEL3_BOUNCEBALL", "MOD_LEVEL2_CLAW", "MOD_LEVEL2_ZAP", - "MOD_LEVEL2_BOUNCEBALL", "MOD_LEVEL5_CLAW", "MOD_LEVEL5_ZAP", "MOD_LEVEL5_BOUNCEBALL", + "MOD_LEVEL2_BOUNCEBALL", "MOD_LEVEL4_CLAW", "MOD_LEVEL4_TRAMPLE", "MOD_LEVEL4_CRUSH", @@ -1284,7 +1284,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, // don't do friendly fire on movement attacks - else if( mod == MOD_LEVEL4_TRAMPLE || mod == MOD_LEVEL3_POUNCE || mod == MOD_LEVEL5_POUNCE || mod == MOD_LEVEL4_CRUSH ) diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index fd24482..99cf5c5 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1485,7 +1485,7 @@ qboolean CheckPounceAttack( gentity_t *ent ) // In case the goon lands on his target, he get's one shot after landing payload = ent->client->pmext.pouncePayload; - if( !( ent->client->ps.pm_flags & PMF_CHARGE || ent->client->ps.weapon == WP_ALEVEL5 ) ) + if( !( ent->client->ps.pm_flags & PMF_CHARGE/* || ent->client->ps.weapon == WP_ALEVEL5 */) ) ent->client->pmext.pouncePayload = 0; // Calculate muzzle point @@ -1866,8 +1866,8 @@ void FireWeapon( gentity_t *ent ) meleeAttack( ent, LEVEL2_CLAW_U_RANGE_UPG, LEVEL2_CLAW_WIDTH, LEVEL2_CLAW_WIDTH, LEVEL2_CLAW_UPG_DMG, MOD_LEVEL2_CLAW ); break; - - case WP_ALEVEL5: + + case WP_ALEVEL5: meleeAttack( ent, LEVEL5_CLAW_U_RANGE, LEVEL5_CLAW_WIDTH, LEVEL5_CLAW_WIDTH, LEVEL5_CLAW_DMG, MOD_LEVEL5_CLAW ); break; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 8dd2ccd..ced40f2 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -289,32 +289,32 @@ TREMULOUS EDGE MOD SRC FILE #define LEVEL4_FIREBREATHDMG 50 //Hummel -#define LEVEL5_UPG_SPEED 1.1f +#define LEVEL5_UPG_SPEED 0.875f #define LEVEL5_UPG_VALUE AVM(400) -#define LEVEL5_UPG_HEALTH AHM(180) -#define LEVEL5_UPG_REGEN (0.03f * LEVEL5_UPG_HEALTH) +#define LEVEL5_UPG_HEALTH AHM(140) +#define LEVEL5_UPG_REGEN (0.04f * LEVEL5_UPG_HEALTH) #define LEVEL5_UPG_COST 2 -#define LEVEL5_CLAW_U_REPEAT 333 +#define LEVEL5_CLAW_U_REPEAT 300 #define LEVEL5_CLAW_U_K_SCALE 1.0f -#define LEVEL5_CLAW_U_RANGE 70.0f +#define LEVEL5_CLAW_U_RANGE 85.0f #define LEVEL5_CLAW_WIDTH 12.0f -#define LEVEL5_CLAW_DMG ADM(30) -#define LEVEL5_PRICKLES_REPEAT 200 +#define LEVEL5_CLAW_DMG ADM(36) +#define LEVEL5_PRICKLES_REPEAT 160 #define LEVEL5_PRICKLES_NEXTTHINK 6000 #define LEVEL5_PRICKLES_RADIUS 50 #define LEVEL5_PRICKLES_SPEED 1600.0f -#define LEVEL5_PRICKLESSPLASH_DMG 3 +#define LEVEL5_PRICKLESSPLASH_DMG 5 #define LEVEL5_PRICKLES_DMG 6 -#define LEVEL5_PRICKLES_RELOADTIME 2300 +#define LEVEL5_PRICKLES_RELOADTIME 160 #define LEVEL5_PRICKLES_AMMO 10 -#define LEVEL5_POUNCE_JUMP_MAG 800 -#define LEVEL5_POUNCE_REPEAT 300 -#define LEVEL5_POUNCE_TIME 800 -#define LEVEL5_POUNCE_TIME_MIN 200 +#define LEVEL5_POUNCE_JUMP_MAG 900 +#define LEVEL5_POUNCE_REPEAT 250 +#define LEVEL5_POUNCE_TIME 600 +#define LEVEL5_POUNCE_TIME_MIN 250 #define LEVEL5_POUNCE_DMG 40 -#define LEVEL5_POUNCE_RANGE 40.0f -#define LEVEL5_POUNCE_WIDTH 12.0f -#define LEVEL5_POUNCE_SPEED_MOD 0.8f +#define LEVEL5_POUNCE_RANGE 48.0f +#define LEVEL5_POUNCE_WIDTH 14.0f +#define LEVEL5_POUNCE_SPEED_MOD 0.95f /* * HUMAN */ |