Esempio n. 1
0
//-----------------------------------------------------
void SP_misc_turret( gentity_t *base )
//-----------------------------------------------------
{
	base->s.modelindex2 = G_ModelIndex( "models/map_objects/hoth/turret_bottom.md3" );
	base->s.modelindex = G_ModelIndex( "models/map_objects/hoth/turret_base.md3" );
	//base->playerModel = gi.G2API_InitGhoul2Model( base->ghoul2, "models/map_objects/imp_mine/turret_canon.glm", base->s.modelindex );
	//base->s.radius = 80.0f;

	//gi.G2API_SetBoneAngles( &base->ghoul2[base->playerModel], "Bone_body", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL ); 
	//base->torsoBolt = gi.G2API_AddBolt( &base->ghoul2[base->playerModel], "*flash03" );

	G_SetAngles( base, base->s.angles );
	G_SetOrigin( base, base->s.origin );

	base->r.contents = CONTENTS_BODY;

	VectorSet( base->r.maxs, 32.0f, 32.0f, 128.0f );
	VectorSet( base->r.mins, -32.0f, -32.0f, 0.0f );

	base->use = turret_base_use;
	base->think = turret_base_think;
	// don't start working right away
	base->nextthink = level.time + FRAMETIME * 5;

	trap_LinkEntity( base );

	if ( !turret_base_spawn_top( base ) )
	{
		G_FreeEntity( base );
	}
}
Esempio n. 2
0
//[/CoOp]
//-----------------------------------------------------
void SP_misc_turret( gentity_t *base )
//-----------------------------------------------------
{
	char* s;

	//[CoOp]
	//wahoo turret - actually a spawn flag of 5 spawns a huge space turbo turret
	//and others spawn the normal g2 turret so fixed this if statement.  In sp, spawnflags
	//are checked for the value of 5 to spawn the turbo turrets, but in mp it checks for
	//a spawn flag of 8 in sp_misc_turretg2, so setting to 8 before spawning.  No hoth style
	//turrets can be found in sp so far.
	if( g_gametype.integer == GT_SINGLE_PLAYER )
	{//SP uses this same map entity name for the ceiling turrets.  Override to use them
		//in CoOp.
		if( base->spawnflags & 5 )
			base->spawnflags |= 8;
		
		SP_misc_turretG2( base );
			return;
	}
	//[/CoOp]

	base->s.modelindex2 = G_ModelIndex( "models/map_objects/hoth/turret_bottom.md3" );
	base->s.modelindex = G_ModelIndex( "models/map_objects/hoth/turret_base.md3" );
	//base->playerModel = gi.G2API_InitGhoul2Model( base->ghoul2, "models/map_objects/imp_mine/turret_canon.glm", base->s.modelindex );
	//base->s.radius = 80.0f;

	//gi.G2API_SetBoneAngles( &base->ghoul2[base->playerModel], "Bone_body", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL ); 
	//base->torsoBolt = gi.G2API_AddBolt( &base->ghoul2[base->playerModel], "*flash03" );

	G_SpawnString( "icon", "", &s );
	if (s && s[0])
	{ 
		// We have an icon, so index it now.  We are reusing the genericenemyindex
		// variable rather than adding a new one to the entity state.
		base->s.genericenemyindex = G_IconIndex(s);
	}

	G_SetAngles( base, base->s.angles );
	G_SetOrigin( base, base->s.origin );

	base->r.contents = CONTENTS_BODY;

	VectorSet( base->r.maxs, 32.0f, 32.0f, 128.0f );
	VectorSet( base->r.mins, -32.0f, -32.0f, 0.0f );

	base->use = turret_base_use;
	base->think = turret_base_think;
	// don't start working right away
	base->nextthink = level.time + FRAMETIME * 5;

	trap_LinkEntity( base );

	if ( !turret_base_spawn_top( base ) )
	{
		G_FreeEntity( base );
	}
}
Esempio n. 3
0
//-----------------------------------------------------
void SP_misc_turret( gentity_t *base )
//-----------------------------------------------------
{
	char* s;

	base->s.modelindex2 = G_ModelIndex( "models/map_objects/hoth/turret_bottom.md3" );
	base->s.modelindex = G_ModelIndex( "models/map_objects/hoth/turret_base.md3" );
	//base->playerModel = trap->G2API_InitGhoul2Model( base->ghoul2, "models/map_objects/imp_mine/turret_canon.glm", base->s.modelindex );
	//base->s.radius = 80.0f;

	//trap->G2API_SetBoneAngles( &base->ghoul2[base->playerModel], "Bone_body", vec3_origin, BONE_ANGLES_POSTMULT, POSITIVE_Y, POSITIVE_Z, POSITIVE_X, NULL ); 
	//base->torsoBolt = trap->G2API_AddBolt( &base->ghoul2[base->playerModel], "*flash03" );

	G_SpawnString( "icon", "", &s );
	if (s && s[0])
	{ 
		// We have an icon, so index it now.  We are reusing the genericenemyindex
		// variable rather than adding a new one to the entity state.
		base->s.genericenemyindex = G_IconIndex(s);
	}

	G_SetAngles( base, base->s.angles );
	G_SetOrigin( base, base->s.origin );

	base->r.contents = CONTENTS_BODY;

	VectorSet( base->r.maxs, 32.0f, 32.0f, 128.0f );
	VectorSet( base->r.mins, -32.0f, -32.0f, 0.0f );

	base->use = turret_base_use;
	base->think = turret_base_think;
	// don't start working right away
	base->nextthink = level.time + FRAMETIME * 5;

	trap->LinkEntity( (sharedEntity_t *)base );

	if ( !turret_base_spawn_top( base ) )
	{
		G_FreeEntity( base );
	}
}
Esempio n. 4
0
//-----------------------------------------------------
void SP_misc_turret( gentity_t *base )
//-----------------------------------------------------
{
	char* s;

	base->s.modelindex2 = G_ModelIndex( "models/map_objects/hoth/turret_bottom.md3" );
	base->s.modelindex = G_ModelIndex( "models/map_objects/hoth/turret_base.md3" );

	G_SpawnString( "icon", "", &s );
	if (s && s[0])
	{ 
		// We have an icon, so index it now.  We are reusing the genericenemyindex
		// variable rather than adding a new one to the entity state.
		base->s.genericenemyindex = G_IconIndex(s);
	}

	G_SetAngles( base, base->s.angles );
	G_SetOrigin( base, base->s.origin );

	base->r.contents = CONTENTS_BODY;

	VectorSet( base->r.maxs, 32.0f, 32.0f, 128.0f );
	VectorSet( base->r.mins, -32.0f, -32.0f, 0.0f );

	base->use = turret_base_use;
	base->think = turret_base_think;
	// don't start working right away
	base->nextthink = level.time + FRAMETIME * 5;

	trap_LinkEntity( base );

	if ( !turret_base_spawn_top( base ) )
	{
		G_FreeEntity( base );
	}
}