tracetoss(this, this);
if(vdist(trace_endpos - this.realowner.origin, <, 128))
{
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
+ .entity weaponentity = this.weaponentity_fld;
W_ThrowNewWeapon(this.realowner, WEP_PORTO.m_id, 0, this.origin, this.velocity, weaponentity);
Send_Notification(NOTIF_ONE, this.realowner, MSG_CENTER, CENTER_PORTO_FAILED);
}
sound(this, CH_SHOTS, SND_PORTO_UNSUPPORTED, VOL_BASE, ATTEN_NORM);
delete(this);
}
- else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
+ else if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) || (trace_dphitcontents & DPCONTENTS_PLAYERCLIP))
{
spamsound(this, CH_SHOTS, SND(PORTO_BOUNCE), VOL_BASE, ATTEN_NORM);
// just reflect
//Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
gren = new(porto);
+ gren.weaponentity_fld = weaponentity;
gren.cnt = type;
gren.owner = gren.realowner = actor;
gren.playerid = actor.playerid;
void W_Seeker_Tracker_Think(entity this)
{
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
+ .entity weaponentity = this.weaponentity_fld;
// commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
if((IS_DEAD(this.realowner)) || (IS_DEAD(this.tag_target)) || (this.realowner.(weaponentity).m_switchweapon != WEP_SEEKER)
|| (time > this.tag_time + WEP_CVAR(seeker, tag_tracker_lifetime)))
PHYS_INPUT_BUTTON_ATCK(it) = true;
it.items |= IT_UNLIMITED_AMMO;
Weapon wep = WEP_VORTEX;
- .entity weaponentity = weaponentities[0]; // TODO: unhardcode
W_GiveWeapon(it, wep.m_id);
- W_SwitchWeapon_Force(it, wep, weaponentity);
+ W_SwitchWeapon_Force(it, wep, weaponentities[0]);
it = b;
PHYS_INPUT_BUTTON_JUMP(it) = true;