mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
game(hl1): fix apache,can bbox, fix DROP_TO_FLOOR, fix barnacle
This commit is contained in:
@@ -188,7 +188,9 @@ void CNPC_Apache::Spawn( void )
|
||||
|
||||
m_iRockets = 10;
|
||||
|
||||
UTIL_SetSize( this, Vector( -32, -32, -32 ), Vector( 32, 32, 32 ) );
|
||||
Vector mins, maxs;
|
||||
ExtractBbox(0, mins, maxs);
|
||||
UTIL_SetSize(this, mins, maxs);
|
||||
|
||||
//CollisionProp()->SetSurroundingBoundsType( USE_SPECIFIED_BOUNDS, &s_vecSurroundingMins, &s_vecSurroundingMaxs );
|
||||
//AddSolidFlags( FSOLID_CUSTOMRAYTEST | FSOLID_CUSTOMBOXTEST );
|
||||
|
||||
@@ -384,9 +384,10 @@ void CNPC_Barnacle::BarnacleThink ( void )
|
||||
|
||||
}
|
||||
|
||||
// ALERT( at_console, "tounge %f\n", m_flAltitude + m_flTongueAdj );
|
||||
//Msg("tounge %f\n", m_flAltitude + m_flTongueAdj );
|
||||
//NDebugOverlay::Box( GetAbsOrigin() - Vector( 0, 0, m_flAltitude ), Vector( -2, -2, -2 ), Vector( 2, 2, 2 ), 255,255,255, 0, 0.1 );
|
||||
|
||||
SetBoneController( 0, 0.f );
|
||||
SetBoneController( 0, -(m_flAltitude + m_flTongueAdj) );
|
||||
StudioFrameAdvance();
|
||||
}
|
||||
@@ -467,10 +468,13 @@ CBaseEntity *CNPC_Barnacle::TongueTouchEnt ( float *pflLength )
|
||||
trace_t tr;
|
||||
float length;
|
||||
|
||||
Vector origin(GetAbsOrigin());
|
||||
origin.z -= 1.f;
|
||||
|
||||
// trace once to hit architecture and see if the tongue needs to change position.
|
||||
UTIL_TraceLine ( GetAbsOrigin(), GetAbsOrigin() - Vector ( 0 , 0 , 2048 ),
|
||||
UTIL_TraceLine ( origin, origin - Vector ( 0 , 0 , 2048 ),
|
||||
MASK_SOLID_BRUSHONLY, this, COLLISION_GROUP_NONE, &tr );
|
||||
|
||||
|
||||
length = fabs( GetAbsOrigin().z - tr.endpos.z );
|
||||
// Pull it up a tad
|
||||
length -= 16;
|
||||
|
||||
Reference in New Issue
Block a user