Hello,
The lines now only show to the specific player (not like before via MSG_BROADCAST).
I'm now trying to apply a basic grid of points to the side where it shows the cross:
PHP Code:
// y
draw_block_line(mins[0], mins[1], mins[2], maxs[0], mins[1], maxs[2], {0,230,0}, p_userid)
draw_block_line(maxs[0], mins[1], mins[2], mins[0], mins[1], maxs[2], {0,230,0}, p_userid)
for ( new i_col; i_col < maxcols; i_col++ )
for ( new i_row; i_row < maxrows; i_row++ )
draw_block_line(
grid_x+(m[0]*i_col), grid_y, grid_z+(m[2]*i_row),
grid_x+(m[0]*i_col)+1, grid_y+1, grid_z+(m[2]*i_row)+1,
{255,255,255},
p_userid
)
I saw a "fm_trace_line()" function which I would use to check if any of those points are visible for the player.
If not, it doesn't draw the cross. Is this a "good" solution, or am I overthinking this? There must be a better way to deal with this...
//e:
Current status:
I currently use
PHP Code:
#define BLOCK_VISIBILITY_ACCURACY 11
// the check
fm_is_visible(p_userid, point_pos) && fm_is_in_viewcone(p_userid, point_pos)
to define 11 points per col/row to check in combination with
fm_is_visible &
fm_is_in_viewcone.
Everything works now. Will test and optimize this a little further, hoping someone stumbles across this thread with better knowledge.
- LegacyCode