/* Space Headed Productions Utility Natives
*
* Copyright © 2006, Space Headed Productions
*
* This file is provided as is (no warranties).
*
*/

#if defined _shpun_included
	#endinput
#endif
#define _shpun_included

#pragma library SHPUN

enum find_type {
	find_classname,
	find_globalname,
	find_model,
	find_target,
	find_targetname,
	find_netname,
	find_message,
	find_noise,
	find_noise1,
	find_noise2,
	find_noise3,
	find_viewmodel,
	find_weaponmodel
}

enum hull_type {
	point_hull,
	human_hull,
	large_hull,
	head_hull
}

enum dist_type {
	dist_inch,
	dist_foot,
	dist_yard,
	dist_kilometer,
	dist_mile
}

native create_entity(const name[]);
native remove_entity(index);
native find_entity(index, const name[], type=find_classname);
native drop_to_floor(index);
native force_touch(toucher, touched);
native force_use(used, user);
native get_entity_origin(index, Float:output[3]);
native set_entity_size(index, Float:mins[3], Float:maxs[3]);
native set_entity_origin(index, Float:origin[3]);
native set_entity_model(index, const model[]);
native dispatch_spawn(index);
native dispatch_keyvalue(index, const keyname[], const value[]);
native point_contents(Float:origin[3]);
native attach_view(index, target);
native set_lights(const flags[]);
native set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16);
native is_visible(index, target, viewcone=0);
native is_in_world(index);
native Float:get_traveltime(Float:Speed, Float:vSource[3], Float:vPosition[3]);
native Float:get_real_distance(Float:vOrigin1[3], Float:vOrigin2[3], type=-1); // default type is a meter

native trace_hull(Float:origin[3], fNoMonsters=0, hull_type:hullNumber, SkipEntity=0);
native trace_line(index, Float:start[3], Float:end[3], Float:rtn[3]);
native trace_normal(index, Float:start[3], Float:end[3], Float:rtn[3]);
native trace_texture(index, Float:angles[3], output[], len);

native IVecFVec(iVector[3], Float:fVector[3]);
native FVecIVec(Float:fVector[3], iVector[3]);
native normalize(Float:vector[3], Float:output[3]);
native Float:dot_product(Float:vector1[3], Float:vector2[3]);

native respawn_player(id, time=1);
native get_user_model(id, output[], len);
native set_user_model(id, const model[]="");

native radius_damage(attacker, Float:damage, Float:origin[3], Float:radius, bit = DMG_GENERIC, wpnName[]="", headshot = 0);
native take_damage(victim, attacker, Float:origin[3], Float:damage, bit = DMG_GENERIC, wpnName[]="", headshot = 0);