Skip to content
Merged
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
19 changes: 19 additions & 0 deletions src/game/client/swarm/c_asw_boomer_blob.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "cbase.h"
#include "c_asw_boomer_blob.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

IMPLEMENT_CLIENTCLASS_DT( C_ASW_Boomer_Blob, DT_ASW_Boomer_Blob, CASW_Boomer_Blob )

END_RECV_TABLE();

void C_ASW_Boomer_Blob::CreateSmokeTrail()
{

}

void C_ASW_Boomer_Blob::Detonate()
{

}
13 changes: 13 additions & 0 deletions src/game/client/swarm/c_asw_boomer_blob.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "c_asw_grenade_vindicator.h"

class C_ASW_Boomer_Blob : public C_ASW_Grenade_Vindicator
{
DECLARE_CLASS( C_ASW_Boomer_Blob, C_ASW_Grenade_Vindicator );
DECLARE_CLIENTCLASS();

public:
virtual void Detonate();
virtual void CreateSmokeTrail();
};
14 changes: 14 additions & 0 deletions src/game/client/swarm/c_asw_grenade_cluster.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cbase.h"
#include "c_asw_grenade_cluster.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

IMPLEMENT_CLIENTCLASS_DT( C_ASW_Grenade_Cluster, DT_ASW_Grenade_Cluster, CASW_Grenade_Cluster )

END_RECV_TABLE();

void C_ASW_Grenade_Cluster::Detonate()
{

}
17 changes: 17 additions & 0 deletions src/game/client/swarm/c_asw_grenade_cluster.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef _INCLUDED_C_ASW_GRENADE_CLUSTER_H
#define _INCLUDED_C_ASW_GRENADE_CLUSTER_H

#pragma once

#include "c_asw_grenade_vindicator.h"

class C_ASW_Grenade_Cluster : public C_ASW_Grenade_Vindicator
{
DECLARE_CLASS( C_ASW_Grenade_Cluster, C_ASW_Grenade_Vindicator );
DECLARE_CLIENTCLASS();

public:
virtual void Detonate();
};

#endif // _INCLUDED_C_ASW_GRENADE_CLUSTER_H
23 changes: 23 additions & 0 deletions src/game/client/swarm/c_asw_grenade_freeze.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "cbase.h"
#include "c_asw_grenade_freeze.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

IMPLEMENT_CLIENTCLASS_DT( C_ASW_Grenade_Freeze, DT_ASW_Grenade_Freeze, CASW_Grenade_Freeze )

END_RECV_TABLE();

void C_ASW_Grenade_Freeze::CreateSmokeTrail()
{
if ( m_pSmokeTrail )
return;

m_pSmokeTrail = ParticleProp()->Create( "grenade_freeze_main_trail", PATTACH_ABSORIGIN_FOLLOW, -1, Vector( 0, 0, 0 ) );
}

void C_ASW_Grenade_Freeze::Detonate()
{

}

18 changes: 18 additions & 0 deletions src/game/client/swarm/c_asw_grenade_freeze.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _INCLUDED_C_ASW_GRENADE_FREEZE_H
#define _INCLUDED_C_ASW_GRENADE_FREEZE_H

#pragma once

#include "c_asw_grenade_cluster.h"

class C_ASW_Grenade_Freeze : public C_ASW_Grenade_Cluster
{
DECLARE_CLASS( C_ASW_Grenade_Freeze, C_ASW_Grenade_Cluster );
DECLARE_CLIENTCLASS();

public:
virtual void Detonate();
virtual void CreateSmokeTrail();
};

#endif // _INCLUDED_C_ASW_GRENADE_FREEZE_H
2 changes: 1 addition & 1 deletion src/game/client/swarm/c_asw_grenade_vindicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class C_ASW_Grenade_Vindicator : public C_ASW_Rifle_Grenade
virtual void Spawn();
virtual void OnDataChanged(DataUpdateType_t updateType);
virtual void Detonate();
void CreateSmokeTrail();
virtual void CreateSmokeTrail();

bool m_bDetonated;

Expand Down
19 changes: 19 additions & 0 deletions src/game/client/swarm/c_asw_mortar_round.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "cbase.h"
#include "c_asw_mortar_round.h"

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

IMPLEMENT_CLIENTCLASS_DT( C_ASW_Mortar_Round, DT_ASW_Mortar_Round, CASW_Mortar_Round )

END_RECV_TABLE();

void C_ASW_Mortar_Round::CreateSmokeTrail()
{

}

void C_ASW_Mortar_Round::Detonate()
{

}
14 changes: 14 additions & 0 deletions src/game/client/swarm/c_asw_mortar_round.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#pragma once

#include "cbase.h"
#include "c_asw_grenade_vindicator.h"

class C_ASW_Mortar_Round : public C_ASW_Grenade_Vindicator
{
DECLARE_CLASS( C_ASW_Mortar_Round, C_ASW_Grenade_Vindicator );
DECLARE_CLIENTCLASS();

public:
virtual void Detonate();
virtual void CreateSmokeTrail();
};
8 changes: 8 additions & 0 deletions src/game/client/swarm_sdk_client.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClCompile Include="swarm\c_asw_ammo_drop.cpp" />
<ClCompile Include="swarm\c_asw_aoegrenade_projectile.cpp" />
<ClCompile Include="swarm\c_asw_boomer.cpp" />
<ClCompile Include="swarm\c_asw_boomer_blob.cpp" />
<ClCompile Include="swarm\c_asw_buffgrenade_projectile.cpp" />
<ClCompile Include="swarm\c_asw_button_area.cpp" />
<ClCompile Include="swarm\c_asw_buzzer.cpp" />
Expand Down Expand Up @@ -1295,6 +1296,8 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClCompile Include="swarm\c_asw_gas_grenade_projectile.cpp" />
<ClCompile Include="swarm\c_asw_generic_emitter.cpp" />
<ClCompile Include="swarm\c_asw_generic_emitter_entity.cpp" />
<ClCompile Include="swarm\c_asw_grenade_cluster.cpp" />
<ClCompile Include="swarm\c_asw_grenade_freeze.cpp" />
<ClCompile Include="swarm\c_asw_grenade_vindicator.cpp" />
<ClCompile Include="swarm\c_asw_gun_smoke_emitter.cpp" />
<ClCompile Include="swarm\c_asw_hack.cpp" />
Expand All @@ -1314,6 +1317,7 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClCompile Include="swarm\c_asw_meatbug.cpp" />
<ClCompile Include="swarm\c_asw_mesh_emitter_entity.cpp" />
<ClCompile Include="swarm\c_asw_mine.cpp" />
<ClCompile Include="swarm\c_asw_mortar_round.cpp" />
<ClCompile Include="swarm\c_asw_objective.cpp" />
<ClCompile Include="swarm\c_asw_objective_countdown.cpp" />
<ClCompile Include="swarm\c_asw_objective_kill_aliens.cpp" />
Expand Down Expand Up @@ -3139,6 +3143,7 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClInclude Include="swarm\c_asw_ammo_drop.h" />
<ClInclude Include="swarm\c_asw_aoegrenade_projectile.h" />
<ClInclude Include="swarm\c_asw_boomer.h" />
<ClCompile Include="swarm\c_asw_boomer_blob.h" />
<ClInclude Include="swarm\c_asw_buffgrenade_projectile.h" />
<ClInclude Include="swarm\c_asw_button_area.h" />
<ClInclude Include="swarm\c_asw_buzzer.h" />
Expand Down Expand Up @@ -3167,6 +3172,8 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClInclude Include="swarm\c_asw_gas_grenade_projectile.h" />
<ClInclude Include="swarm\c_asw_generic_emitter.h" />
<ClInclude Include="swarm\c_asw_generic_emitter_entity.h" />
<ClInclude Include="swarm\c_asw_grenade_cluster.h" />
<ClInclude Include="swarm\c_asw_grenade_freeze.h" />
<ClInclude Include="swarm\c_asw_grenade_vindicator.h" />
<ClInclude Include="swarm\c_asw_gun_smoke_emitter.h" />
<ClInclude Include="swarm\c_asw_hack.h" />
Expand All @@ -3183,6 +3190,7 @@ if exist ..\..\devtools\bin\postbuild.cmd ..\..\devtools\bin\postbuild.cmd clien
<ClInclude Include="swarm\c_asw_meatbug.h" />
<ClInclude Include="swarm\c_asw_mesh_emitter_entity.h" />
<ClInclude Include="swarm\c_asw_mine.h" />
<ClCompile Include="swarm\c_asw_mortar_round.h" />
<ClInclude Include="swarm\c_asw_objective.h" />
<ClInclude Include="swarm\c_asw_objective_countdown.h" />
<ClInclude Include="swarm\c_asw_objective_kill_aliens.h" />
Expand Down
4 changes: 4 additions & 0 deletions src/game/server/swarm/asw_boomer_blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ BEGIN_DATADESC( CASW_Boomer_Blob )
DEFINE_INPUTFUNC( FIELD_VOID, "CreateEffects", InputCreateEffects ),
END_DATADESC()

IMPLEMENT_SERVERCLASS_ST( CASW_Boomer_Blob, DT_ASW_Boomer_Blob )

END_SEND_TABLE();

extern int g_sModelIndexFireball; // (in combatweapon.cpp) holds the index for the smoke cloud

CASW_Boomer_Blob::CASW_Boomer_Blob()
Expand Down
1 change: 1 addition & 0 deletions src/game/server/swarm/asw_boomer_blob.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CASW_Boomer_Blob : public CASW_Grenade_Vindicator

#if !defined( CLIENT_DLL )
DECLARE_DATADESC();
DECLARE_SERVERCLASS();
#endif

static CASW_Boomer_Blob *Boomer_Blob_Create( float flDamage, float fRadius, int iClusters, const Vector &position, const QAngle &angles, const Vector &velocity,
Expand Down
4 changes: 4 additions & 0 deletions src/game/server/swarm/asw_grenade_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ BEGIN_ENT_SCRIPTDESC(CASW_Grenade_Cluster, CBaseCombatCharacter, "Cluster grenad
DEFINE_SCRIPTFUNC(ReflectRandomly, "Reflect grenade to random porition")
END_SCRIPTDESC();

IMPLEMENT_SERVERCLASS_ST( CASW_Grenade_Cluster, DT_ASW_Grenade_Cluster )

END_SEND_TABLE();

void CASW_Grenade_Cluster::Spawn( void )
{
Precache();
Expand Down
1 change: 1 addition & 0 deletions src/game/server/swarm/asw_grenade_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class CASW_Grenade_Cluster : public CASW_Grenade_Vindicator
DECLARE_CLASS( CASW_Grenade_Cluster, CASW_Grenade_Vindicator );
DECLARE_DATADESC();
DECLARE_ENT_SCRIPTDESC();
DECLARE_SERVERCLASS();

virtual void Spawn();
virtual void DoExplosion();
Expand Down
10 changes: 5 additions & 5 deletions src/game/server/swarm/asw_grenade_freeze.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ BEGIN_DATADESC( CASW_Grenade_Freeze )
DEFINE_FIELD( m_flFreezeAmount, FIELD_FLOAT ),
END_DATADESC()

IMPLEMENT_SERVERCLASS_ST( CASW_Grenade_Freeze, DT_ASW_Grenade_Freeze )

END_SEND_TABLE();

CASW_Grenade_Freeze::CASW_Grenade_Freeze()
{
m_flFreezeAmount = 1.0f + MarineSkills()->GetSkillBasedValue( NULL, ASW_MARINE_SKILL_GRENADES, ASW_MARINE_SUBSKILL_GRENADE_FREEZE_DURATION, 0 );
Expand Down Expand Up @@ -84,11 +88,7 @@ CASW_Grenade_Freeze* CASW_Grenade_Freeze::Freeze_Grenade_Create( float flDamage,

void CASW_Grenade_Freeze::CreateEffects()
{
CEffectData data;
data.m_vOrigin = GetAbsOrigin();
CPASFilter filter( data.m_vOrigin );
filter.SetIgnorePredictionCull( true );
DispatchParticleEffect( "grenade_freeze_main_trail", PATTACH_ABSORIGIN_FOLLOW, this, "fuse", false, -1, &filter );

}

// this function is required since we added CASW_Grenade_Cluster::GetEarliestTouchDetonationTime() and rd_grenade_launcher_arm_time would also affect freeze grenades
Expand Down
1 change: 1 addition & 0 deletions src/game/server/swarm/asw_grenade_freeze.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CASW_Grenade_Freeze : public CASW_Grenade_Cluster
public:
DECLARE_CLASS( CASW_Grenade_Freeze, CASW_Grenade_Cluster );
DECLARE_DATADESC();
DECLARE_SERVERCLASS();

CASW_Grenade_Freeze();

Expand Down
4 changes: 4 additions & 0 deletions src/game/server/swarm/asw_mortar_round.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ BEGIN_DATADESC( CASW_Mortar_Round )
DEFINE_INPUTFUNC( FIELD_VOID, "CreateEffects", InputCreateEffects ),
END_DATADESC()

IMPLEMENT_SERVERCLASS_ST( CASW_Mortar_Round, DT_ASW_Mortar_Round )

END_SEND_TABLE();

extern int g_sModelIndexFireball; // (in combatweapon.cpp) holds the index for the smoke cloud

void CASW_Mortar_Round::Spawn( void )
Expand Down
1 change: 1 addition & 0 deletions src/game/server/swarm/asw_mortar_round.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CASW_Mortar_Round : public CASW_Grenade_Vindicator

#if !defined( CLIENT_DLL )
DECLARE_DATADESC();
DECLARE_SERVERCLASS();
#endif

static CASW_Mortar_Round *Mortar_Round_Create( float flDamage, float fRadius, int iClusters, const Vector &position, const QAngle &angles, const Vector &velocity,
Expand Down
Loading