diff --git a/releases/3.2.0/sound/weapons/charge2.wav b/releases/3.2.0/sound/weapons/charge2.wav new file mode 100644 index 0000000..a5471d0 Binary files /dev/null and b/releases/3.2.0/sound/weapons/charge2.wav differ diff --git a/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp b/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp index ca91f7f..b071fc4 100644 --- a/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp +++ b/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp @@ -496,7 +496,7 @@ void CBasePlayerWeapon::ItemPostFrame( void ) } // Properly propagate the end animation - if (this->PrevAttack2Status == true && !(m_pPlayer->pev->button & IN_ATTACK2) && (gHUD.GetHUDUser3() == AVH_USER3_ALIEN_PLAYER4)) + if (this->PrevAttack2Status == true && !(m_pPlayer->pev->button & IN_ATTACK2)) { switch (gHUD.GetCurrentWeaponID()) { @@ -506,6 +506,15 @@ void CBasePlayerWeapon::ItemPostFrame( void ) case AVH_WEAPON_ACIDROCKET: this->SendWeaponAnim(8); break; + case AVH_WEAPON_CLAWS: + this->SendWeaponAnim(9); + break; + case AVH_WEAPON_STOMP: + this->SendWeaponAnim(8); + break; + case AVH_WEAPON_DEVOUR: + this->SendWeaponAnim(11); + break; } } @@ -558,6 +567,20 @@ void CBasePlayerWeapon::ItemPostFrame( void ) break; } break; + case AVH_USER3_ALIEN_PLAYER5: + switch (gHUD.GetCurrentWeaponID()) + { + case AVH_WEAPON_CLAWS: + this->SendWeaponAnim(5); + break; + case AVH_WEAPON_DEVOUR: + this->SendWeaponAnim(18); + break; + case AVH_WEAPON_STOMP: + this->SendWeaponAnim(15); + break; + } + break; } } diff --git a/releases/3.2.0/source/mod/AvHAlienAbilities.cpp b/releases/3.2.0/source/mod/AvHAlienAbilities.cpp index 5f6b835..32278da 100644 --- a/releases/3.2.0/source/mod/AvHAlienAbilities.cpp +++ b/releases/3.2.0/source/mod/AvHAlienAbilities.cpp @@ -265,7 +265,7 @@ void AvHCharge::Precache(void) PRECACHE_UNMODIFIED_MODEL(kLevel5ViewModel); PRECACHE_UNMODIFIED_MODEL(kNullModel); - PRECACHE_UNMODIFIED_SOUND(kChargeSound); + PRECACHE_UNMODIFIED_SOUND(kChargeSound2); PRECACHE_UNMODIFIED_SOUND(kChargeKillSound); this->mEvent = PRECACHE_EVENT(1, kChargeEventName); diff --git a/releases/3.2.0/source/mod/AvHAlienAbilityConstants.h b/releases/3.2.0/source/mod/AvHAlienAbilityConstants.h index 1cca362..d1e8e79 100644 --- a/releases/3.2.0/source/mod/AvHAlienAbilityConstants.h +++ b/releases/3.2.0/source/mod/AvHAlienAbilityConstants.h @@ -47,6 +47,7 @@ const float kLeapDuration = 1.0f; // Charge constants. const float kChargePunch = 2.5; #define kChargeSound "weapons/charge1.wav" +#define kChargeSound2 "weapons/charge2.wav" #define kChargeKillSound "weapons/chargekill.wav" #define kChargeEventName "events/Charge.sc" const float kChargeROF = 5.0f; diff --git a/releases/3.2.0/source/mod/AvHPlayer.cpp b/releases/3.2.0/source/mod/AvHPlayer.cpp index cb70eba..f4a527a 100644 --- a/releases/3.2.0/source/mod/AvHPlayer.cpp +++ b/releases/3.2.0/source/mod/AvHPlayer.cpp @@ -2272,7 +2272,7 @@ void AvHPlayer::PlayerTouch(CBaseEntity* inOther) if((this->mTimeLeapEnd != -1) && (gpGlobals->time < this->mTimeLeapEnd)) { // Do damage to entity - if(GetGameRules()->CanEntityDoDamageTo(this, inOther, &theScalar)) + if(GetGameRules()->CanEntityDoDamageTo(this, inOther, &theScalar) && (inOther->pev->team != this->pev->team)) { float theDamage = BALANCE_VAR(kLeapDamage)*theScalar*theTouchDamageInterval; inOther->TakeDamage(theInflictor, theAttacker, theDamage, NS_DMG_NORMAL); @@ -2282,22 +2282,23 @@ void AvHPlayer::PlayerTouch(CBaseEntity* inOther) } // Are we charging? - if(false) // GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT)) - { - if(GetGameRules()->CanEntityDoDamageTo(this, inOther, &theScalar)) - { - float theDamage = BALANCE_VAR(kChargeDamage)*theScalar*theTouchDamageInterval; - - inOther->TakeDamage(theInflictor, theAttacker, theDamage, NS_DMG_NORMAL); - - if(inOther->IsPlayer() && !inOther->IsAlive()) - { - EMIT_SOUND(ENT(this->pev), CHAN_WEAPON, kChargeKillSound, 1.0, ATTN_NORM); - } - - this->mTimeOfLastTouchDamage = gpGlobals->time; - } - } +// if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT)) +// { +// // Don't do friendly fire +// if(GetGameRules()->CanEntityDoDamageTo(this, inOther, &theScalar)) +// { +// float theDamage = BALANCE_VAR(kChargeDamage)*theScalar*theTouchDamageInterval; +// +// inOther->TakeDamage(theInflictor, theAttacker, theDamage, NS_DMG_NORMAL); +// +// if(inOther->IsPlayer() && !inOther->IsAlive()) +// { +// EMIT_SOUND(ENT(this->pev), CHAN_WEAPON, kChargeKillSound, 1.0, ATTN_NORM); +// } +// +// this->mTimeOfLastTouchDamage = gpGlobals->time; +// } +// } } } } @@ -3062,11 +3063,11 @@ void AvHPlayer::GetSpeeds(int& outBaseSpeed, int& outUnemcumberedSpeed) const //theAlienBaseSpeed = this->mMaxGallopSpeed; theAlienBaseSpeed = BALANCE_VAR(kOnosBaseSpeed); - if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT)) - { - theAlienBaseSpeed *= kChargingFactor; - theSpeedUpgradeAmount *= kChargingFactor; - } +// if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT)) +// { +// theAlienBaseSpeed *= kChargingFactor; +// theSpeedUpgradeAmount *= kChargingFactor; +// } break; } @@ -6437,7 +6438,7 @@ void AvHPlayer::InternalAlienThink() } } - // Uncloak if we are charging + // Uncloak if we are charging, leaping or blinking if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT)) { this->TriggerUncloak(); @@ -6718,12 +6719,16 @@ void AvHPlayer::InternalPreThink() this->InternalHUDThink(); PROFILE_END(kPlayerHUDThink) - this->InternalChargeThink(); + this->InternalMovementThink(); } // Charge pushback -void AvHPlayer::InternalChargeThink() +void AvHPlayer::InternalMovementThink() { + // Ensure that we do leap damage + if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT) && (GetUser3() == AVH_USER3_ALIEN_PLAYER1)) + this->StartLeap(); + // Check whether we're in a charge if(GetHasUpgrade(this->pev->iuser4, MASK_ALIEN_MOVEMENT) && (GetUser3() == AVH_USER3_ALIEN_PLAYER5)) { @@ -6751,6 +6756,7 @@ void AvHPlayer::InternalChargeThink() float dot = DotProduct(heading, direction); if (dot > 0.0f) { + direction[0] = 50; VectorScale(direction, factor * dot, direction); VectorAdd(theEntity->pev->velocity, direction, theEntity->pev->velocity); if (Length(theEntity->pev->velocity) > theEntity->pev->maxspeed * maxpushbackspeedfactor) diff --git a/releases/3.2.0/source/mod/AvHPlayer.h b/releases/3.2.0/source/mod/AvHPlayer.h index dfaf353..557eaed 100644 --- a/releases/3.2.0/source/mod/AvHPlayer.h +++ b/releases/3.2.0/source/mod/AvHPlayer.h @@ -534,7 +534,7 @@ private: void InternalPreThink(); void InternalProgressBarThink(); void InternalSpeakingThink(); - void InternalChargeThink(); + void InternalMovementThink(); void EXPORT PlayerTouch(CBaseEntity* inOther); diff --git a/releases/3.2.0/source/pm_shared/pm_shared.cpp b/releases/3.2.0/source/pm_shared/pm_shared.cpp index ec11e12..ec12230 100644 --- a/releases/3.2.0/source/pm_shared/pm_shared.cpp +++ b/releases/3.2.0/source/pm_shared/pm_shared.cpp @@ -4629,7 +4629,7 @@ bool PM_ChargeMove() { int theSilenceUpgradeLevel = AvHGetAlienUpgradeLevel(pmove->iuser4, MASK_UPGRADE_6); float theVolumeScalar = 1.0f - theSilenceUpgradeLevel/3.0f; - PM_NSPlaySound( CHAN_WEAPON, "player/pl_fallpain3-7.wav", theVolumeScalar, ATTN_NORM, 0, PITCH_NORM ); + PM_NSPlaySound( CHAN_WEAPON, "weapons/charge2.wav", theVolumeScalar, ATTN_NORM, 0, PITCH_NORM ); pmove->fuser4 = 0.3f; } pmove->fuser4 += (float)pmove->frametime;