diff --git a/releases/3.2.0/source/mod/AvHBaseBuildable.cpp b/releases/3.2.0/source/mod/AvHBaseBuildable.cpp index b3159a78..93bd8562 100644 --- a/releases/3.2.0/source/mod/AvHBaseBuildable.cpp +++ b/releases/3.2.0/source/mod/AvHBaseBuildable.cpp @@ -683,26 +683,31 @@ AvHTeamNumber AvHBaseBuildable::GetTeamNumber() const void AvHBaseBuildable::Killed(entvars_t* pevAttacker, int iGib) { + bool theInReset = GetGameRules()->GetIsGameInReset(); + AvHBaseBuildable::SetHasBeenKilled(); this->mKilled = true; this->mInternalSetConstructionComplete = false; - // puzl: 980 - // Less smoke for recycled buildings - this->TriggerDeathAudioVisuals(iGib == GIB_RECYCLED); - - if(!this->GetIsOrganic()) + if (!theInReset) { - // More sparks for recycled buildings - int numSparks = ( iGib == GIB_RECYCLED ) ? 7 : 3; - for ( int i=0; i < numSparks; i++ ) { - Vector vecSrc = Vector( (float)RANDOM_FLOAT( pev->absmin.x, pev->absmax.x ), (float)RANDOM_FLOAT( pev->absmin.y, pev->absmax.y ), (float)0 ); - vecSrc = vecSrc + Vector( (float)0, (float)0, (float)RANDOM_FLOAT( pev->origin.z, pev->absmax.z ) ); - UTIL_Sparks(vecSrc); + // puzl: 980 + // Less smoke for recycled buildings + this->TriggerDeathAudioVisuals(iGib == GIB_RECYCLED); + + if(!this->GetIsOrganic()) + { + // More sparks for recycled buildings + int numSparks = ( iGib == GIB_RECYCLED ) ? 7 : 3; + for ( int i=0; i < numSparks; i++ ) { + Vector vecSrc = Vector( (float)RANDOM_FLOAT( pev->absmin.x, pev->absmax.x ), (float)RANDOM_FLOAT( pev->absmin.y, pev->absmax.y ), (float)0 ); + vecSrc = vecSrc + Vector( (float)0, (float)0, (float)RANDOM_FLOAT( pev->origin.z, pev->absmax.z ) ); + UTIL_Sparks(vecSrc); + } } + // :puzl } - // :puzl this->TriggerRemoveTech(); AvHSURemoveEntityFromHotgroupsAndSelection(this->entindex()); diff --git a/releases/3.2.0/source/mod/AvHGamerules.cpp b/releases/3.2.0/source/mod/AvHGamerules.cpp index ff9f4af4..b62d422d 100644 --- a/releases/3.2.0/source/mod/AvHGamerules.cpp +++ b/releases/3.2.0/source/mod/AvHGamerules.cpp @@ -339,6 +339,8 @@ AvHGamerules::AvHGamerules() : mTeamA(TEAM_ONE), mTeamB(TEAM_TWO) avh_drawinvisible.value = 1; #endif + this->mGameInReset = false; + this->ResetGame(); } @@ -852,6 +854,8 @@ void AvHGamerules::DeathNotice(CBasePlayer* pVictim, entvars_t* pKiller, entvars void AvHGamerules::DeleteAndResetEntities() { + this->mGameInReset = true; + // Print reset message at console char theResetString[128]; @@ -954,6 +958,9 @@ void AvHGamerules::DeleteAndResetEntities() sprintf(theResetString, "Game reset complete.\n"); ALERT(at_logged, theResetString); + + this->mGameInReset = false; + } BOOL AvHGamerules::FAllowMonsters( void ) diff --git a/releases/3.2.0/source/mod/AvHGamerules.h b/releases/3.2.0/source/mod/AvHGamerules.h index d16f019d..397e4372 100644 --- a/releases/3.2.0/source/mod/AvHGamerules.h +++ b/releases/3.2.0/source/mod/AvHGamerules.h @@ -286,6 +286,8 @@ public: bool GetMapVoteStrings(StringList& outMapVoteList); void RemovePlayerFromVotemap(int inPlayerIndex); + bool GetIsGameInReset() {return this->mGameInReset; }; + protected: void AutoAssignPlayer(AvHPlayer* inPlayer); void PerformMapValidityCheck(); @@ -390,6 +392,8 @@ private: typedef map EntityUnderAttackListType; EntityUnderAttackListType mEntitiesUnderAttack; + bool mGameInReset; + AvHMiniMap mMiniMap; AvHMapExtents mMapExtents;