mirror of
https://git.code.sf.net/p/quake/prozac-qfcc
synced 2024-11-10 15:21:51 +00:00
finally got the abs bounding box sorted out. must call setsize with the
/rotated/ bounding box.
This commit is contained in:
parent
cd8feab6aa
commit
9b1f1adede
1 changed files with 641 additions and 638 deletions
15
field.qc
15
field.qc
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue