Raised This Month: $ Target: $400
 0% 

[Help] WalkGuard Block Bombsites


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
LegacyCode
Member
Join Date: Apr 2017
Old 05-25-2017 , 13:09   Re: [Help] WalkGuard Block Bombsites
Reply With Quote #9

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_coli_col maxcolsi_col++ )
                    for ( new 
i_rowi_row maxrowsi_row++ )
                        
draw_block_line(
                            
grid_x+(m[0]*i_col), grid_ygrid_z+(m[2]*i_row),
                            
grid_x+(m[0]*i_col)+1grid_y+1grid_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_useridpoint_pos) && fm_is_in_viewcone(p_useridpoint_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

Last edited by LegacyCode; 05-25-2017 at 15:11.
LegacyCode is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode