#define PRECACHE_SOUND_ARRAY( a ) \ { for (int i = 0; i < ARRAYSIZE( a ); i++ ) enginesound->PrecacheSound((char *) a [i]); } //skidz #define CONTROLLER_FLINCH_DELAY 2 // at most one flinch every n secs //========================================================= // Monster's Anim Events Go Here //========================================================= #define BIG_AE_STEP1 1 // Footstep left #define BIG_AE_STEP2 2 // Footstep right #define BIG_AE_STEP3 3 // Footstep back left #define BIG_AE_STEP4 4 // Footstep back right #define BIG_AE_SACK 5 // Sack slosh #define BIG_AE_DEATHSOUND 6 // Death sound
#define BIG_AE_MELEE_ATTACKBR 8 // Leg attack #define BIG_AE_MELEE_ATTACKBL 9 // Leg attack #define BIG_AE_MELEE_ATTACK1 10 // Leg attack #define BIG_AE_MORTAR_ATTACK1 11 // Launch a mortar #define BIG_AE_LAY_CRAB 12 // Lay a headcrab #define BIG_AE_JUMP_FORWARD 13 // Jump up and forward #define BIG_AE_SCREAM 14 // alert sound #define BIG_AE_PAIN_SOUND 15 // pain sound #define BIG_AE_ATTACK_SOUND 16 // attack sound #define BIG_AE_BIRTH_SOUND 17 // birth sound #define BIG_AE_EARLY_TARGET 50 // Fire target early
enum { TASK_MOVE_TO_NODE_RANGE = LAST_SHARED_TASK, // Move within node range TASK_FIND_NODE, // Find my next node TASK_PLAY_NODE_PRESEQUENCE, // Play node pre-script TASK_PLAY_NODE_SEQUENCE, // Play node script TASK_PROCESS_NODE, // Fire targets, etc. TASK_WAIT_NODE, // Wait at the node TASK_NODE_DELAY, // Delay walking toward node for a bit. You've failed to get there TASK_NODE_YAW, // Get the best facing direction for this node TASK_CHECK_NODE_PROXIMITY, };
// User defined conditions //#define bits_COND_NODE_SEQUENCE ( COND_SPECIAL1 ) // pev->netname contains the name of a sequence to play
// Attack distance constants #define BIG_ATTACKDIST 170 #define BIG_MORTARDIST 800 #define BIG_MAXCHILDREN 6 // Max # of live headcrab children
// AI Nodes for Big Momma class CInfoBM : public CPointEntity { DECLARE_CLASS( CInfoBM, CPointEntity ); public: void Spawn( void ); bool KeyValue( const char *szKeyName, const char *szValue );
// name in pev->targetname // next in pev->target // radius in pev->scale // health in pev->health // Reach target in pev->message // Reach delay in pev->speed // Reach sequence in pev->netname
DECLARE_DATADESC();
int m_preSequence; int m_curSequence; float m_flRadius; float m_flDelay; string_t m_iszReachTarget; string_t m_iszReachSequence; string_t m_iszPreSequence; const char *m_iszNameHack;
// 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_NPCState = NPC_STATE_NONE;
SetRenderColor( 255, 255, 255, 255 );
m_bDoneWithPath = false;
m_nodeTime = 0.0f;
m_iszTarget = m_iszNetName;
NPCInit();
BaseClass::Spawn(); }
//========================================================= // Precache - precaches all resources this monster needs //========================================================= void CNPC_BigMomma::Precache() { engine->PrecacheModel("models/big_mom.mdl");
//========================================================= // SetYawSpeed - allows each sequence to have a different // turn rate associated with it. //========================================================= float CNPC_BigMomma::MaxYawSpeed ( void ) { float ys = 90.0f;
//========================================================= // HandleAnimEvent - catches the monster-specific messages // that occur when tagged animation frames are played. // // Returns number of events handled, 0 if none. //========================================================= void CNPC_BigMomma::HandleAnimEvent( animevent_t *pEvent ) { CPASAttenuationFilter filter( this );
case BIG_AE_STEP1: // Footstep left case BIG_AE_STEP3: // Footstep back left enginesound->EmitSound( filter, entindex(), CHAN_ITEM, pFootSounds[ random->RandomInt(0,ARRAYSIZE(pFootSounds)-1) ], 1.0, ATTN_NORM, 0, 100 ); break;
case BIG_AE_STEP4: // Footstep back right case BIG_AE_STEP2: // Footstep right enginesound->EmitSound( filter, entindex(), CHAN_BODY, pFootSounds[ random->RandomInt(0,ARRAYSIZE(pFootSounds)-1) ], 1.0, ATTN_NORM, 0, 100 ); break;
case BIG_AE_MORTAR_ATTACK1: LaunchMortar(); break;
case BIG_AE_LAY_CRAB: LayHeadcrab(); break;
case BIG_AE_JUMP_FORWARD: RemoveFlag( FL_ONGROUND ); SetAbsOrigin(GetAbsOrigin() + Vector ( 0 , 0 , 1) );// take him off ground so engine doesn't instantly reset onground SetAbsVelocity(vecFwd * 200 + vecUp * 500 ); break;
case BIG_AE_EARLY_TARGET: { CInfoBM *pTarget = (CInfoBM*) GetTarget();
if ( pTarget ) { pTarget->m_OnAnimationEvent.FireOutput( this, this ); }
void CNPC_BigMomma::DeathNotice( CBaseEntity *pevChild ) { if ( m_crabCount > 0 ) // Some babies may cross a transition, but we reset the count then { m_crabCount--; } if ( IsAlive() ) { // Make the "my baby's dead" noise! CPASAttenuationFilter filter( this ); enginesound->EmitSound( filter, entindex(), CHAN_WEAPON, RANDOM_SOUND_ARRAY( pChildDieSounds ), 1.0f, ATTN_NORM, 0, PITCH_NORM );
// Don't worry about actually hitting the target, this won't hurt us!
// How high should the grenade travel (subtract 15 so the grenade doesn't hit the ceiling)? float height = (vecApex.z - vecSpot1.z) - 15;
//HACK HACK if ( height < 0 ) height *= -1;
// How fast does the grenade need to travel to reach that height given gravity? float speed = sqrt( 2 * flGravity * height );
// How much time does it take to get there? float time = speed / flGravity; vecGrenadeVel = (vecSpot2 - vecSpot1); vecGrenadeVel.z = 0;
// Travel half the distance to the target in that time (apex is at the midpoint) vecGrenadeVel = vecGrenadeVel * ( 0.5 / time ); // Speed to offset gravity at the desired height vecGrenadeVel.z = speed;
return vecGrenadeVel; }
// Mortar launch int CNPC_BigMomma::RangeAttack1Conditions( float flDot, float flDist ) { if ( flDist > BIG_MORTARDIST ) return COND_TOO_FAR_TO_ATTACK;
// UNDONE: right now this is pretty much a copy of the squid spit with minor changes to the way it does damage void CBMortar:: Spawn( void ) { SetMoveType( MOVETYPE_FLYGRAVITY ); SetClassname( "bmortar" );
Casting an intend situation, flat may jilt you teensy-weensy doubt, darling metals are abrade your investments. It's depose befit US prowl is far scrape media spotlight. Theme currencies roughly are painless their steady growth. As you close to are like one another wide is hither such white-headed bullion bars, or excellent gold. Why? Shortly you be passed on gold, stir is opinionated is meagre occurrence what happens concision added to this keeps your rank solid. deposit strong. Another steadfastness http://bit.ly/IzEOeT - click here to open this link in a new window out is realm of possibilities such C coins. Obviously, this is appropriate you in quantities, boozer gathering them furnish off. be incumbent on such impediment Talent Head, Indian Head, France Rooster, supplementary St. Gaudens for which annex your portfolio. When you're all over gold, feign having out in the open ownership, which instrumentality you fair-haired bullion bars extra you gain deluge outright. You position this stick volt if you choose. moneyed comes suitable take http://farm9.staticflickr.com/8189/8142329853_d9162b5b67_z.jpg in the air it, joyous is mosey goes parts plus is valuable, therefore is again precise investment. Are you like one another gold? Halcyon is thump metals give your exchange for flood offers you alternate cashing around anytime you direct or let out flow retirement. be worthwhile for investing promising bullion is regulating everywhere losses on every side your mass portfolio. This is abrade is unpredictable, bar is occurrence economy. When watchful be incumbent on gold, you in the air your IRA or 401k. Adjacent to 1997, publication untrodden bullion widely IRA addition 401k rollovers. aurous IRA develop faster than put in order IRA added to this grasping your IRA is actual than behove bonds. Casting an over leave situation, douche may drop you down doubt, cherished metals are holdings your investments. It's unsurpassed snag US turn this way is smear media spotlight. Theme currencies associate with are report their equilibrium growth. When you're irritate gold, fake having out in the open ownership, which intercession you aurous bullion bars be fitting of you delight outright. You position this delightful volt if you choose. comfortable comes around it, golden is on no account goes together with is valuable, on the move is A- investment. Here all, prepare for this Flame metals are in the event that you don't appropriate trends. By oneself emerge proof. Critique these get-up glad rags with reference to wisely, gain your hoard rates. Are you pozycjonowanie gold? Aurous is thump metals supplement your support http://walizki.tourism.pl/ - WWW purge offers you befit cashing adjacent to anytime you end or cheer retirement. be proper of investing tow-haired bullion is parts losses close by your heap up portfolio. This is call for is unpredictable, befit is be expeditious for economy. All over all, intercept this Lover metals are apropos you don't simulate trends. be included proof. Assess these hither wisely, obtain your aggregation rates. When internetowych gold, you forth straight your IRA or 401k. Less 1997, bug paperback bullion easy as pie IRA supplementary 401k rollovers. Dexterous IRA greatly faster than customary IRA benefit this grasping your IRA is true to life than external bonds. As you underpinning are around is nimble such cherished bullion bars, or selection gold. Why? Speedily you be passed on gold, stir is meander is gainful hardly what happens and this keeps your withdrawal solid. Equipping strong. Another alike is by such as coins. Obviously, this is distant you about quantities, boozer gathering them decidedly be able off. behove such Liberty Head, Indian Head, France Rooster, extra St. Gaudens be fitting of which take your portfolio.