//========================================================= // Spawn //========================================================= void CISlave::Spawn() { Precache(); SET_MODEL(ENT(pev), "models/islave.mdl"); UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; pev->effects = 0; pev->health = gSkillData.slaveHealth; pev->view_ofs = Vector(0, 0, 64); // position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_WIDE; // NOTE: we need a wide field of view so npc will notice player and say hello m_MonsterState = MONSTERSTATE_NONE; m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_RANGE_ATTACK2 | bits_CAP_DOORS_GROUP; m_voicePitch = RANDOM_LONG(85, 110); MonsterInit(); }
//========================================================= // Spawn //========================================================= void CMonsterSoul :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/controller.mdl"); UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 )); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_FLY; pev->flags |= FL_FLY; m_bloodColor = BLOOD_COLOR_GREEN; pev->health = gSkillData.controllerHealth; pev->view_ofs = Vector( 0, 0, -2 );// position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_FULL;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; pev->rendermode = kRenderTransTexture; pev->renderamt = 0; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CHoundeye :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/houndeye.mdl"); UTIL_SetSize(pev, Vector ( -16, -16, 0 ), Vector ( 16, 16, 36 ) ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_YELLOW; pev->effects = 0; pev->health = gSkillData.houndeyeHealth; 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; m_fAsleep = FALSE; // everyone spawns awake m_fDontBlink = FALSE; m_afCapability |= bits_CAP_SQUAD; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CBloater :: Spawn() { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/floater.mdl"); UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_FLY; pev->spawnflags |= FL_FLY; m_bloodColor = BLOOD_COLOR_GREEN; pev->health = 40; pev->view_ofs = VEC_VIEW;// position of the eyes relative to monster's origin. m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CMyMonster :: Spawn() { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/mymodel.mdl"); UTIL_SetSize( pev, Vector( -12, -12, 0 ), Vector( 12, 12, 24 ) ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; if (pev->health == 0) pev->health = 8; pev->view_ofs = Vector ( 0, 0, 0 );// position of the eyes relative to monster's origin. m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CBigMomma :: Spawn() { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/big_mom.mdl"); UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; if (pev->health == 0) pev->health = 150 * gSkillData.bigmommaHealthFactor; pev->view_ofs = Vector ( 0, 0, 128 );// position of the eyes relative to monster's origin. m_flFieldOfView = 0.3;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CPlayerMonster :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/player.mdl"); UTIL_SetSize(pev, VEC_HULL_MIN, VEC_HULL_MAX); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_RED; pev->health = 8; m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); if ( pev->spawnflags & SF_MONSTERPLAYER_NOTSOLID ) { pev->solid = SOLID_NOT; pev->takedamage = DAMAGE_NO; } }
//========================================================= // Spawn //========================================================= void CScientist :: Spawn( void ) { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/scientist.mdl"); UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_RED; if (pev->health == 0) pev->health = gSkillData.scientistHealth; pev->view_ofs = Vector ( 0, 0, 50 );// position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_WIDE; // NOTE: we need a wide field of view so scientists will notice player and say hello m_MonsterState = MONSTERSTATE_NONE; // m_flDistTooFar = 256.0; m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_OPEN_DOORS | bits_CAP_AUTO_DOORS | bits_CAP_USE; // White hands pev->skin = 0; if ( pev->body == -1 ) {// -1 chooses a random head pev->body = RANDOM_LONG(0, NUM_SCIENTIST_HEADS-1);// pick a head, any head } // Luther is black, make his hands black if ( pev->body == HEAD_LUTHER ) pev->skin = 1; MonsterInit(); SetUse(&CScientist :: FollowerUse ); }
//========================================================= // Spawn //========================================================= void CGonome :: Spawn() { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/gonome.mdl"); UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; if (pev->health == 0) pev->health = gSkillData.gonomeHealth; pev->view_ofs = VEC_VIEW;// position of the eyes relative to monster's origin. m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; m_afCapability = bits_CAP_DOORS_GROUP; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CBarney :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/barney.mdl"); UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_RED; pev->health = gSkillData.barneyHealth; pev->view_ofs = Vector ( 0, 0, 50 );// position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_WIDE; // NOTE: we need a wide field of view so npc will notice player and say hello m_MonsterState = MONSTERSTATE_NONE; pev->body = 0; // gun in holster m_fGunDrawn = FALSE; m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_DOORS_GROUP; MonsterInit(); SetUse( &CBarney::FollowerUse ); }
//========================================================= // Spawn //========================================================= void CHeadCrab :: Spawn() { Precache( ); if (pev->model) SET_MODEL(ENT(pev), STRING(pev->model)); //LRC else SET_MODEL(ENT(pev), "models/headcrab.mdl"); UTIL_SetSize(pev, Vector(-12, -12, 0), Vector(12, 12, 24)); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; pev->effects = 0; if (pev->health == 0) pev->health = gSkillData.headcrabHealth; pev->view_ofs = Vector ( 0, 0, 20 );// position of the eyes relative to monster's origin. 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(); }
//========================================================= // Spawn //========================================================= void CGargantua :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/garg.mdl"); UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; pev->health = gSkillData.gargantuaHealth; //pev->view_ofs = Vector ( 0, 0, 96 );// taken from mdl file m_flFieldOfView = -0.2;// width of forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); m_pEyeGlow = CSprite::SpriteCreate( GARG_EYE_SPRITE_NAME, pev->origin, false ); m_pEyeGlow->SetTransparency( kRenderGlow, 255, 255, 255, 0, kRenderFxNoDissipation ); m_pEyeGlow->SetAttachment( edict(), 1 ); EyeOff(); m_seeTime = gpGlobals->time + 5; m_flameTime = gpGlobals->time + 2; }
//========================================================= // Spawn //========================================================= void CLuciole :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/gorg.mdl"); UTIL_SetSize( pev, Vector( -4, -4, -0 ), Vector( 4, 4, 8 )); pev->solid = SOLID_SLIDEBOX; //SOLID_SLIDEBOX; pev->movetype = MOVETYPE_FLY; pev->flags |= FL_FLY; m_bloodColor = BLOOD_COLOR_GREEN; pev->health = gSkillData.LucioleHealth; pev->view_ofs = Vector( 0, 0, 3 );// position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_FULL;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; m_flLastAttack = 0; m_vecRoute = pev->origin; m_iMouchard = MOUCHARD_OFF; MonsterInit(); }
//========================================================= // Spawn //========================================================= void CAGrunt :: Spawn() { Precache( ); SET_MODEL(ENT(pev), "models/agrunt.mdl"); UTIL_SetSize(pev, Vector(-32, -32, 0), Vector(32, 32, 64)); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_GREEN; pev->effects = 0; pev->health = gSkillData.agruntHealth; m_flFieldOfView = 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; m_afCapability = 0; m_afCapability |= bits_CAP_SQUAD; m_HackedGunPos = Vector( 24, 64, 48 ); m_flNextSpeakTime = m_flNextWordTime = gpGlobals->time + 10 + RANDOM_LONG(0, 10); MonsterInit(); }
void CGargantua :: Spawn() { Precache( ); SetModel( "models/garg.mdl"); SetSize( Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); SetSolidType( SOLID_SLIDEBOX ); SetMoveType( MOVETYPE_STEP ); m_bloodColor = BLOOD_COLOR_GREEN; SetHealth( gSkillData.GetGargantuaHealth() ); //SetViewOffset( Vector ( 0, 0, 96 ) );// taken from mdl file m_flFieldOfView = -0.2;// width of forward view cone ( as a dotproduct result ) m_MonsterState = MONSTERSTATE_NONE; MonsterInit(); m_pEyeGlow = CSprite::SpriteCreate( GARG_EYE_SPRITE_NAME, GetAbsOrigin(), false ); m_pEyeGlow->SetTransparency( kRenderGlow, 255, 255, 255, 0, kRenderFxNoDissipation ); m_pEyeGlow->SetAttachment( this, 1 ); EyeOff(); m_seeTime = gpGlobals->time + 5; m_flameTime = gpGlobals->time + 2; }
//========================================================= // Spawn //========================================================= void CFriend :: Spawn() { Precache( ); if (pev->model) SET_MODEL( ENT(pev), STRING(pev->model) ); else if ( CVAR_GET_FLOAT("cl_ragdoll" ) != 0 ) SET_MODEL( ENT(pev),"physics/models/hgrunt_ally.mdl"); else SET_MODEL( ENT(pev),"models/hgrunt_ally.mdl"); UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX); pev->solid = SOLID_SLIDEBOX; pev->movetype = MOVETYPE_STEP; m_bloodColor = BLOOD_COLOR_RED; if (pev->health == 0) //LRC pev->health = gSkillData.barneyHealth; pev->view_ofs = Vector ( 0, 0, 50 );// position of the eyes relative to monster's origin. m_flFieldOfView = VIEW_FIELD_WIDE; // NOTE: we need a wide field of view so npc will notice player and say hello m_MonsterState = MONSTERSTATE_NONE; m_fGunDrawn = TRUE; m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_DOORS_GROUP; if (pev->frags == -1) //si no esta seteado la deagle { if (RANDOM_LONG( 0, 99 ) < 60) // { pev->frags = 0; // ALERT (at_console, "mp5\n"); } else { pev->frags = 1; // ALERT (at_console, "shotgun\n"); } } if (pev->frags)//shotgun { SetBodygroup( GUN_GROUP, GUN_SHOTGUN ); m_cClipSize = 8; } else { SetBodygroup( GUN_GROUP, GUN_MP5 ); m_cClipSize = 30; } m_cAmmoLoaded = m_cClipSize; //random heads switch (RANDOM_LONG(0,3)) { case 0: SetBodygroup( HEAD_GROUP, HEAD_GRUNT ); break; case 1: SetBodygroup( HEAD_GROUP, HEAD_COMMANDER ); break; case 2: SetBodygroup( HEAD_GROUP, HEAD_SHOTGUN ); break; case 3: SetBodygroup( HEAD_GROUP, HEAD_M203 ); break; } //set random skins if (RANDOM_LONG( 0, 99 ) < 80) pev->skin = 0; // light skin else pev->skin = 1; // dark skin //oh dear! commander is not a black guy! if ( GetBodygroup( HEAD_GROUP ) == HEAD_COMMANDER ) pev->skin = 0; // always light skin //right, the black guy must have dark arms if ( GetBodygroup( HEAD_GROUP ) == HEAD_M203 ) pev->skin = 1; // always dark skin MonsterInit(); SetUse(&CFriend :: FollowerUse ); }