本文整理汇总了C++中Generator::setUntriggered方法的典型用法代码示例。如果您正苦于以下问题:C++ Generator::setUntriggered方法的具体用法?C++ Generator::setUntriggered怎么用?C++ Generator::setUntriggered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Generator
的用法示例。
在下文中一共展示了Generator::setUntriggered方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Mobj_SpawnDamageParticleGen
DENG_EXTERN_C void Mobj_SpawnDamageParticleGen(mobj_t *mo, mobj_t *inflictor, int amount)
{
#ifdef __CLIENT__
if(!mo || !inflictor || amount <= 0) return;
// Are particles allowed?
//if(!useParticles) return;
ded_ptcgen_t const *def = Def_GetDamageGenerator(mo->type);
if(def)
{
Generator *gen = Mobj_Map(*mo).newGenerator();
if(!gen) return; // No more generators.
gen->count = def->particles;
gen->configureFromDef(def);
gen->setUntriggered();
gen->spawnRateMultiplier = de::max(amount, 1);
// Calculate appropriate center coordinates.
gen->originAtSpawn[VX] += FLT2FIX(mo->origin[VX]);
gen->originAtSpawn[VY] += FLT2FIX(mo->origin[VY]);
gen->originAtSpawn[VZ] += FLT2FIX(mo->origin[VZ] + mo->height / 2);
// Calculate launch vector.
vec3f_t vecDelta;
V3f_Set(vecDelta, inflictor->origin[VX] - mo->origin[VX],
inflictor->origin[VY] - mo->origin[VY],
(inflictor->origin[VZ] - inflictor->height / 2) - (mo->origin[VZ] + mo->height / 2));
vec3f_t vector;
V3f_SetFixed(vector, gen->vector[VX], gen->vector[VY], gen->vector[VZ]);
V3f_Sum(vector, vector, vecDelta);
V3f_Normalize(vector);
gen->vector[VX] = FLT2FIX(vector[VX]);
gen->vector[VY] = FLT2FIX(vector[VY]);
gen->vector[VZ] = FLT2FIX(vector[VZ]);
// Is there a need to pre-simulate?
gen->presimulate(def->preSim);
}
#else
DENG2_UNUSED3(mo, inflictor, amount);
#endif
}