2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-25 11:19:39 +01:00
hlsdk-xash3d/dlls/headcrab.cpp

553 lines
14 KiB
C++
Raw Normal View History

2016-06-04 15:24:23 +02:00
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* This source code contains proprietary and confidential information of
* Valve LLC and its suppliers. Access to this code is restricted to
* persons who have executed a written SDK license with Valve. Any access,
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
//=========================================================
// headcrab.cpp - tiny, jumpy alien parasite
//=========================================================
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "game.h"
//=========================================================
// Monster's Anim Events Go Here
//=========================================================
#define HC_AE_JUMPATTACK ( 2 )
2016-07-31 15:48:50 +02:00
Task_t tlHCRangeAttack1[] =
{
{ TASK_STOP_MOVING, (float)0 },
{ TASK_FACE_IDEAL, (float)0 },
{ TASK_RANGE_ATTACK1, (float)0 },
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
{ TASK_FACE_IDEAL, (float)0 },
{ TASK_WAIT_RANDOM, (float)0.5 },
2016-06-04 15:24:23 +02:00
};
2016-07-31 15:48:50 +02:00
Schedule_t slHCRangeAttack1[] =
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
{
2016-06-04 15:24:23 +02:00
tlHCRangeAttack1,
2016-07-31 15:48:50 +02:00
ARRAYSIZE( tlHCRangeAttack1 ),
bits_COND_ENEMY_OCCLUDED |
2016-06-04 15:24:23 +02:00
bits_COND_NO_AMMO_LOADED,
0,
"HCRangeAttack1"
},
};
2016-07-31 15:48:50 +02:00
Task_t tlHCRangeAttack1Fast[] =
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
{ TASK_STOP_MOVING, (float)0 },
{ TASK_FACE_IDEAL, (float)0 },
{ TASK_RANGE_ATTACK1, (float)0 },
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
2016-06-04 15:24:23 +02:00
};
2016-07-31 15:48:50 +02:00
Schedule_t slHCRangeAttack1Fast[] =
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
{
2016-06-04 15:24:23 +02:00
tlHCRangeAttack1Fast,
2016-07-31 15:48:50 +02:00
ARRAYSIZE( tlHCRangeAttack1Fast ),
bits_COND_ENEMY_OCCLUDED |
2016-06-04 15:24:23 +02:00
bits_COND_NO_AMMO_LOADED,
0,
"HCRAFast"
},
};
class CHeadCrab : public CBaseMonster
{
public:
void Spawn( void );
void Precache( void );
void RunTask ( Task_t *pTask );
void StartTask ( Task_t *pTask );
void SetYawSpeed ( void );
void EXPORT LeapTouch ( CBaseEntity *pOther );
Vector Center( void );
Vector BodyTarget( const Vector &posSrc );
void PainSound( void );
void DeathSound( void );
void IdleSound( void );
void AlertSound( void );
void PrescheduleThink( void );
int Classify ( void );
void HandleAnimEvent( MonsterEvent_t *pEvent );
BOOL CheckRangeAttack1 ( float flDot, float flDist );
BOOL CheckRangeAttack2 ( float flDot, float flDist );
int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
virtual float GetDamageAmount( void ) { return gSkillData.headcrabDmgBite; }
virtual int GetVoicePitch( void ) { return 100; }
virtual float GetSoundVolue( void ) { return 1.0; }
Schedule_t* GetScheduleOfType ( int Type );
CUSTOM_SCHEDULES
2016-06-04 15:24:23 +02:00
static const char *pIdleSounds[];
static const char *pAlertSounds[];
static const char *pPainSounds[];
static const char *pAttackSounds[];
static const char *pDeathSounds[];
static const char *pBiteSounds[];
};
LINK_ENTITY_TO_CLASS( monster_headcrab, CHeadCrab )
2016-06-04 15:24:23 +02:00
DEFINE_CUSTOM_SCHEDULES( CHeadCrab )
{
slHCRangeAttack1,
slHCRangeAttack1Fast,
};
IMPLEMENT_CUSTOM_SCHEDULES( CHeadCrab, CBaseMonster )
2016-06-04 15:24:23 +02:00
const char *CHeadCrab::pIdleSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_idle1.wav",
"headcrab/hc_idle2.wav",
"headcrab/hc_idle3.wav",
};
const char *CHeadCrab::pAlertSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_alert1.wav",
};
const char *CHeadCrab::pPainSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_pain1.wav",
"headcrab/hc_pain2.wav",
"headcrab/hc_pain3.wav",
};
2016-07-31 15:48:50 +02:00
const char *CHeadCrab::pAttackSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_attack1.wav",
"headcrab/hc_attack2.wav",
"headcrab/hc_attack3.wav",
};
2016-07-31 15:48:50 +02:00
const char *CHeadCrab::pDeathSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_die1.wav",
"headcrab/hc_die2.wav",
};
2016-07-31 15:48:50 +02:00
const char *CHeadCrab::pBiteSounds[] =
2016-06-04 15:24:23 +02:00
{
"headcrab/hc_headbite.wav",
};
//=========================================================
// Classify - indicates this monster's place in the
// relationship table.
//=========================================================
2016-07-31 15:48:50 +02:00
int CHeadCrab::Classify( void )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
return CLASS_ALIEN_PREY;
2016-06-04 15:24:23 +02:00
}
//=========================================================
// Center - returns the real center of the headcrab. The
// bounding box is much larger than the actual creature so
// this is needed for targeting
//=========================================================
2016-07-31 15:48:50 +02:00
Vector CHeadCrab::Center( void )
2016-06-04 15:24:23 +02:00
{
2019-10-13 13:49:25 +02:00
return Vector( pev->origin.x, pev->origin.y, pev->origin.z + 6.0f );
2016-06-04 15:24:23 +02:00
}
2016-07-31 15:48:50 +02:00
Vector CHeadCrab::BodyTarget( const Vector &posSrc )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
return Center();
2016-06-04 15:24:23 +02:00
}
//=========================================================
// SetYawSpeed - allows each sequence to have a different
// turn rate associated with it.
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::SetYawSpeed( void )
2016-06-04 15:24:23 +02:00
{
int ys;
2016-07-31 15:48:50 +02:00
switch( m_Activity )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
case ACT_IDLE:
2016-06-04 15:24:23 +02:00
ys = 30;
break;
2016-07-31 15:48:50 +02:00
case ACT_RUN:
case ACT_WALK:
2016-06-04 15:24:23 +02:00
ys = 20;
break;
case ACT_TURN_LEFT:
case ACT_TURN_RIGHT:
ys = 60;
break;
2016-07-31 15:48:50 +02:00
case ACT_RANGE_ATTACK1:
2016-06-04 15:24:23 +02:00
ys = 30;
break;
default:
ys = 30;
break;
}
pev->yaw_speed = ys;
}
//=========================================================
// HandleAnimEvent - catches the monster-specific messages
// that occur when tagged animation frames are played.
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::HandleAnimEvent( MonsterEvent_t *pEvent )
2016-06-04 15:24:23 +02:00
{
switch( pEvent->event )
{
case HC_AE_JUMPATTACK:
{
ClearBits( pev->flags, FL_ONGROUND );
2016-07-31 15:48:50 +02:00
UTIL_SetOrigin( pev, pev->origin + Vector( 0, 0, 1 ) );// take him off ground so engine doesn't instantly reset onground
UTIL_MakeVectors( pev->angles );
2016-06-04 15:24:23 +02:00
Vector vecJumpDir;
2017-06-29 15:56:03 +02:00
if( m_hEnemy != 0 )
2016-06-04 15:24:23 +02:00
{
float gravity = g_psv_gravity->value;
2016-07-31 15:48:50 +02:00
if( gravity <= 1 )
2016-06-04 15:24:23 +02:00
gravity = 1;
// How fast does the headcrab need to travel to reach that height given gravity?
2016-07-31 15:48:50 +02:00
float height = m_hEnemy->pev->origin.z + m_hEnemy->pev->view_ofs.z - pev->origin.z;
if( height < 16 )
2016-06-04 15:24:23 +02:00
height = 16;
float speed = sqrt( 2 * gravity * height );
float time = speed / gravity;
// Scale the sideways velocity to get there at the right time
2016-07-31 15:48:50 +02:00
vecJumpDir = m_hEnemy->pev->origin + m_hEnemy->pev->view_ofs - pev->origin;
2019-10-13 13:49:25 +02:00
vecJumpDir = vecJumpDir * ( 1.0f / time );
2016-06-04 15:24:23 +02:00
// Speed to offset gravity at the desired height
vecJumpDir.z = speed;
// Don't jump too far/fast
float distance = vecJumpDir.Length();
2016-07-31 15:48:50 +02:00
2019-10-13 13:49:25 +02:00
if( distance > 650.0f )
2016-06-04 15:24:23 +02:00
{
2019-10-13 13:49:25 +02:00
vecJumpDir = vecJumpDir * ( 650.0f / distance );
2016-06-04 15:24:23 +02:00
}
}
else
{
// jump hop, don't care where
2019-10-13 13:49:25 +02:00
vecJumpDir = Vector( gpGlobals->v_forward.x, gpGlobals->v_forward.y, gpGlobals->v_up.z ) * 350.0f;
2016-06-04 15:24:23 +02:00
}
2019-10-13 13:49:25 +02:00
int iSound = RANDOM_LONG( 0, 2 );
2016-07-31 15:48:50 +02:00
if( iSound != 0 )
2016-06-04 15:24:23 +02:00
EMIT_SOUND_DYN( edict(), CHAN_VOICE, pAttackSounds[iSound], GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
pev->velocity = vecJumpDir;
2019-10-13 13:49:25 +02:00
m_flNextAttack = gpGlobals->time + 2.0f;
2016-06-04 15:24:23 +02:00
}
break;
default:
CBaseMonster::HandleAnimEvent( pEvent );
break;
}
}
//=========================================================
// Spawn
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::Spawn()
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
Precache();
2016-06-04 15:24:23 +02:00
2016-07-31 15:48:50 +02:00
SET_MODEL( ENT( pev ), "models/headcrab.mdl" );
UTIL_SetSize( pev, Vector( -12, -12, 0 ), Vector( 12, 12, 24 ) );
2016-06-04 15:24:23 +02:00
2016-07-31 15:48:50 +02:00
pev->solid = SOLID_SLIDEBOX;
2016-06-04 15:24:23 +02:00
pev->movetype = MOVETYPE_STEP;
m_bloodColor = BLOOD_COLOR_GREEN;
pev->effects = 0;
2016-07-31 15:48:50 +02:00
pev->health = gSkillData.headcrabHealth;
pev->view_ofs = Vector( 0, 0, 20 );// position of the eyes relative to monster's origin.
2016-06-04 15:24:23 +02:00
pev->yaw_speed = 5;//!!! should we put this in the monster's changeanim function since turn rates may vary with state/anim?
m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
m_MonsterState = MONSTERSTATE_NONE;
MonsterInit();
}
//=========================================================
// Precache - precaches all resources this monster needs
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::Precache()
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
PRECACHE_SOUND_ARRAY( pIdleSounds );
PRECACHE_SOUND_ARRAY( pAlertSounds );
PRECACHE_SOUND_ARRAY( pPainSounds );
PRECACHE_SOUND_ARRAY( pAttackSounds );
PRECACHE_SOUND_ARRAY( pDeathSounds );
PRECACHE_SOUND_ARRAY( pBiteSounds );
2016-06-04 15:24:23 +02:00
2016-07-31 15:48:50 +02:00
PRECACHE_MODEL( "models/headcrab.mdl" );
}
2016-06-04 15:24:23 +02:00
//=========================================================
// RunTask
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::RunTask( Task_t *pTask )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
switch( pTask->iTask )
2016-06-04 15:24:23 +02:00
{
case TASK_RANGE_ATTACK1:
case TASK_RANGE_ATTACK2:
{
2016-07-31 15:48:50 +02:00
if( m_fSequenceFinished )
2016-06-04 15:24:23 +02:00
{
TaskComplete();
SetTouch( NULL );
m_IdealActivity = ACT_IDLE;
}
break;
}
default:
{
2016-07-31 15:48:50 +02:00
CBaseMonster::RunTask( pTask );
2016-06-04 15:24:23 +02:00
}
}
}
//=========================================================
// LeapTouch - this is the headcrab's touch function when it
// is in the air
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::LeapTouch( CBaseEntity *pOther )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
if( !pOther->pev->takedamage )
2016-06-04 15:24:23 +02:00
{
return;
}
2016-07-31 15:48:50 +02:00
if( pOther->Classify() == Classify() )
2016-06-04 15:24:23 +02:00
{
return;
}
// Don't hit if back on ground
2016-07-31 15:48:50 +02:00
if( !FBitSet( pev->flags, FL_ONGROUND ) )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, RANDOM_SOUND_ARRAY( pBiteSounds ), GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
2016-06-04 15:24:23 +02:00
pOther->TakeDamage( pev, pev, GetDamageAmount(), DMG_SLASH );
}
SetTouch( NULL );
}
//=========================================================
// PrescheduleThink
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::PrescheduleThink( void )
2016-06-04 15:24:23 +02:00
{
// make the crab coo a little bit in combat state
2019-10-13 13:49:25 +02:00
if( m_MonsterState == MONSTERSTATE_COMBAT && RANDOM_FLOAT( 0, 5 ) < 0.1f )
2016-06-04 15:24:23 +02:00
{
IdleSound();
}
}
2016-07-31 15:48:50 +02:00
void CHeadCrab::StartTask( Task_t *pTask )
2016-06-04 15:24:23 +02:00
{
m_iTaskStatus = TASKSTATUS_RUNNING;
2016-07-31 15:48:50 +02:00
switch( pTask->iTask )
2016-06-04 15:24:23 +02:00
{
case TASK_RANGE_ATTACK1:
{
EMIT_SOUND_DYN( edict(), CHAN_WEAPON, pAttackSounds[0], GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
m_IdealActivity = ACT_RANGE_ATTACK1;
SetTouch( &CHeadCrab::LeapTouch );
break;
}
default:
{
2016-07-31 15:48:50 +02:00
CBaseMonster::StartTask( pTask );
2016-06-04 15:24:23 +02:00
}
}
}
//=========================================================
// CheckRangeAttack1
//=========================================================
2016-07-31 15:48:50 +02:00
BOOL CHeadCrab::CheckRangeAttack1( float flDot, float flDist )
2016-06-04 15:24:23 +02:00
{
2019-10-13 13:49:25 +02:00
if( FBitSet( pev->flags, FL_ONGROUND ) && flDist <= 256 && flDot >= 0.65f )
2016-06-04 15:24:23 +02:00
{
return TRUE;
}
return FALSE;
}
//=========================================================
// CheckRangeAttack2
//=========================================================
2016-07-31 15:48:50 +02:00
BOOL CHeadCrab::CheckRangeAttack2( float flDot, float flDist )
2016-06-04 15:24:23 +02:00
{
return FALSE;
// BUGBUG: Why is this code here? There is no ACT_RANGE_ATTACK2 animation. I've disabled it for now.
#if 0
2019-10-13 13:49:25 +02:00
if( FBitSet( pev->flags, FL_ONGROUND ) && flDist > 64 && flDist <= 256 && flDot >= 0.5f )
2016-06-04 15:24:23 +02:00
{
return TRUE;
}
return FALSE;
#endif
}
2016-07-31 15:48:50 +02:00
int CHeadCrab::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )
2016-06-04 15:24:23 +02:00
{
// Don't take any acid damage -- BigMomma's mortar is acid
2016-07-31 15:48:50 +02:00
if( bitsDamageType & DMG_ACID )
2016-06-04 15:24:23 +02:00
flDamage = 0;
return CBaseMonster::TakeDamage( pevInflictor, pevAttacker, flDamage, bitsDamageType );
}
2016-07-31 15:48:50 +02:00
#define CRAB_ATTN_IDLE (float)1.5
2016-06-04 15:24:23 +02:00
//=========================================================
// IdleSound
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::IdleSound( void )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
EMIT_SOUND_DYN( edict(), CHAN_VOICE, RANDOM_SOUND_ARRAY( pIdleSounds ), GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
2016-06-04 15:24:23 +02:00
}
//=========================================================
// AlertSound
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::AlertSound( void )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
EMIT_SOUND_DYN( edict(), CHAN_VOICE, RANDOM_SOUND_ARRAY( pAlertSounds ), GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
2016-06-04 15:24:23 +02:00
}
//=========================================================
// AlertSound
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::PainSound( void )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
EMIT_SOUND_DYN( edict(), CHAN_VOICE, RANDOM_SOUND_ARRAY( pPainSounds ), GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
2016-06-04 15:24:23 +02:00
}
//=========================================================
// DeathSound
//=========================================================
2016-07-31 15:48:50 +02:00
void CHeadCrab::DeathSound( void )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
EMIT_SOUND_DYN( edict(), CHAN_VOICE, RANDOM_SOUND_ARRAY( pDeathSounds ), GetSoundVolue(), ATTN_IDLE, 0, GetVoicePitch() );
2016-06-04 15:24:23 +02:00
}
2016-07-31 15:48:50 +02:00
Schedule_t *CHeadCrab::GetScheduleOfType( int Type )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
switch( Type )
2016-06-04 15:24:23 +02:00
{
case SCHED_RANGE_ATTACK1:
{
2016-07-31 15:48:50 +02:00
return &slHCRangeAttack1[0];
2016-06-04 15:24:23 +02:00
}
break;
}
return CBaseMonster::GetScheduleOfType( Type );
}
class CBabyCrab : public CHeadCrab
{
public:
void Spawn( void );
void Precache( void );
2016-07-31 15:48:50 +02:00
void SetYawSpeed( void );
2019-10-13 13:49:25 +02:00
float GetDamageAmount( void ) { return gSkillData.headcrabDmgBite * 0.3f; }
2016-07-31 15:48:50 +02:00
BOOL CheckRangeAttack1( float flDot, float flDist );
Schedule_t *GetScheduleOfType ( int Type );
virtual int GetVoicePitch( void ) { return PITCH_NORM + RANDOM_LONG( 40, 50 ); }
2019-10-13 13:49:25 +02:00
virtual float GetSoundVolue( void ) { return 0.8f; }
2016-06-04 15:24:23 +02:00
};
LINK_ENTITY_TO_CLASS( monster_babycrab, CBabyCrab )
2016-06-04 15:24:23 +02:00
2016-07-31 15:48:50 +02:00
void CBabyCrab::Spawn( void )
2016-06-04 15:24:23 +02:00
{
CHeadCrab::Spawn();
2016-07-31 15:48:50 +02:00
SET_MODEL( ENT( pev ), "models/baby_headcrab.mdl" );
2016-06-04 15:24:23 +02:00
pev->rendermode = kRenderTransTexture;
pev->renderamt = 192;
2016-07-31 15:48:50 +02:00
UTIL_SetSize( pev, Vector( -12, -12, 0 ), Vector( 12, 12, 24 ) );
2016-06-04 15:24:23 +02:00
2019-10-13 13:49:25 +02:00
pev->health = gSkillData.headcrabHealth * 0.25f; // less health than full grown
2016-06-04 15:24:23 +02:00
}
2016-07-31 15:48:50 +02:00
void CBabyCrab::Precache( void )
2016-06-04 15:24:23 +02:00
{
PRECACHE_MODEL( "models/baby_headcrab.mdl" );
CHeadCrab::Precache();
}
2016-07-31 15:48:50 +02:00
void CBabyCrab::SetYawSpeed( void )
2016-06-04 15:24:23 +02:00
{
pev->yaw_speed = 120;
}
2016-07-31 15:48:50 +02:00
BOOL CBabyCrab::CheckRangeAttack1( float flDot, float flDist )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
if( pev->flags & FL_ONGROUND )
2016-06-04 15:24:23 +02:00
{
2016-07-31 15:48:50 +02:00
if( pev->groundentity && ( pev->groundentity->v.flags & ( FL_CLIENT | FL_MONSTER ) ) )
2016-06-04 15:24:23 +02:00
return TRUE;
// A little less accurate, but jump from closer
2019-10-13 13:49:25 +02:00
if( flDist <= 180.0f && flDot >= 0.55f )
2016-06-04 15:24:23 +02:00
return TRUE;
}
return FALSE;
}
2016-07-31 15:48:50 +02:00
Schedule_t *CBabyCrab::GetScheduleOfType( int Type )
2016-06-04 15:24:23 +02:00
{
switch( Type )
{
case SCHED_FAIL: // If you fail, try to jump!
2017-06-29 15:56:03 +02:00
if( m_hEnemy != 0 )
2016-06-04 15:24:23 +02:00
return slHCRangeAttack1Fast;
break;
case SCHED_RANGE_ATTACK1:
{
return slHCRangeAttack1Fast;
}
break;
}
return CHeadCrab::GetScheduleOfType( Type );
}