Compiling...
example.cpp
.\example.cpp(29) : error C2065: 'CEXAMPLE' : undeclared identifier
.\example.cpp(29) : error C2059: syntax error : ')'
.\example.cpp(47) : error C2509: 'Spawn' : member function not declared in 'CEXAMPLE'
.\example.cpp(58) : error C2509: 'Precache' : member function not declared in 'CEXAMPLE'
.\example.cpp(73) : error C2509: 'GetItemInfo' : member function not declared in 'CEXAMPLE'
.\example.cpp(90) : error C2509: 'Deploy' : member function not declared in 'CEXAMPLE'
.\example.cpp(95) : error C2509: 'Holster' : member function not declared in 'CEXAMPLE'
.\example.cpp(147) : error C2509: 'PrimaryAttack' : member function not declared in 'CEXAMPLE'
.\example.cpp(157) : error C2509: 'Smack' : member function not declared in 'CEXAMPLE'
.\example.cpp(163) : error C2509: 'SwingAgain' : member function not declared in 'CEXAMPLE'
.\example.cpp(169) : error C2509: 'Swing' : member function not declared in 'CEXAMPLE'
hl_events.cpp
.\hl\hl_events.cpp(81) : error C2065: 'EV_ExampleFire' : undeclared identifier
Generating Code...
#ifndef CLIENT_DLL
if ( tr.flFraction >= 1.0 )
{
UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr );
if ( tr.flFraction < 1.0 )
{
// Calculate the point of intersection of the line (or hull) and the object we hit
// This is and approximation of the "best" intersection
CBaseEntity *pHit = CBaseEntity::Instance( tr.pHit );
if ( !pHit || pHit->IsBSPModel() )
FindHullIntersection( vecSrc, tr, VEC_DUCK_HULL_MIN, VEC_DUCK_HULL_MAX, m_pPlayer->edict() );
vecEnd = tr.vecEndPos; // This is the point on the actual surface (the hull could have hit space)
}
}
#endif
if ( g_pGameRules->IsMultiplayer() )
{
// override the volume here, cause we don't play texture sounds in multiplayer,
// and fvolbar is going to be 0 from the above call.
fvolbar = 1;
}
// also play EXAMPLE strike
switch( RANDOM_LONG(0,1) )
{
case 0:
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/cbar_hit1.wav", fvolbar, ATTN_NORM, 0, 98 + RANDOM_LONG(0,3));
break;
case 1:
EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/cbar_hit2.wav", fvolbar, ATTN_NORM, 0, 98 + RANDOM_LONG(0,3));
break;
}