//========= Copyright © 1996-2005, Sander Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef CORDERRTSTRIGGER_H
#define CORDERRTSTRIGGER_H
#ifdef _WIN32
#pragma once
#endif

#include "hl2wars/rts_mouse_brush.h"

//-----------------------------------------------------------------------------
// Purpose: A brush that will react on a mouse click, adds the npc of the rts player, 
//           and orders those to move to this brush to do something (trigger it).
//-----------------------------------------------------------------------------
class COrderRTSTrigger : public CMouseRTSBrush
{
public:
	DECLARE_CLASS( COrderRTSTrigger, CMouseRTSBrush );

	DECLARE_SERVERCLASS();
	DECLARE_DATADESC();

	COrderRTSTrigger();

	void Spawn( void );
	void Activate( void );

	void OnClickLeft( CBasePlayer *pActivator );
	void OnClickRight( CBasePlayer *pActivator );
	void OnClickLeftDouble( CBasePlayer *pActivator );
	void OnClickRightDouble( CBasePlayer *pActivator );

	void FindOrderPositions( bool bRun );
	void GoToDefault( bool bRun );

	virtual int GetBrushType( void ) { return MOUSEBRUSH_ORDER; };
	
private:
	string_t m_pOrderPositions;
	string_t m_pDefaultPosition;
	int m_iOrderType;
	float m_fSearchRadius;

	string_t	m_iFilterName;
	CHandle<class CBaseFilter>	m_hFilter;

	string_t m_pOwner;
	CNetworkHandle( CBaseEntity, m_hOwner );	
};

#endif // CORDERRTSTRIGGER_H