Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Oct 4, 2023
1 parent a261518 commit ec95286
Show file tree
Hide file tree
Showing 40 changed files with 109 additions and 1,819 deletions.
113 changes: 1 addition & 112 deletions boss_heavy_kommisarkrit.sp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
#define SOUND_WINDUP ")mvm/giant_heavy/giant_heavy_gunwindup.wav"
#define SOUND_WINDDOWN ")mvm/giant_heavy/giant_heavy_gunwinddown.wav"

#define LEFTFOOT ")mvm/giant_heavy/giant_heavy_step01.wav"
#define LEFTFOOT1 ")mvm/giant_heavy/giant_heavy_step03.wav"
#define RIGHTFOOT ")mvm/giant_heavy/giant_heavy_step02.wav"
#define RIGHTFOOT1 ")mvm/giant_heavy/giant_heavy_step04.wav"


#define Uclanka 840
#define CommisarsCoat 30633
#define TheLittleBear 1097
Expand All @@ -45,7 +39,7 @@ float scale = 1.85;

public Plugin:myinfo =
{
name = "[TF2] Be the Giant Deflector Heavy",
name = "[TF2] Be the Giant Kommisar Krit Heavy",
author = "Erofix using the code from: Pelipoika, PC Gamer, Jaster and StormishJustice",
description = "Play as the Giant Deflector Heavy from MvM",
version = PLUGIN_VERSION,
Expand All @@ -61,8 +55,6 @@ public OnPluginStart()
{
LoadTranslations("common.phrases");

AddNormalSoundHook(BossGPS);

RobotDefinition robot;
robot.name = ROBOT_NAME;
robot.role = ROBOT_ROLE;
Expand All @@ -89,112 +81,9 @@ public OnPluginStart()
restrictions.RobotCoins.PerRobot = 4.0;

AddRobot(robot, MakeBigBigJoey, PLUGIN_VERSION, restrictions);


}

public Action:BossGPS(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
if (!IsValidClient(entity)) return Plugin_Continue;
if (!IsRobot(entity, ROBOT_NAME)) return Plugin_Continue;

if (strncmp(sample, "player/footsteps/", 17, false) == 0)
{
if (StrContains(sample, "1.wav", false) != -1)
{
Format(sample, sizeof(sample), LEFTFOOT);
EmitSoundToAll(sample, entity);
}
else if (StrContains(sample, "3.wav", false) != -1)
{
Format(sample, sizeof(sample), RIGHTFOOT);
EmitSoundToAll(sample, entity);
}
else if (StrContains(sample, "2.wav", false) != -1)
{
Format(sample, sizeof(sample), LEFTFOOT1);
EmitSoundToAll(sample, entity);
}
else if (StrContains(sample, "4.wav", false) != -1)
{
Format(sample, sizeof(sample), RIGHTFOOT);
EmitSoundToAll(sample, entity);
}
return Plugin_Changed;
}
return Plugin_Continue;
}

public Action:OnPlayerRunCmd(iClient, &iButtons, &iImpulse, Float:fVel[3], Float:fAng[3], &iWeapon)
{
if (IsValidClient(iClient) && IsRobot(iClient, ROBOT_NAME) && IsPlayerAlive(iClient))
{
new weapon = GetPlayerWeaponSlot(iClient, TFWeaponSlot_Primary);
iWeapon = GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex");

if(IsValidEntity(weapon) && iWeapon == 298)//424== tomislav
{
new iWeaponState = GetEntProp(weapon, Prop_Send, "m_iWeaponState");
if (iWeaponState == 1 && !Locked1[iClient])
{
EmitSoundToAll(SOUND_WINDUP, iClient);
// PrintToChatAll("WeaponState = Windup");

Locked1[iClient] = true;
Locked2[iClient] = false;
Locked3[iClient] = false;
CanWindDown[iClient] = true;

StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNSPIN);
StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNFIRE);
}
else if (iWeaponState == 2 && !Locked2[iClient])
{
EmitSoundToAll(SOUND_GUNFIRE, iClient);
// PrintToChatAll("WeaponState = Firing");

Locked2[iClient] = true;
Locked1[iClient] = true;
Locked3[iClient] = false;
CanWindDown[iClient] = true;

StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNSPIN);
StopSound(iClient, SNDCHAN_AUTO, SOUND_WINDUP);
}
else if (iWeaponState == 3 && !Locked3[iClient])
{
EmitSoundToAll(SOUND_GUNSPIN, iClient);
// PrintToChatAll("WeaponState = Spun Up");

Locked3[iClient] = true;
Locked1[iClient] = true;
Locked2[iClient] = false;
CanWindDown[iClient] = true;

StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNFIRE);
StopSound(iClient, SNDCHAN_AUTO, SOUND_WINDUP);
}
else if (iWeaponState == 0)
{
if (CanWindDown[iClient])
{
// PrintToChatAll("WeaponState = WindDown");
EmitSoundToAll(SOUND_WINDDOWN, iClient);
CanWindDown[iClient] = false;
}

StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNSPIN);
StopSound(iClient, SNDCHAN_AUTO, SOUND_GUNFIRE);

Locked1[iClient] = false;
Locked2[iClient] = false;
Locked3[iClient] = false;
}
}
}
return Plugin_Continue;
}

public void OnPluginEnd()
{
RemoveRobot(ROBOT_NAME);
Expand Down
2 changes: 1 addition & 1 deletion free_damage_flames_wizard_pyro_fire_wizard.sp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ stock GiveGiantPyro(client)
TF2Attrib_SetByName(Weapon3, "melee range multiplier", 1.25);
TF2Attrib_SetByName(Weapon3, "speed_boost_on_hit", 1.0);
TF2Attrib_SetByName(Weapon3, "crit vs burning players", 1.0);
F2Attrib_SetByName(Weapon1, "dmg penalty vs buildings", 0.5);
TF2Attrib_SetByName(Weapon3, "dmg penalty vs buildings", 0.5);
TF2CustAttr_SetString(client, "Spell-Caster", "Spell=0 Cooldown=7.0 SpellOnCond=9 Cond=11");


Expand Down
76 changes: 3 additions & 73 deletions free_damage_grenades_demoman_LED.sp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
#define DEATH "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
#define LOOP "mvm/giant_demoman/giant_demoman_loop.wav"

// #define GUNFIRE ")mvm/giant_demoman/giant_demoman_grenade_shoot.wav"

#define LEFTFOOT ")mvm/giant_demoman/giant_demoman_step_01.wav"
#define LEFTFOOT1 ")mvm/giant_demoman/giant_demoman_step_03.wav"
#define RIGHTFOOT ")mvm/giant_demoman/giant_demoman_step_02.wav"
#define RIGHTFOOT1 ")mvm/giant_demoman/giant_demoman_step_04.wav"

public Plugin:myinfo =
{
name = "[TF2] Be the Giant Major Bomber lite",
Expand Down Expand Up @@ -59,46 +52,6 @@ public OnPluginStart()
AddRobot(robot, MakeSolar, PLUGIN_VERSION);
}

public Action:BossMortar(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
if (!IsValidClient(entity)) return Plugin_Continue;
if (!IsRobot(entity, ROBOT_NAME)) return Plugin_Continue;

if (strncmp(sample, "player/footsteps/", 17, false) == 0)
{
if (StrContains(sample, "1.wav", false) != -1)
{
EmitSoundToAll(LEFTFOOT, entity);
}
else if (StrContains(sample, "3.wav", false) != -1)
{
EmitSoundToAll(LEFTFOOT1, entity);
}
else if (StrContains(sample, "2.wav", false) != -1)
{
EmitSoundToAll(RIGHTFOOT, entity);
}
else if (StrContains(sample, "4.wav", false) != -1)
{
EmitSoundToAll(RIGHTFOOT1, entity);
}
return Plugin_Changed;
}

// if (strncmp(sample, ")weapons/", 9, false) == 0)
// {
// if (StrContains(sample, "grenade_launcher_shoot.wav", false) != -1)
// {
// Format(sample, sizeof(sample), GUNFIRE);
// EmitSoundToAll(sample, entity,_,_,_, 0.07);
// // PrintToChatAll("SOUND!--");
// return Plugin_Changed;
// }

// }
return Plugin_Continue;
}

public void OnPluginEnd()
{
RemoveRobot(ROBOT_NAME);
Expand All @@ -111,22 +64,6 @@ public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
return APLRes_Success;
}

public OnMapStart()
{
//
// PrecacheSound(SPAWN);
// PrecacheSound(DEATH);
// PrecacheSound(LOOP);

// PrecacheSound(LEFTFOOT);
// PrecacheSound(LEFTFOOT1);
//
//

// PrecacheSound(GUNFIRE);

}

public Action:SetModel(client, const String:model[])
{
if (IsValidClient(client) && IsPlayerAlive(client))
Expand Down Expand Up @@ -173,7 +110,6 @@ MakeSolar(client)
TF2Attrib_SetByName(client, "cancel falling damage", 1.0);
TF2Attrib_SetByName(client, "patient overheal penalty", 0.15);
TF2Attrib_SetByName(client, "self dmg push force increased", 2.0);
//TF2Attrib_SetByName(client, "override footstep sound set", 4.0);
TF2Attrib_SetByName(client, "charge impact damage increased", 1.5);
TF2Attrib_SetByName(client, "ammo regen", 100.0);
TF2Attrib_SetByName(client, "rage giving scale", 0.85);
Expand Down Expand Up @@ -215,19 +151,17 @@ stock GiveGiantDemoKnight(client)


CreateRoboWeapon(client, "tf_weapon_grenadelauncher", 206, 9, 1, 2, 0);
//CreateRoboWeapon(client, "tf_weapon_stickbomb", 307, 6, 1, 2, 0);

CreateRoboHat(client, Tartan, 10, 6, 15185211.0, 0.75, -1.0);
CreateRoboHat(client, Bombardier, 10, 6, 15185211.0, 0.75, -1.0);
CreateRoboHat(client, Dustcatcher, 10, 6, 15185211.0, 0.75, -1.0);
//CreateHat(client, 306, 10, 6, true);//Scotch bonnet
//CreateHat(client, 30945, 10, 6, false);//blast locker

TF2CustAttr_SetString(client, "projectile-size", "size=1.35 update-hitbox=1");
int Weapon1 = GetPlayerWeaponSlot(client, TFWeaponSlot_Primary);
// int Weapon3 = GetPlayerWeaponSlot(client, TFWeaponSlot_Melee);

if(IsValidEntity(Weapon1))
{
//TF2Attrib_RemoveAll(Weapon1);

TF2CustAttr_SetString(Weapon1, "reload full clip at once", "1.0");
TF2Attrib_SetByName(Weapon1, "is australium item", 1.0);
TF2Attrib_SetByName(Weapon1, "dmg penalty vs players", 0.9);
Expand All @@ -239,11 +173,7 @@ stock GiveGiantDemoKnight(client)
TF2Attrib_SetByName(Weapon1, "dmg bonus vs buildings", 0.5);

TF2Attrib_SetByName(Weapon1, "fire rate bonus", 0.75);
// TF2Attrib_SetByName(Weapon1, "mod use metal ammo type", 1.0);

// TF2CustAttr_SetString(Weapon1, "homing_proj_mvm", "detection_radius=1500.0 homing_mode=0 projectilename=tf_projectile_pipe");


}
}
}
Expand Down
5 changes: 0 additions & 5 deletions free_damage_grenades_demoman_carpetomber.sp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
#define DEATH "mvm/sentrybuster/mvm_sentrybuster_explode.wav"
#define LOOP "mvm/giant_demoman/giant_demoman_loop.wav"

#define LEFTFOOT ")mvm/giant_demoman/giant_demoman_step_01.wav"
#define LEFTFOOT1 ")mvm/giant_demoman/giant_demoman_step_03.wav"
#define RIGHTFOOT ")mvm/giant_demoman/giant_demoman_step_02.wav"
#define RIGHTFOOT1 ")mvm/giant_demoman/giant_demoman_step_04.wav"

bool Mirv[MAXPLAYERS+1];
ConVar PipeCount;
ConVar PipeDamage;
Expand Down
Loading

0 comments on commit ec95286

Please sign in to comment.