Modified get_brush_entity_origin and ViewContents as per at29759 (Orangutanz)

This commit is contained in:
Scott Ehlert 2006-05-15 13:52:38 +00:00
parent 25a2b11198
commit b6007e8223

View File

@ -113,10 +113,12 @@ stock get_brush_entity_origin(ent, Float:orig[3])
new Float:Min[3], Float:Max[3]
entity_get_vector(ent, EV_VEC_mins, Min)
entity_get_vector(ent, EV_VEC_maxs, Max)
for(new a = 0; a < 3; a++)
orig[a] = (Min[a] + Max[a]) / 2
return orig[0] && orig[1] && orig[2]
orig[0] = (Min[0] + Max[0]) * 0.5
orig[1] = (Min[1] + Max[1]) * 0.5
orig[2] = (Min[2] + Max[2]) * 0.5
return 1
}
/* Remove entity by name */
@ -137,10 +139,11 @@ stock ViewContents(id)
{
new origin[3], Float:Orig[3]
get_user_origin(id, origin, 3)
for(new a = 0; a < 3; a++)
Orig[a] = float(origin[a])
Orig[0] = float(origin[0])
Orig[1] = float(origin[1])
Orig[2] = float(origin[2])
return PointContents( Orig )
return point_contents(Orig)
}
stock get_speed(ent)