Skip to content

Commit e6325e8

Browse files
Minor edits
1 parent 254d40e commit e6325e8

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

source/amxx_point_map_maker.sma

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ public MenuPointMaker_Handler( const pPlayer, const iMenuKey )
306306
UTIL_PlaySound( pPlayer, PluginSounds[ Sound_Error ] );
307307
}
308308

309-
310309
( gl_bitsUserShowAllPoints ) ? EnableHookChain( gl_HookChain_Player_PreThink_Post ) : DisableHookChain( gl_HookChain_Player_PreThink_Post );
311310
}
312311
case 7: {
@@ -524,7 +523,7 @@ public bool: native_get_random_points( const iPluginId, const iParamsCount )
524523

525524
// Do random
526525
SortADTArray( arTempPoints, Sort_Random, Sort_Float );
527-
iGetPointsCount = clamp( iGetPointsCount, 1, ArraySize( arTempPoints ) );
526+
iGetPointsCount = min( iGetPointsCount, ArraySize( arTempPoints ) );
528527

529528
new Vector3( vecOrigin );
530529
while ( iGetPointsCount-- ) {
@@ -611,10 +610,8 @@ stock bool: IsPointFree( const Vector3( vecOrigin ) )
611610
new pEntity = MaxClients; pEntity = engfunc( EngFunc_FindEntityInSphere, pEntity, vecSrc, 18.0 );
612611
if ( !is_nullent( pEntity ) )
613612
{
614-
/**
615-
* Some default entities have SOLID_TRIGGER, so in order not to take them into account, we can skip them
616-
*/
617613
#if defined EnableIgnoreList
614+
// Some default entities have SOLID_TRIGGER, so in order not to take them into account, we can skip them
618615
for ( new i = 0, iIterations = sizeof IgnoreEntitiesList; i < iIterations; i++ )
619616
{
620617
if ( FClassnameIs( pEntity, IgnoreEntitiesList[ i ] ) )

source/include/pont_map_maker.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ native bool: pmm_get_random_points( const Array: arPoints, const iPointsCount, c
3737
* If you specify "all", it will take into account all objects
3838
* If object is empty/invalid = automatically sets "general"
3939
*
40-
* @return Returns 'true' if at least 1 random point was written to the array, otherwise 'false'
40+
* @return Returns 'true' if at least 1 point was written to the array, otherwise 'false'
4141
*/
4242
native bool: pmm_get_all_points( const Array: arPoints, const szObjectName[ ] = "general" );

0 commit comments

Comments
 (0)