Fix for amb1647: brush origin retrieval was wrong

This commit is contained in:
Steve Dudenhoeffer
2008-05-07 05:17:21 +00:00
parent 55d18da46c
commit 0a38ef831f
2 changed files with 10 additions and 6 deletions

View File

@@ -90,12 +90,14 @@ stock get_grenade(id)
stock get_brush_entity_origin(ent, Float:orig[3])
{
new Float:Min[3], Float:Max[3];
entity_get_vector(ent, EV_VEC_origin, orig);
entity_get_vector(ent, EV_VEC_mins, Min);
entity_get_vector(ent, EV_VEC_maxs, Max);
orig[0] = (Min[0] + Max[0]) * 0.5;
orig[1] = (Min[1] + Max[1]) * 0.5;
orig[2] = (Min[2] + Max[2]) * 0.5;
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;
}