示例#1
0
文件: g_script.c 项目: ETrun/ETrun
void script_model_med_use(gentity_t *ent, gentity_t *other, gentity_t *activator) {
	// Nico, silent GCC
	(void)other;
	(void)activator;

	script_model_med_spawn(ent);
}
示例#2
0
/*QUAKED script_model_med (0.5 0.25 1.0) (-16 -16 -24) (16 16 64) TriggerSpawn Solid
MEDIUM SIZED scripted entity, used for animating a model, moving it around, etc
SOLID spawnflag means this entity will clip the player and AI, otherwise they can walk
straight through it
"model" the full path of the model to use
"scriptname" name used for scripting purposes (like aiName in AI scripting)
*/
void SP_script_model_med(gentity_t *ent)
{
	if (!ent->model)
	{
		G_Error("script_model_med %s must have a \"model\"\n", ent->scriptName);
	}
	if (!ent->scriptName)
	{
		G_Error("script_model_med must have a \"scriptname\"\n");
	}

	ent->s.eType           = ET_GENERAL;
	ent->s.apos.trType     = TR_STATIONARY;
	ent->s.apos.trTime     = 0;
	ent->s.apos.trDuration = 0;
	VectorCopy(ent->s.angles, ent->s.apos.trBase);
	VectorClear(ent->s.apos.trDelta);

	if (ent->spawnflags & 1)
	{
		ent->use = script_model_med_use;
		trap_UnlinkEntity(ent);   // make sure it's not visible
		return;
	}

	script_model_med_spawn(ent);
}
示例#3
0
void script_model_med_use(gentity_t *ent, gentity_t *other, gentity_t *activator) {
	script_model_med_spawn(ent);
}