HLEntity

From Valve Developer Community
Jump to: navigation, search

This is the basic interface for entities

#include <boost/python.hpp>
namespace bp = boost::python;

BOOST_PYTHON_MODULE(HLEntity)
{
	bp::class_< CHandle<CBaseEntity> >("EHANDLE", bp::init<CBaseEntity*>());

	bp::class_<CBaseEntity, boost::noncopyable>("CBaseEntity", bp::no_init)
		.def("IsAlive", &CBaseEntity::IsAlive)
		.def("TeamNumber", &CBaseEntity::GetTeamNumber)
		.def("GetId", &CBaseEntity::entindex);

	bp::class_<CBaseAnimating, bp::bases<CBaseEntity>, boost::noncopyable>("CBaseAnimating", bp::no_init);
}