View Single Post
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 #11

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