--- grab_plus.sma 2007/11/06 19:57:19 12 +++ grab_plus.sma 2007/11/12 21:37:01 15 @@ -1,5 +1,5 @@ /* -Grab+ v1.2 +Grab+ v1.2.1 Copyright (C) 2007 Ian (Juan) Cammarata This program is free software; you can redistribute it and/or modify it under @@ -16,7 +16,7 @@ -------------------------------------------------------------------------------- http://ian.cammarata.us/projects/grab_plus -Nov 06 11:21 +Nov 12 14:35 Description: @@ -101,6 +101,9 @@ Change Log: Key (+ added | - removed | c changed | f fixed) +v1.2.1 (Nov 12, 2007) +f: Elimited two run time warnings in the player prethink function. + v1.2 (Nov 06, 2007) +: Cvars gp_screen_fade and gp_glow to enable/disable these features. +: Cvar gp_glow_a controls to control alpha of screenfade and glow. @@ -122,7 +125,7 @@ #include #include -#define VERSION "1.2" +#define VERSION "1.2.1" #define ADMIN ADMIN_LEVEL_A #define TSK_CHKE 50 @@ -201,14 +204,11 @@ SVC_SCREENFADE = get_user_msgid( "ScreenFade" ) SVC_SCREENSHAKE = get_user_msgid( "ScreenShake" ) - - return PLUGIN_CONTINUE } public plugin_precache( ) { precache_sound( "player/PL_PAIN2.WAV" ) - return PLUGIN_CONTINUE } public fm_player_prethink( id ) @@ -225,20 +225,21 @@ if( 0 < target <= MAXPLAYERS ) { - if( is_grabbed( target, id ) ) return PLUGIN_CONTINUE + if( is_grabbed( target, id ) ) return FMRES_IGNORED set_grabbed( id, target ) } else if( !get_pcvar_num( p_players_only ) ) { new movetype - if( target ) + if( target && pev_valid( target ) ) { movetype = pev( target, pev_movetype ) if( !( movetype == MOVETYPE_WALK || movetype == MOVETYPE_STEP || movetype == MOVETYPE_TOSS ) ) - return PLUGIN_CONTINUE + return FMRES_IGNORED } else { + target = 0 new ent = engfunc( EngFunc_FindEntityInSphere, -1, ret, 12.0 ) while( !target && ent > 0 ) { @@ -251,7 +252,7 @@ } if( target ) { - if( is_grabbed( target, id ) ) return PLUGIN_CONTINUE + if( is_grabbed( target, id ) ) return FMRES_IGNORED set_grabbed( id, target ) } } @@ -263,7 +264,7 @@ if( !pev_valid( target ) || ( pev( target, pev_health ) < 1 && pev( target, pev_max_health ) ) ) { unset_grabbed( id ) - return PLUGIN_CONTINUE + return FMRES_IGNORED } //Use key choke @@ -280,7 +281,7 @@ } if( client_data[id][GRABBER] > 0 ) grab_think( client_data[id][GRABBER] ) - return PLUGIN_CONTINUE + return FMRES_IGNORED } public grab_think ( id )