void Spawn_Draw(entity this)
{
+ if(this.alpha <= 0)
+ return;
+
__pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
}
float alph;
vector org = getpropertyvec(VF_ORIGIN);
if(this.fade_start)
- alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+ {
+ if(vdist(org - this.origin, >, this.fade_end))
+ alph = 0; // save on some processing
+ else if(vdist(org - this.origin, <, this.fade_start))
+ alph = 1; // more processing saved
+ else
+ alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+ }
else
alph = 1;
//printf("%v <-> %v\n", view_origin, this.origin + 0.5 * (this.mins + this.maxs));
e.csqcmodel_effects = fx;
CSQCModel_Effects_Apply(e);
}
+ if(a >= 0)
{
string name = wep.mdl;
string newname = wep.wr_viewmodel(wep, this);
GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":",
ftos(etof(player)),":",player.netname));
minigame_session.minigame_players = p.list_next;
- delete ( p );
+ delete( p );
player_clear_minigame(player);
}
else
Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1);
RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, directhitentity);
- delete (this);
+ delete(this);
}
void M_Mage_Attack_Spike_Touch(entity this, entity toucher)
RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, directhitentity);
- delete (this);
+ delete(this);
}
void W_RocketPropelledChainsaw_Explode_think(entity this)
}
float alph;
vector org = getpropertyvec(VF_ORIGIN);
- if(!checkpvs(org, this)) // this makes sense as long as we don't support recursive warpzones
- alph = 0;
- else if(this.fade_start)
- alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+ //if(!checkpvs(org, this)) // this makes sense as long as we don't support recursive warpzones
+ //alph = 0; // this shouldn't be needed, since items behind walls are culled anyway
+ if(this.fade_start)
+ {
+ if(vdist(org - this.origin, >, this.fade_end))
+ alph = 0; // save on some processing
+ else if(vdist(org - this.origin, <, this.fade_start))
+ alph = 1; // more processing saved
+ else
+ alph = bound(0, (this.fade_end - vlen(org - this.origin - 0.5 * (this.mins + this.maxs))) / (this.fade_end - this.fade_start), 1);
+ }
else
alph = 1;
//printf("%v <-> %v\n", view_origin, this.origin + 0.5 * (this.mins + this.maxs));
_sound (toucher, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM);
if (this.classname == "droppedweapon")
- delete (this);
+ delete(this);
else if (this.spawnshieldtime)
{
entity e;
if(!have_pickup_item(this))
{
startitem_failed = true;
- delete (this);
+ delete(this);
return;
}
// target_give not yet supported; maybe later
print("removed targeted ", this.classname, "\n");
startitem_failed = true;
- remove (this);
+ delete(this);
return;
}
*/
else
{
// remove
- delete (ent);
+ delete(ent);
}
}
multi_wait(this); // waiting finished
}
else
- { // we can't just remove (this) here, because this is a touch function
+ { // we can't just delete(this) here, because this is a touch function
// called while C code is looping through area links...
settouch(this, func_null);
}
// handle normal trigger features
multi_touch(this, toucher);
- // we can't just remove (this) here, because this is a touch function
+ // we can't just delete(this) here, because this is a touch function
// called while C code is looping through area links...
//delete(this);
}
void walker_rocket_explode(entity this)
{
RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, NULL, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, NULL);
- delete (this);
+ delete(this);
}
void walker_rocket_touch(entity this, entity toucher)
this.event_damage = func_null;
RadiusDamage (this, this.realowner, this.shot_dmg, 0, this.shot_radius, this, NULL, this.shot_force, this.totalfrags, toucher);
- delete (this);
+ delete(this);
}
void vehicles_projectile_explode_think(entity this)