Fix inconsistent naming

This commit is contained in:
Jackz 2023-10-10 08:57:06 -05:00
parent 7ae9f263d9
commit af910ea052
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
4 changed files with 15 additions and 15 deletions

Binary file not shown.

View file

@ -109,8 +109,8 @@ void EntityCreateCallback(int entity) {
SpawnItem("pipe_bomb", pos);
}
return;
} else if(Trolls[slipperyShoesIndex].IsActive(entOwner)) {
if(Trolls[slipperyShoesIndex].activeFlagClients[entOwner] & 4) {
} else if(Trolls[t_slipperyShoesIndex].IsActive(entOwner)) {
if(Trolls[t_slipperyShoesIndex].activeFlagClients[entOwner] & 4) {
L4D_StaggerPlayer(entOwner, entOwner, NULL_VECTOR);
}
return;
@ -130,14 +130,14 @@ enum ProjectileMagnetType {
public void Event_DoorToggle(Event event, const char[] name, bool dontBroadcast) {
int client = GetClientOfUserId(event.GetInt("userid"));
if(client && Trolls[slipperyShoesIndex].IsActive(client) && Trolls[slipperyShoesIndex].activeFlagClients[client] & 2) {
if(client && Trolls[t_slipperyShoesIndex].IsActive(client) && Trolls[t_slipperyShoesIndex].activeFlagClients[client] & 2) {
L4D_StaggerPlayer(client, client, NULL_VECTOR);
}
}
void Event_SecondaryHealthUsed(Event event, const char[] name, bool dontBroadcast) {
int client = GetClientOfUserId(event.GetInt("userid"));
if(client && Trolls[slipperyShoesIndex].IsActive(client) && Trolls[slipperyShoesIndex].activeFlagClients[client] & 8) {
if(client && Trolls[t_slipperyShoesIndex].IsActive(client) && Trolls[t_slipperyShoesIndex].activeFlagClients[client] & 8) {
L4D_StaggerPlayer(client, client, NULL_VECTOR);
}
}
@ -728,7 +728,7 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
}
// Inverted control code:
if(Trolls[invertedTrollIndex].IsActive(client)) {
if(Trolls[t_invertedTrollIndex].IsActive(client)) {
if(buttons & IN_MOVELEFT || buttons & IN_MOVERIGHT) {
vel[1] = -vel[1];
}
@ -787,7 +787,7 @@ Action Event_TakeDamage(int victim, int& attacker, int& inflictor, float& damage
SetSlot(victim, -1);
}
if(victim != attacker) {
if(damage > 0.0 && Trolls[slipperyShoesIndex].IsActive(victim) && Trolls[slipperyShoesIndex].activeFlagClients[victim] & 16) {
if(damage > 0.0 && Trolls[t_slipperyShoesIndex].IsActive(victim) && Trolls[t_slipperyShoesIndex].activeFlagClients[victim] & 16) {
L4D_StaggerPlayer(victim, victim, NULL_VECTOR);
}
if(isSameTeam && Trolls[t_reverseFFIndex].IsActive(attacker)) {
@ -1050,8 +1050,8 @@ public void L4D2_CInsectSwarm_CanHarm_Post(int acid, int spitter, int entity) {
public void Event_EnteredSpit(Event event, const char[] name, bool dontBroadcast) {
int client = GetClientOfUserId(event.GetInt("userid"));
if(Trolls[stickyGooIndex].IsActive(client)) {
int flags = Trolls[stickyGooIndex].activeFlagClients[client];
if(Trolls[t_stickyGooIndex].IsActive(client)) {
int flags = Trolls[t_stickyGooIndex].activeFlagClients[client];
float movement = 0.0;
if(flags & 1) movement = 0.9;
else if(flags & 2) movement = 0.8;

View file

@ -90,7 +90,7 @@ Action Timer_Main(Handle timer) {
if(Trolls[swarmIndex].IsActive(i)) {
L4D2_RunScript("RushVictim(GetPlayerFromUserID(%d), %d)", GetClientUserId(i), 15000);
}
if(Trolls[slipperyShoesIndex].IsActive(i) && Trolls[slipperyShoesIndex].activeFlagClients[i] & 1) {
if(Trolls[t_slipperyShoesIndex].IsActive(i) && Trolls[t_slipperyShoesIndex].activeFlagClients[i] & 1) {
if(GetRandomFloat() <= 0.4) {
L4D_StaggerPlayer(i, i, NULL_VECTOR);
}

View file

@ -1,8 +1,8 @@
// UP THE VALUE 'MAX_TROLLS' in base.inc before adding new ones!
int slipperyShoesIndex = 0;
int stickyGooIndex = 0;
int invertedTrollIndex;
int t_slipperyShoesIndex = 0;
int t_stickyGooIndex = 0;
int t_invertedTrollIndex;
int t_randomizeAnglesIndex;
int t_randomizeVelocityIndex;
int t_vomitPlayerIndex;
@ -52,7 +52,7 @@ void SetupTrolls() {
Trolls[index].AddFlag("50% Movement Speed", false);
Trolls[index].AddFlag("30% Movement Speed", false);
Trolls[index].AddFlag("0% Movement Speed", false);
stickyGooIndex = index;
t_stickyGooIndex = index;
index = SetupTroll("Vocalize Specials", "Spawn commons on special vocals", TrollMod_Constant)
Trolls[index].AddFlagPrompt(false);
Trolls[index].AddFlag("Mute Vocalization", true);
@ -209,7 +209,7 @@ void SetupTrolls() {
Trolls[index].AddFlag("30% Movement Speed", false);
Trolls[index].AddFlag("0% Movement Speed", false);
SetupTroll("Higher Gravity", "Sets player gravity to 1.3x of normal gravity", TrollMod_Constant);
invertedTrollIndex = SetupTroll("Inverted Controls", "Well, aint it obvious", TrollMod_Constant);
t_invertedTrollIndex = SetupTroll("Inverted Controls", "Well, aint it obvious", TrollMod_Constant);
SetupTroll("Stagger", "Like a slap, but different", TrollMod_Instant);
index = SetupTroll("Slippery Shoes", "Periodically stumbles around.", TrollMod_Constant);
Trolls[index].AddFlagPrompt(true);
@ -218,7 +218,7 @@ void SetupTrolls() {
Trolls[index].AddFlag("On throwable use", false);
Trolls[index].AddFlag("On pills/adrenaline use", false);
Trolls[index].AddFlag("On zombie bite", false);
slipperyShoesIndex = index;
t_slipperyShoesIndex = index;
index = SetupTroll("Randomize Angles", "Randomly change their angles", TrollMod_Constant);
Trolls[index].AddCustomFlagPrompt("Frequency:", false);
Trolls[index].AddFlag("Once in a while", true); //1