finally got the abs bounding box sorted out. must call setsize with the

/rotated/ bounding box.
This commit is contained in:
Bill Currie 2001-07-27 20:27:58 +00:00
parent cd8feab6aa
commit 9b1f1adede

View file

@ -583,18 +583,21 @@ void(entity gen1, entity gen2) Create_Field =
tfield.rotated_bbox = getboxhull();
rotate_bbox (tfield.rotated_bbox, right, forward, up, tfield.mins,
tfield.maxs);
tfield.absmax = tfield.origin + getboxbounds (tfield.rotated_bbox, 1);
tfield.absmin = tfield.origin + getboxbounds (tfield.rotated_bbox, 0);
// foo = "absmin: " + vtos (tfield.absmin)
// + " absmax: " + vtos (tfield.absmax) + "\n";
// dprint (foo);
local vector mins, maxs;
mins = getboxbounds (tfield.rotated_bbox, 0);
maxs = getboxbounds (tfield.rotated_bbox, 1);
// apply stuff
tfield.movetype = MOVETYPE_NONE;
tfield.solid = SOLID_BBOX;
setsize(tfield, tfield.mins, tfield.maxs);
setsize(tfield, mins, maxs);
setorigin(tfield, tfield.origin);
// foo = "min: " + vtos (mins) + "\n" +
// "max: " + vtos (maxs) + "\n" +
// "absmin: " + vtos (tfield.absmin) + "\n" +
// "absmax: " + vtos (tfield.absmax) + "\n";
// dprint (foo + "\n");
// assign the pointers on the field generators
gen1.fieldgen_field = tfield;