| outsiderlv |
12-01-2010 11:50 |
index out of bounds
PHP Code:
public fm_FEFindEntityInSphere(start, Float:origin[3], Float:radius) { if( radius!=1500.0 || old_gametime!=get_gametime() ) return FMRES_IGNORED; static hit, trace, Float:user_origin[3], Float:absmax[3], Float:fraction; hit = start; // run the same check to see what its result will be while( (hit=engfunc(EngFunc_FindEntityInSphere, hit, origin, radius))>0 ) { if(no_flash[hit]) { // hit a non- or dead-player if( !is_user_alive(hit) ) { forward_return(FMV_CELL, hit); return FMRES_SUPERCEDE; } // aim for the body eyes pev(hit, pev_origin, user_origin); pev(hit, pev_absmax, absmax); user_origin[2] = (absmax[2]-20.0); engfunc(EngFunc_TraceLine, origin, user_origin, DONT_IGNORE_MONSTERS, 0, trace); // hit player eyes, grenade ok if( get_tr2(trace, TR_pHit)==hit ) { // start backup check (de_dust2 B bug - outmap bug) engfunc(EngFunc_TraceLine, user_origin, origin, DONT_IGNORE_MONSTERS, hit, trace); // hit player eyes with backup check get_tr2(trace, TR_flFraction, fraction); if( fraction==1.0 ) { if(owner) { forward_return(FMV_CELL, -1); return FMRES_SUPERCEDE; } } } } } // grenade could not hit anyones eyes, cancel the check forward_return(FMV_CELL, -1); return FMRES_SUPERCEDE; }
Where is the problem? Debug says that the problem is on line witch contains only "{".
|