mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-31 14:39:19 +00:00
upload "kind" alien swarm
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "cbase.h"
|
||||
#include "asw_prop_dynamic.h"
|
||||
#include "asw_marine.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
// Remap old prop physics entities to infested versions too
|
||||
LINK_ENTITY_TO_CLASS( dynamic_prop, CASW_Prop_Dynamic );
|
||||
LINK_ENTITY_TO_CLASS( prop_dynamic, CASW_Prop_Dynamic );
|
||||
LINK_ENTITY_TO_CLASS( prop_dynamic_override, CASW_Prop_Dynamic );
|
||||
|
||||
int CASW_Prop_Dynamic::OnTakeDamage( const CTakeDamageInfo &inputInfo )
|
||||
{
|
||||
// check for notifying a marine that he's shooting a breakable prop
|
||||
if ( inputInfo.GetAttacker() && inputInfo.GetAttacker()->Classify() == CLASS_ASW_MARINE )
|
||||
{
|
||||
CASW_Marine* pMarine = dynamic_cast<CASW_Marine*>(inputInfo.GetAttacker());
|
||||
if (pMarine)
|
||||
{
|
||||
pMarine->HurtJunkItem(this, inputInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return BaseClass::OnTakeDamage(inputInfo);
|
||||
}
|
||||
Reference in New Issue
Block a user