Открой файл race_orc.inl
Найди в файле public _OR_ULT_ChainLightning( parm[5] )
и замени всю эту функцию на код приведенный ниже.
Code
// Called on subsequent ultimate calls ( i.e. lightninghitnext )
public _OR_ULT_ChainLightning( parm[5] )
{
// parm[0] = enemy
// parm[1] = damage
// parm[2] = linewidth
// parm[3] = caster
// parm[4] = bodypart
new iEnemy = parm[0];
if ( !p_data_b[iEnemy][PB_ISCONNECTED] )
{
return;
}
new iCaster = parm[3];
new iBodyPart = parm[4];
new iCasterTeam = get_user_team( iCaster )
new vOrigin[3];
get_user_origin( iEnemy, vOrigin );
new iTarget = parm[0];
new iClosestTarget = 0, iClosestDistance = 0;
new iDistanceBetween = 0;
new vTargetOrigin[3];
// Make sure our target player isn't on the same team!
if ( get_user_team( iTarget ) != iCasterTeam )
{
get_user_origin( iTarget, vTargetOrigin )
iDistanceBetween = get_distance( vOrigin, vTargetOrigin );
// Verify the user is within range and has not been previously hit
if ( iDistanceBetween < LIGHTNING_RANGE && !p_data_b[iTarget][PB_LIGHTNINGHIT] )
{
// Make sure target isn't immune!
if ( ULT_CanUserBlockUlt( iTarget ) )
{
ULT_RemoveCharge( iTarget, 4 );
// Let the caster know the ultimate was blocked!
ULT_Blocked( iCaster );
// Just say the user was hit so they aren't tried to be hit the next round (possibility of removing multiple charges)
p_data_b[iTarget][PB_LIGHTNINGHIT] = true;
}
// Then we can hit this user!
else
{
// This user is closest!! Lets make a note of this...
if ( iDistanceBetween < iClosestDistance || iClosestTarget == 0 )
{
iClosestDistance = iDistanceBetween;
iClosestTarget = iTarget;
}
}//end immune check
}//end distance/hit check
}//end team check
new players[32], numberofplayers;
get_players( players, numberofplayers, "a" );
// Then we have a valid target!!!
if ( iClosestTarget )
{
// Damage should be decreased by 2/3 on each jump
parm[1] = floatround(float(parm[2])*2/3);
// Decrease line width as well
parm[2] = floatround(float(parm[2])*2/3);
// Display the actual lightning
OR_ULT_ChainEffect( iCaster, iClosestTarget, parm[2], parm[1], iBodyPart );
// Lets call this again on our next target!
parm[0] = iClosestTarget;
set_task( 0.2, "_OR_ULT_ChainLightning", TASK_LIGHTNINGNEXT + iCaster, parm, 5 );
}
// No valid target found - reset all lightning hit variables
else
{
for (new i = 0; i < numberofplayers; i++ )
{
iTarget = players[i];
p_data_b[iTarget][PB_LIGHTNINGHIT] = false;
}
}
return;
}