Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
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.
 
 
 
 
 
 

60 lines
1.6 KiB

//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Filters are outboard entities that hold a set of rules that other
// entities can use to determine behaviors.
//
// For example, triggers can use an activator filter to determine who
// activates them. NPCs and breakables can use a damage filter to
// determine what can damage them.
//
// Current filter criteria are:
//
// Activator name
// Activator class
// Activator team
// Damage type (for damage filters only)
//
// More than one filter can be combined to create a more complex boolean
// expression by using filter_multi.
//
//=============================================================================//
#ifndef FILTERS_H
#define FILTERS_H
#ifdef _WIN32
#pragma once
#endif
#include "baseentity.h"
#include "entityoutput.h"
// ###################################################################
// > BaseFilter
// ###################################################################
class CBaseFilter : public CLogicalEntity
{
DECLARE_CLASS( CBaseFilter, CLogicalEntity );
public:
DECLARE_DATADESC();
bool PassesFilter( CBaseEntity *pCaller, CBaseEntity *pEntity );
bool PassesDamageFilter( const CTakeDamageInfo &info );
bool m_bNegated;
// Inputs
void InputTestActivator( inputdata_t &inputdata );
// Outputs
COutputEvent m_OnPass; // Fired when filter is passed
COutputEvent m_OnFail; // Fired when filter is failed
protected:
virtual bool PassesFilterImpl( CBaseEntity *pCaller, CBaseEntity *pEntity );
virtual bool PassesDamageFilterImpl(const CTakeDamageInfo &info);
};
#endif // FILTERS_H