newproj.event_damage = this.event_damage;
newproj.spawnshieldtime = this.spawnshieldtime;
newproj.damagedbycontents = true;
+ IL_PUSH(g_damagedbycontents, newproj);
set_movetype(newproj, MOVETYPE_NONE); // lock the orb in place
newproj.projectiledeathtype = this.projectiledeathtype;
IL_PUSH(g_projectiles, proj);
IL_PUSH(g_bot_dodge, proj);
proj.damagedbycontents = (WEP_CVAR_SEC(electro, damagedbycontents));
+ if(proj.damagedbycontents)
+ IL_PUSH(g_damagedbycontents, proj);
proj.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor);
proj.bouncestop = WEP_CVAR_SEC(electro, bouncestop);
.float bot_secondary_electromooth;
-METHOD(Electro, wr_aim, void(entity thiswep, entity actor))
+METHOD(Electro, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
{
PHYS_INPUT_BUTTON_ATCK(actor) = PHYS_INPUT_BUTTON_ATCK2(actor) = false;
if(vdist(actor.origin - actor.enemy.origin, >, 1000)) { actor.bot_secondary_electromooth = 0; }
float shoot;
if(WEP_CVAR_PRI(electro, speed))
- shoot = bot_aim(actor, WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), false);
+ shoot = bot_aim(actor, weaponentity, WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), false);
else
- shoot = bot_aim(actor, 1000000, 0, 0.001, false);
+ shoot = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false);
if(shoot)
{
}
else
{
- if(bot_aim(actor, WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), true))
+ if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), true))
{
PHYS_INPUT_BUTTON_ATCK2(actor) = true;
if(random() < 0.03) actor.bot_secondary_electromooth = 0;