Hi
I have been messing around with getting a bounding box displayed where ever there is a trigger. Ideally I want it to be used for tracking moving triggers like for a tank.
I got this bit of code:
// CHRUKER: Attempting to display bounding box continously
if (1==1) {
gentity_t *bboxEnt;
vec3_t b1, b2;
VectorCopy(attacker->r.currentOrigin, b1);
VectorCopy(attacker->r.currentOrigin, b2);
VectorAdd(b1, attacker->r.mins, b1);
VectorAdd(b2, attacker->r.maxs, b2);
bboxEnt = G_TempEntity( b1, EV_RAILTRAIL );
VectorCopy(b2, bboxEnt->s.origin2);
bboxEnt->s.dmgFlags = 1;
}
Which I can insert and have a bounding box displayed. I just need to change attacker to what ever the variable that contains the entity. However I’m not sure where to put it, so it gets updated continously.
I have gotten my own players bounding box displayed each time I fire my gun, by inserting the code in the Bullet_fire_extended function, and I got the trigger zone bounding box displayed for a tank, by putting it in the Multi_wait function in g_trigger.
They both sort of work, but I wonder if any of you guys have a hint on where to insert it.

I remember seeing something similar in another post about the players bounding box.

