footsounds

This commit is contained in:
Your Name 2020-08-11 12:51:57 -06:00
parent d4831e69c1
commit 71083f0f77
3 changed files with 54 additions and 8 deletions

View File

@ -87,6 +87,7 @@ init()
level.bots_nonfullautoguns["striker"] = true;
level.bots_nonfullautoguns["usp"] = true;
level.bots_nonfullautoguns["wa2000"] = true;
level.bots_nonfullautoguns["dragunov"] = true;
level.bots_bloodfx = loadfx("impacts/flesh_hit_body_fatal_exit");

View File

@ -430,9 +430,11 @@ moveHack()
self.bot.last_pos = self.origin;
self.bot.moveTo = self.origin;
for (timer = 0;;timer += 0.05)
timer = 0;
for (;;)
{
wait 0.05;
timer += 0.05;
self.bot.velocity = (self.origin-self.bot.last_pos)*20;
self.bot.last_pos = self.origin;
@ -517,7 +519,44 @@ moveHack()
moveSpeed *= self.moveSpeedScaler;
self.bot.script_move_speed = moveSpeed;
// self bots_hasPerk("specialty_quieter")
// do foot sound
if ((moveSpeed > 0) && ((3.5 / moveSpeed) <= timer))
{
timer = 0;
if (!self _hasPerk("specialty_quieter"))
{
if (self.bot.climbing)
self playSound( "step_run_ladder" );
else
{
myOg = self getOrigin();
trace = bullettrace( myOg, myOg + (0.0, 0.0, -5.0), false, self );
if (trace[ "surfacetype" ] != "none")
{
if (inLastStand)
self playSound( "step_prone_" + trace[ "surfacetype" ] );
else
{
switch( stance )
{
case "stand":
self playSound( "step_run_" + trace[ "surfacetype" ] );
break;
case "crouch":
self playSound( "step_walk_" + trace[ "surfacetype" ] );
break;
case "prone":
self playSound( "step_prone_" + trace[ "surfacetype" ] );
break;
}
}
}
}
}
}
moveTo = self.bot.moveTo;

View File

@ -196,6 +196,9 @@ getSecondaries()
weapon_name = tableLookupByRow( "mp/statstable.csv", i, 4 );
if (weapon_name == "gl")
continue;
secondaries[secondaries.size] = weapon_name;
}
@ -231,6 +234,12 @@ getPerks(perktype)
perk_name = tableLookupByRow( "mp/perktable.csv", i, 1 );
if (perk_name == "specialty_c4death")
continue;
if (perk_name == "_specialty_blastshield")
continue;
perks[perks.size] = perk_name;
}
@ -255,6 +264,9 @@ getKillstreaks()
if(streak_name == "b1")
continue;
if(streak_name == "sentry") // theres an airdrop version
continue;
if (isSubstr(streak_name, "KILLSTREAKS_"))
continue;
@ -275,12 +287,6 @@ chooseRandomPerk(perkkind)
if (perk == "specialty_null")
continue;
if (perk == "specialty_c4death")
continue;
if (perk == "_specialty_blastshield")
continue;
if (!self isItemUnlocked(perk))
continue;