Closed HotoCocoaco closed 4 years ago
The stun effect of sandman has gone for a long time. I believe that it's fun to have it for FF2. Why not add a cvar to turn the stun on/off? There's already some sandman stun code below.
Allow players to stun boss with sandman.
forums.alliedmods.net
A simple cvar to turn it on/off
case 44: { if (cvarSandmanstun.BoolValue != 0) { decl Float:fClientLocation[3], Float:fClientEyePosition[3]; GetClientAbsOrigin(attacker, fClientEyePosition); GetClientAbsOrigin(client, fClientLocation); decl Float:fDistance[3]; MakeVectorFromPoints(fClientLocation, fClientEyePosition, fDistance); float dist = GetVectorLength(fDistance); //PrintToChat(attacker, "\x04Distance: %2.f", dist); //See the distances between the ball and the client. if (dist >= 128.0 && dist <= 256.0) { TF2_StunPlayer(client, 1.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 256.0 && dist < 512.0) { TF2_StunPlayer(client, 2.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 512.0 && dist < 768.0) { TF2_StunPlayer(client, 3.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 768.0 && dist < 1024.0) { TF2_StunPlayer(client, 4.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1024.0 && dist < 1280.0) { TF2_StunPlayer(client, 5.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1280.0 && dist < 1536.0) { TF2_StunPlayer(client, 6.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1536.0 && dist < 1792.0) { TF2_StunPlayer(client, 7.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1792.0) { TF2_StunPlayer(client, 7.0, 0.0, TF_STUNFLAGS_BIGBONK, attacker); } return Plugin_Changed; } else return Plugin_Changed; }
https://github.com/Batfoxkid/FreakFortressBat/commit/bb37db4afabee2323f5b6d48899d950f96387c39
Description
The stun effect of sandman has gone for a long time. I believe that it's fun to have it for FF2. Why not add a cvar to turn the stun on/off? There's already some sandman stun code below.
Applications
Allow players to stun boss with sandman.
Code Snippet
forums.alliedmods.net
Other Information
A simple cvar to turn it on/off
case 44: { if (cvarSandmanstun.BoolValue != 0) { decl Float:fClientLocation[3], Float:fClientEyePosition[3]; GetClientAbsOrigin(attacker, fClientEyePosition); GetClientAbsOrigin(client, fClientLocation); decl Float:fDistance[3]; MakeVectorFromPoints(fClientLocation, fClientEyePosition, fDistance); float dist = GetVectorLength(fDistance); //PrintToChat(attacker, "\x04Distance: %2.f", dist); //See the distances between the ball and the client. if (dist >= 128.0 && dist <= 256.0) { TF2_StunPlayer(client, 1.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 256.0 && dist < 512.0) { TF2_StunPlayer(client, 2.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 512.0 && dist < 768.0) { TF2_StunPlayer(client, 3.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 768.0 && dist < 1024.0) { TF2_StunPlayer(client, 4.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1024.0 && dist < 1280.0) { TF2_StunPlayer(client, 5.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1280.0 && dist < 1536.0) { TF2_StunPlayer(client, 6.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1536.0 && dist < 1792.0) { TF2_StunPlayer(client, 7.0, 0.0, TF_STUNFLAGS_SMALLBONK, attacker); } else if (dist >= 1792.0) { TF2_StunPlayer(client, 7.0, 0.0, TF_STUNFLAGS_BIGBONK, attacker); } return Plugin_Changed; } else return Plugin_Changed; }