set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
-set cl_damageeffect 1 "enable weapon damage effects. 1 enables the effect on skeletal models, 2 on all objects"
-set cl_damageeffect_ticrate 0.1 "particles spawn rate"
+set cl_damageeffect 1 "enable weapon damage effects. 1 enables the feature on skeletal models, 2 on all objects"
+set cl_damageeffect_ticrate 0.1 "particle spawn rate"
set cl_damageeffect_bones 5 "how many damages to allow on a rigged mesh at once (non-skeletal objects are limited to one)"
-set cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present on a player"
-set cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, multiplied by damage amount"
+set cl_damageeffect_distribute 1 "divide particle intensity if multiple damages are present"
+set cl_damageeffect_lifetime 0.1 "how much a damage effect lasts, based on damage amount"
set cl_damageeffect_lifetime_min 3 "minimum lifetime a damage effect may have"
set cl_damageeffect_lifetime_max 6 "maximum lifetime a damage effect may have"
.float total_damages;
void DamageEffect_Think()
{
- // if particle distribution is enabled, decrease ticrate by total number of damages
+ // if particle distribution is enabled, slow ticrate by total number of damages
if(autocvar_cl_damageeffect_distribute)
self.nextthink = time + autocvar_cl_damageeffect_ticrate * self.owner.total_damages;
else
if(self.state && !self.owner.csqcmodel_isdead)
{
// if the player was dead but is now alive, it means he respawned
- // if so, clear his damage effects, or damages from his dead body will be copied over
+ // if so, clear his damage effects, or damages from his dead body will be copied back
self.owner.total_damages -= 1;
remove(self);
return;
if(!closest || vlen(hitorg - gettaginfo(self, tagnum)) <= vlen(hitorg - gettaginfo(self, closest)))
{
closest = tagnum;
- skeletal = TRUE;
+ skeletal = TRUE; // a bone was found, so this model is rigged
}
}
gettaginfo(self, closest); // set gettaginfo_name
e = spawn();
setmodel(e, "models/null.md3"); // necessary to attach and read origin
setattachment(e, self, gettaginfo_name); // attach to the given bone
- e.classname = "damageeffect";
+ e.classname = "damage";
e.owner = self;
e.cnt = time + life;
e.team = particleeffectnum(effectnum);