You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
836 B
26 lines
836 B
1 year ago
|
#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);
|
||
|
}
|