+#include "porto.qh"
#ifndef IMPLEMENTATION
CLASS(PortoLaunch, Weapon)
-/* ammotype */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none)
-/* impulse */ ATTRIB(PortoLaunch, impulse, int, 0)
+/* ammotype */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none);
+/* impulse */ ATTRIB(PortoLaunch, impulse, int, 0);
/* flags */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON);
/* rating */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
/* color */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
-#ifndef MENUQC
+#ifdef GAMEQC
/* model */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
#endif
/* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
if(move_out_of_solid(this))
{
this.flags = FL_ITEM;
+ IL_PUSH(g_items, this);
this.velocity = trigger_push_calculatevelocity(this.origin, this.realowner, 128);
tracetoss(this, this);
if(vdist(trace_endpos - this.realowner.origin, <, 128))
}
}
-void W_Porto_Attack(entity actor, float type)
+void W_Porto_Attack(entity actor, .entity weaponentity, float type)
{
entity gren;
- W_SetupShot(actor, false, 4, SND_PORTO_FIRE, CH_WEAPON_A, 0);
+ W_SetupShot(actor, weaponentity, false, 4, SND_PORTO_FIRE, CH_WEAPON_A, 0);
// always shoot from the eye
w_shotdir = v_forward;
w_shotorg = actor.origin + actor.view_ofs + ((w_shotorg - actor.origin - actor.view_ofs) * v_forward) * v_forward;
gren.angles = vectoangles(gren.velocity);
gren.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, gren);
+ IL_PUSH(g_bot_dodge, gren);
gren.portal_id = time;
actor.porto_current = gren;
if(!actor.porto_forbidden)
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(porto, refire)))
{
- W_Porto_Attack(actor, 0);
+ W_Porto_Attack(actor, weaponentity, 0);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(porto, animtime), w_ready);
}
if(!actor.porto_forbidden)
if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(porto, refire)))
{
- W_Porto_Attack(actor, 1);
+ W_Porto_Attack(actor, weaponentity, 1);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(porto, animtime), w_ready);
}
}
if(!actor.porto_forbidden)
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(porto, refire)))
{
- W_Porto_Attack(actor, -1);
+ W_Porto_Attack(actor, weaponentity, -1);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(porto, animtime), w_ready);
}
}
#endif
#ifdef CSQC
METHOD(PortoLaunch, wr_impacteffect, void(entity this, entity actor)) {
- LOG_WARN("Since when does Porto send DamageInfo?\n");
+ LOG_WARN("Since when does Porto send DamageInfo?");
}
#endif
#endif