proj = new(grenade);
proj.owner = self.owner;
proj.realowner = self.realowner;
- proj.team = self.owner.team;
+ proj.team = self.team;
proj.bot_dodge = true;
proj.bot_dodgerating = autocvar_g_nades_napalm_ball_damage;
proj.movetype = MOVETYPE_BOUNCE;
{
if ( autocvar_g_nades_ice_explode )
{
- entity expef = EFFECT_NADE_EXPLODE(self.realowner.team);
+ entity expef = EFFECT_NADE_EXPLODE(self.team);
Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
setorigin(healer, self.origin);
healer.healer_lifetime = autocvar_g_nades_heal_time; // save the cvar
healer.ltime = time + healer.healer_lifetime;
- healer.team = self.realowner.team;
+ healer.team = self.team;
healer.bot_dodge = false;
healer.solid = SOLID_TRIGGER;
healer.touch = nade_heal_touch;
case NADE_TYPE_MONSTER:
case NADE_TYPE_SPAWN:
nade_blast = false;
- switch(self.realowner.team)
+ switch(self.team)
{
case NUM_TEAM_1: expef = EFFECT_SPAWN_RED; break;
case NUM_TEAM_2: expef = EFFECT_SPAWN_BLUE; break;
default:
case NADE_TYPE_NORMAL:
- expef = EFFECT_NADE_EXPLODE(self.realowner.team);
+ expef = EFFECT_NADE_EXPLODE(self.team);
break;
}
this.health -= damage;
if ( this.nade_type != NADE_TYPE_HEAL.m_id || IS_PLAYER(attacker) )
+ {
+ this.team = attacker.team;
this.realowner = attacker;
+ }
if(this.health <= 0)
WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, nade_boom));
//setattachment(n, player, "bip01 l hand");
n.exteriormodeltoclient = player;
n.customizeentityforclient = nade_customize;
- n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(n.nade_type).m_projectile[false], player.team).eent_eff_name);
+ n.team = player.team;
+ n.traileffectnum = _particleeffectnum(Nade_TrailEffect(Nades_from(n.nade_type).m_projectile[false], n.team).eent_eff_name);
n.colormod = Nades_from(n.nade_type).m_color;
n.realowner = nowner;
n.colormap = player.colormap;