Fix some ftt bugs

This commit is contained in:
Jackzie 2022-05-12 10:45:15 -05:00
parent caf5e95fd1
commit 29b7d12060
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
4 changed files with 7 additions and 12 deletions

View file

@ -486,7 +486,6 @@ public Action Event_ItemPickup(int client, int weapon) {
}
}
} else if(Trolls[SpicyGasIndex].IsActive(client)) {
PrintToChat(client, "spice active");
if(GetEntityClassname(weapon, wpnName, sizeof(wpnName))) {
float max = 1.0;
if(Trolls[SpicyGasIndex].activeFlagClients[client] & 2) max = 0.5;
@ -495,7 +494,7 @@ public Action Event_ItemPickup(int client, int weapon) {
if(StrEqual(wpnName, "weapon_gascan")) {
AcceptEntityInput(weapon, "Ignite", client, client);
} else if(StrEqual(wpnName, "weapon_propanetank") || StrEqual(wpnName, "weapon_oxygentank")) {
ExplodeProjectile(weapon);
ExplodeProjectile(weapon, false);
}
}
}
@ -568,10 +567,6 @@ public Action Event_TakeDamage(int victim, int& attacker, int& inflictor, float&
if(reverseFF == 0) reverseFF = GetTrollID("Reverse FF");
if(attacker > 0 && attacker <= MaxClients && GetClientTeam(attacker) == 4 && IsFakeClient(attacker)) return Plugin_Continue;
if (victim > 0 && victim <= MaxClients && damagetype != 263168 && damagetype != 265216) {
PrintToChat(victim, "you are in spit.");
}
if(attacker > 0 && victim <= MaxClients && attacker <= MaxClients && IsClientInGame(attacker) && IsPlayerAlive(attacker)) {
if(shootAtTarget[attacker] == victim) return Plugin_Continue;
if(g_PendingBanTroll[attacker] > 0 && GetClientTeam(attacker) == 2 && GetClientTeam(victim) == 2) {

View file

@ -370,9 +370,10 @@ bool SetBotTarget(int bot, int target, int targetHP, int loops = 15) {
}
// Taken from https://forums.alliedmods.net/showthread.php?t=220132&page=2
stock void ExplodeProjectile(int entity) {
SetEntProp(entity, Prop_Data, "m_takedamage", 2);
SetEntProp(entity, Prop_Data, "m_iHealth", 1);
SDKHooks_TakeDamage(entity, 0, 0, 1.0);
SetEntProp(entity, Prop_Data, "m_nNextThinkTick", 1); //for smoke
stock void ExplodeProjectile(int entity, bool smoke = true) {
SetEntProp(entity, Prop_Data, "m_takedamage", 2);
SetEntProp(entity, Prop_Data, "m_iHealth", 1);
SDKHooks_TakeDamage(entity, 0, 0, 1.0);
if(smoke)
SetEntProp(entity, Prop_Data, "m_nNextThinkTick", 1); //for smoke
}

View file

@ -239,7 +239,6 @@ bool ApplyAffect(int victim, const Troll troll, int activator, trollModifier mod
} else if(StrEqual(troll.name, "Amazon Special Combo")) {
SpecialSpawnFlags spawnFlag = Special_Anywhere;
if(flags & (1 << 8)) spawnFlag = Special_OnTarget;
PrintToChatAll("spawnFlag: %d", spawnFlag);
for(int i = 1; i < 7; i++) {
if(flags & (1 << i)) {
SpawnSpecialForTarget(view_as<SpecialType>(i), victim, spawnFlag);