1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 15:17:57 -05:00

Titus-6: add projectile sound and fx

This commit is contained in:
Jbleezy
2024-04-19 16:09:11 -07:00
parent 49a0284d23
commit 493912ae06
8 changed files with 73 additions and 0 deletions

View File

@ -4,6 +4,7 @@
main()
{
replaceFunc(clientscripts\mp\zombies\_zm::init_wallbuy_fx, scripts\zm\replaced\_zm::init_wallbuy_fx);
replaceFunc(clientscripts\mp\zombies\_zm::entityspawned, scripts\zm\replaced\_zm::entityspawned);
replaceFunc(clientscripts\mp\zombies\_zm_audio::sndmeleeswipe, scripts\zm\replaced\_zm_audio::sndmeleeswipe);
replaceFunc(clientscripts\mp\zombies\_zm_weapons::init, scripts\zm\replaced\_zm_weapons::init);

View File

@ -0,0 +1,33 @@
main()
{
level._effect["dart_light"] = loadfx("weapon/titus/fx_titus_bolt_blink_os");
}
spawned(localclientnum)
{
player = getlocalplayer(localclientnum);
enemy = 0;
self.fxtagname = "tag_origin";
if (self.team != player.team)
enemy = 1;
self thread loop_local_sound(localclientnum, "wpn_titus_alert", 0.3, level._effect["dart_light"]);
}
loop_local_sound(localclientnum, alias, interval, fx)
{
self endon("entityshutdown");
while (true)
{
self playsound(localclientnum, alias);
n_id = playfxontag(localclientnum, fx, self, self.fxtagname);
wait(interval);
stopfx(localclientnum, n_id);
interval /= 1.2;
if (interval < 0.1)
interval = 0.1;
}
}

View File

@ -0,0 +1,7 @@
#include maps\_utility;
#include common_scripts\utility;
init()
{
loadfx("weapon/titus/fx_titus_bolt_blink_os");
}

View File

@ -43,4 +43,30 @@ init_wallbuy_fx()
if (isdefined(level.buildable_wallbuy_weapons))
level._effect["dynamic_wallbuy_fx"] = loadfx("maps/zombie/fx_zmb_wall_buy_question");
}
entityspawned(localclientnum)
{
if (!isdefined(self.type))
{
return;
}
if (self.type == "player")
self thread playerspawned(localclientnum);
if (self.type == "missile")
{
switch (self.weapon)
{
case "sticky_grenade_zm":
self thread clientscripts\mp\_sticky_grenade::spawned(localclientnum);
break;
case "titus6_explosive_dart_zm":
case "titus6_explosive_dart_upgraded_zm":
self thread scripts\zm\reimagined\_explosive_dart::spawned(localclientnum);
break;
}
}
}

View File

@ -4,4 +4,6 @@
main()
{
replaceFunc(clientscripts\mp\zm_nuked::main, scripts\zm\replaced\zm_nuked::main);
scripts\zm\reimagined\_explosive_dart::main();
}

View File

@ -11,6 +11,8 @@ main()
replaceFunc(maps\mp\zm_nuked_standard::main, scripts\zm\replaced\zm_nuked_standard::main);
replaceFunc(maps\mp\zm_nuked_perks::init_nuked_perks, scripts\zm\replaced\zm_nuked_perks::init_nuked_perks);
replaceFunc(maps\mp\zm_nuked_perks::perks_from_the_sky, scripts\zm\replaced\zm_nuked_perks::perks_from_the_sky);
scripts\zm\reimagined\_explosive_dart::init();
}
init()