mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-11 03:25:15 +00:00
Fix some proj magnet issues
This commit is contained in:
parent
0b51fe19ad
commit
9d7b6add57
3 changed files with 2 additions and 3 deletions
Binary file not shown.
|
@ -418,7 +418,6 @@ bool IsTrollActive(int client, const char[] troll) {
|
||||||
}
|
}
|
||||||
static int i = 0;
|
static int i = 0;
|
||||||
if(trollKV.GetValue(troll, i)) {
|
if(trollKV.GetValue(troll, i)) {
|
||||||
PrintToChatAll("index: %d. val: %d", i, Trolls[i].activeFlagClients[client] );
|
|
||||||
return Trolls[i].activeFlagClients[client] != -1;
|
return Trolls[i].activeFlagClients[client] != -1;
|
||||||
}
|
}
|
||||||
ThrowError("Troll \"%s\" does not exist", troll);
|
ThrowError("Troll \"%s\" does not exist", troll);
|
||||||
|
|
|
@ -503,9 +503,9 @@ int GetRandomThrowableMagnetTarget(ProjectileMagnetType type, int owner = -1) {
|
||||||
ArrayList checkList = new ArrayList();
|
ArrayList checkList = new ArrayList();
|
||||||
for(int i = 1; i <= MaxClients; i++) {
|
for(int i = 1; i <= MaxClients; i++) {
|
||||||
if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && Trolls[throwMagnetIndex].IsActive(i)) {
|
if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && Trolls[throwMagnetIndex].IsActive(i)) {
|
||||||
if(type == ProjType_Survivors && owner != i) {
|
if(type == ProjType_Survivors) {
|
||||||
// If the projectile is not owned by player, check if troll flag not enabled
|
// If the projectile is not owned by player, check if troll flag not enabled
|
||||||
if(~Trolls[throwMagnetIndex].activeFlagClients[i] & view_as<int>(ProjType_Survivors)) continue;
|
if(owner != i && ~Trolls[throwMagnetIndex].activeFlagClients[i] & view_as<int>(ProjType_Survivors)) continue;
|
||||||
} else if(~Trolls[throwMagnetIndex].activeFlagClients[i] & view_as<int>(type)) {
|
} else if(~Trolls[throwMagnetIndex].activeFlagClients[i] & view_as<int>(type)) {
|
||||||
// Skip if client does not have flag
|
// Skip if client does not have flag
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue