mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 17:33:21 +00:00
Change antirush freq values to cvar
This commit is contained in:
parent
bac6f4ea65
commit
78f44b0733
7 changed files with 13 additions and 13 deletions
|
@ -469,7 +469,7 @@ public int Native_ApplyTroll(Handle plugin, int numParams) {
|
|||
|
||||
int index = GetTrollID(name);
|
||||
if(index > 0) {
|
||||
Trolls[index].Activate(victim, activator, modifier, flags, GetNativeCell(7));
|
||||
Trolls[index].Activate(victim, activator, modifier, flags, GetNativeCell(6));
|
||||
} else {
|
||||
ThrowNativeError(SP_ERROR_NATIVE, "Could not find troll with name \"%s\"", name);
|
||||
}
|
||||
|
|
|
@ -984,10 +984,10 @@ public bool TraceEntityFilterPlayer(int entity, int mask, any data) {
|
|||
|
||||
// TODO: Increase the frequency of spawns the longer they are in antirush. Possibly increase int and decrease over time
|
||||
public Action OnAntiRush(int client, int &type, float distance) {
|
||||
if(client && client > 0 && client <= MaxClients && type == 3 && IsPlayerAlive(client) && !IsPlayerIncapped(client)) {
|
||||
if(GetGameTime() - fLastAntiRushEvent[client] > ANTI_RUSH_DEFAULT_FREQUENCY - fAntiRushFrequencyCounter[client]) {
|
||||
if(fAntiRushFrequencyCounter[client] < ANTI_RUSH_DEFAULT_FREQUENCY) {
|
||||
fAntiRushFrequencyCounter[client] += ANTI_RUSH_FREQ_INC;
|
||||
if(client && client > 0 && client <= MaxClients && type == 3 && !IsFakeClient(client) && IsPlayerAlive(client) && !IsPlayerIncapped(client)) {
|
||||
if(GetGameTime() - fLastAntiRushEvent[client] > hAntirushBaseFreq.FloatValue - fAntiRushFrequencyCounter[client]) {
|
||||
if(fAntiRushFrequencyCounter[client] < hAntirushBaseFreq.FloatValue) {
|
||||
fAntiRushFrequencyCounter[client] += hAntirushIncFreq.FloatValue;
|
||||
}
|
||||
SpecialType special = view_as<SpecialType>(GetRandomInt(1,6));
|
||||
fLastAntiRushEvent[client] = GetGameTime();
|
||||
|
|
|
@ -130,12 +130,12 @@ void LoadPhrases() {
|
|||
PrintToServer("[FTT] Could not load phrase list from data/ftt_phrases.cfg");
|
||||
return;
|
||||
}
|
||||
static char word[32];
|
||||
char word[32];
|
||||
char phrase[MAX_PHRASE_LENGTH];
|
||||
// Go through all the words:
|
||||
kv.GotoFirstSubKey();
|
||||
int i = 0;
|
||||
static char buffer[4];
|
||||
char buffer[4];
|
||||
do {
|
||||
kv.GetSectionName(word, sizeof(word));
|
||||
StringToLower(word);
|
||||
|
|
|
@ -466,8 +466,4 @@ bool ApplyAffect(int victim, const Troll troll, int activator, trollModifier mod
|
|||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Filter_IgnorePlayer(int entity, int contentsMask, any data) {
|
||||
return entity != data;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue