ftt: bug fixes

This commit is contained in:
Jackzie 2021-10-05 17:03:43 -05:00
parent 5cf5b91603
commit 8e1dc263ad
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
4 changed files with 7 additions and 7 deletions

View file

@ -4,7 +4,7 @@
//Allow MAX_TROLLS to be defined elsewhere
#if defined MAX_TROLLS
#else
#define MAX_TROLLS 29
#define MAX_TROLLS 31
#endif
enum trollModifier {
@ -128,6 +128,9 @@ enum struct Troll {
Troll Trolls[MAX_TROLLS+1];
ArrayList categories;
static int categoryID = -1;
void ResetClient(int victim, bool wipe = true) {
if(wipe) {
ActiveTrolls[victim] = 0;
@ -140,8 +143,6 @@ void ResetClient(int victim, bool wipe = true) {
SDKUnhook(wpn, SDKHook_Reload, Event_WeaponReload);
}
ArrayList categories;
static int categoryID = -1;
int SetupTroll(const char[] name, const char description[128], int mods, bool flagsMultiselectable = false, int defaultFlags = 0) {
if(mods == 0) {
@ -324,7 +325,6 @@ bool ApplyAffect(int victim, const Troll troll, int activator, trollModifier mod
return true;
}
bool IsTrollActive(int client, const char[] troll) {
if(ActiveTrolls[client] == 0) return false;
static int i = 0;

View file

@ -42,7 +42,7 @@ bool ToggleMarkPlayer(int client, int target) {
Call_PushCell(target);
Call_Finish();
g_PendingBanTroll[target] = true;
EnableTroll(target, "NoProfanity");
EnableTroll(target, "No Profanity");
LogAction(client, target, "\"%L\" marked \"%L\" as troll", client, target);
ShowActivityEx(client, "[FTT] ", "marked %N as troll", target);
return true;

View file

@ -58,8 +58,8 @@ void SetupTrolls() {
// Initialize the default flag values to -1
for(int i = 0; i <= MAX_TROLLS; i++) {
for(int j = 1; j <= MAXPLAYERS+1; j++) {
for(int i = 0; i < MAX_TROLLS; i++) {
for(int j = 1; j <= MAXPLAYERS; j++) {
Trolls[i].activeFlagClients[j] = -1;
}
}