Quote:
Originally Posted by Thraka
Not create a brush entity, draw something on the screen. cant you draw lasers from one point to the other some how?
|
Im not sure if there already is a way of drawing the entity box by just supplying its entity index, possibly with a command or whatnot. Anyhow, you surely can draw it yourself line by line. See
TE_SetupBeamPoints (dont forget to send it after the set up... such a common mistake

).
Threw in a function that should help you get the absolute bounds of the entity to be drawn. Have fun working out the math how to draw each line, its not that hard but may take some time if you suck at maths like I do.
PHP Code:
//returns false if entity has no bounding box
bool:GetAbsBoundingBox(ent,Float:mins[3],Float:maxs[3]) {
if(!GetEntSendPropVector(ent,"m_vecMins",mins)) {
return false
}
decl Float:origin[3]
GetEntPropVector(ent,Prop_Data,"m_vecAbsOrigin",origin)
GetEntPropVector(ent,Prop_Send,"m_vecMaxs",maxs)
mins[0] += origin[0]
mins[1] += origin[1]
mins[2] += origin[2]
maxs[0] += origin[0]
maxs[1] += origin[1]
maxs[2] += origin[2]
return true
}
bool:GetEntSendPropVector(ent,const String:prop[],Float:vec[3]) {
decl String:class[32], offs, PropFieldType:type
if(GetEntityNetClass(ent,class,sizeof class) && (offs = FindSendPropInfo(class,prop,type)) != -1 && type == PropField_Vector) {
GetEntDataVector(ent,offs,vec)
return true
}
return false
}
In case you dont feel like looking for a sprite to use with TE_SetupBeamPoints yourself, heres one Ive been using: "materials/sprites/bluelaser1.vmt".
__________________