Difference between revisions of "HLGlobal"

From Valve Developer Community
Jump to: navigation, search
(Created page with 'This is the basic interface for hl2 game rules <source lang=cpp> #include <boost/python.hpp> namespace bp = boost::python; BOOST_PYTHON_MODULE(HLGlobal) { bp::scope().attr("T…')
 
m (moved HLGlobals to HLGlobal)
 
(No difference)

Latest revision as of 04:34, 4 September 2009

This is the basic interface for hl2 game rules

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


BOOST_PYTHON_MODULE(HLGlobal)
{
	bp::scope().attr("TEAM_NONE") = TEAM_UNASSIGNED;
	bp::scope().attr("TEAM_SPECTATOR") = TEAM_SPECTATOR;
	bp::scope().attr("TEAM_RED") = TEAM_RED;
	bp::scope().attr("TEAM_BLUE") = TEAM_BLUE;

	bp::scope().attr("HUD_PRINTNOTIFY") = HUD_PRINTNOTIFY;
	bp::scope().attr("HUD_PRINTCONSOLE") = HUD_PRINTCONSOLE;
	bp::scope().attr("HUD_PRINTTALK") = HUD_PRINTTALK;
	bp::scope().attr("HUD_PRINTCENTER") = HUD_PRINTCENTER;
}