Raised This Month: $ Target: $400
 0% 

ROG - A better random origin generator[NO HIDDEN ZONES UPDATE]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-29-2018 , 09:39   Re: ROG - A better random origin generator
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Is there any method on making an entity slide down if the place is steepy?
I'm using movetype_toss and pev_gravity 1.0 here, and it does slide on steepy places.

Quote:
Originally Posted by edon1337 View Post
We're already aware of the outside areas and the hill sides. I made a stock that can be used in maps where the outside area is underground (such as de_mon). As for the 'mountains' I still don't have a solution.

PHP Code:
public Float:GetValidPoint( )  
{  
    new 
Float:fPoint];  
    
fPoint] = GetLowestPoint( );  

    
fPoint] += 10.0;  
    while( ( 
engfuncEngFunc_PointContentsfPoint ) == CONTENTS_SOLID ) || ( engfuncEngFunc_PointContentsfPoint ) == CONTENTS_WATER ) )  
    {  
        
fPoint] += 1.0;  
    }  
          
    new 
pcCurrent engfuncEngFunc_PointContents fPoint );  
          
    if( 
pcCurrent == CONTENTS_EMPTY )  
    return 
fPoint];  
          
    return 
0.0;  
}  

public 
Float:GetLowestPoint( )  
{  
    new 
pcCurrent;  
    new 
Float:fStartingOffset];  
      
    while( ( 
engfuncEngFunc_PointContentsfStartingOffset ) == CONTENTS_SOLID ) || ( engfuncEngFunc_PointContentsfStartingOffset ) == CONTENTS_WATER ) || ( engfuncEngFunc_PointContentsfStartingOffset ) == CONTENTS_EMPTY ) )  
    {  
        
fStartingOffset] -= 5.0;   
    }  
      
    
pcCurrent engfuncEngFunc_PointContents fStartingOffset );   

    if( 
pcCurrent == CONTENTS_SKY )  
    return 
fStartingOffset];  
      
    return 
0.0;  

Usage
PHP Code:
new Float:fLowestPoint GetValidPoint( ); 
FYI, -350.0 is a non stuck-free origin in de_mon. ~ -420.0 is the minimum.
My check worked here, but I gotcha.

And Hamlet, I tried some checks here, but I failed too. I get back to my oldest and newbie spawn points. But i'll try to help everyone with this include, 'cos it worths.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-29-2018 at 09:41.
EFFx is offline
 


Thread Tools
Display Modes

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 13:58.


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