Update plugins

This commit is contained in:
Jackz 2023-08-04 11:42:05 -05:00
parent 2c99586be1
commit daa3b26a4d
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
19 changed files with 611 additions and 298 deletions

View file

@ -11,6 +11,25 @@ public Action Timer_ThrowTimer(Handle timer) {
}
int instantCommonRef[MAXPLAYERS+1];
Action Timer_RandomVelocity(Handle h, int client) {
if(!IsClientConnected(client)) {
Trolls[t_randomizeVelocityIndex].timerHandles[client] = null;
return Plugin_Stop;
}
float bounds = 50.0;
if(Trolls[t_randomizeAnglesIndex].activeFlagClients[client] & 2) bounds = 100.0;
else if(Trolls[t_randomizeAnglesIndex].activeFlagClients[client] & 4) bounds = 200.0;
else if(Trolls[t_randomizeAnglesIndex].activeFlagClients[client] & 8) bounds = 500.0;
else if(Trolls[t_randomizeAnglesIndex].activeFlagClients[client] & 16) bounds = 1000.0;
float vel[3];
GetEntPropVector(client, Prop_Data, "m_vecVelocity", vel);
vel[0] += GetRandomFloat(-bounds, bounds);
vel[1] += GetRandomFloat(-bounds, bounds);
vel[2] += GetRandomFloat(-100.0, 150.0);
SetAbsVelocity(client, vel);
return Plugin_Continue;
}
public Action Timer_Main(Handle timer) {
static int loopTick;
@ -40,6 +59,19 @@ public Action Timer_Main(Handle timer) {
TeleportEntity(i, NULL_VECTOR, ang, NULL_VECTOR);
}
}
if(Trolls[t_randomizeVelocityIndex].IsActive(i)) {
float bounds = 50.0;
if(Trolls[t_randomizeVelocityIndex].activeFlagClients[i] & 2) bounds = 100.0;
else if(Trolls[t_randomizeVelocityIndex].activeFlagClients[i] & 4) bounds = 200.0;
else if(Trolls[t_randomizeVelocityIndex].activeFlagClients[i] & 8) bounds = 500.0;
else if(Trolls[t_randomizeVelocityIndex].activeFlagClients[i] & 16) bounds = 1000.0;
float vel[3];
GetEntPropVector(i, Prop_Data, "m_vecVelocity", vel);
vel[0] += GetRandomFloat(-bounds, bounds);
vel[1] += GetRandomFloat(-bounds, bounds);
vel[2] += GetRandomFloat(-100.0, 150.0);
SetAbsVelocity(i, vel);
}
if(Trolls[slowDrainIndex].IsActive(i)) {
if(loopTick % 4 == 0) {
int hp = GetClientHealth(i);