Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/game/server/swarm/asw_grenade_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ void CASW_Grenade_Cluster::Spawn( void )
SetThink( &CASW_Grenade_Cluster::CheckNearbyDrones );
SetNextThink( gpGlobals->curtime + asw_cluster_grenade_radius_check_interval.GetFloat() );
}
m_CreatorWeaponClass = (Class_T)CLASS_ASW_UNKNOWN;

m_bTeslaAmped = false;

Expand Down Expand Up @@ -226,6 +225,10 @@ CASW_Grenade_Cluster* CASW_Grenade_Cluster::Cluster_Grenade_Create( float flDama
pGrenade->SetAbsAngles( angles );
UTIL_SetOrigin( pGrenade, position );
pGrenade->m_vecInitPos = position;
if ( pCreatorWeapon )
{
pGrenade->m_CreatorWeaponClass = pCreatorWeapon->Classify();
}
pGrenade->Spawn();
pGrenade->m_flDamage = flDamage;
pGrenade->m_DmgRadius = fRadius;
Expand All @@ -236,7 +239,6 @@ CASW_Grenade_Cluster* CASW_Grenade_Cluster::Cluster_Grenade_Create( float flDama
pGrenade->m_hCreatorWeapon = pCreatorWeapon;
if ( pCreatorWeapon )
{
pGrenade->m_CreatorWeaponClass = pCreatorWeapon->Classify();
pGrenade->m_ProjectileData.GetForModify().SetFromWeapon( pCreatorWeapon );
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/server/swarm/asw_grenade_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CASW_Grenade_Cluster : public CASW_Grenade_Vindicator

float m_fDetonateTime;
float m_fEarliestAOEDetonationTime;
Class_T m_CreatorWeaponClass;
Class_T m_CreatorWeaponClass = (Class_T)CLASS_ASW_UNKNOWN;

void SetAdvancedRicochet(bool bRicochet) { m_bAdvancedRicochet = bRicochet; } // if set, grenade will ricochet with increaced velocity if no world contact explosion specified.
bool m_bAdvancedRicochet;
Expand Down
Loading