omlette
Newbie
- Joined
- Jul 6, 2003
- Messages
- 345
- Reaction score
- 0
Nice to see that Valve is as crazy as their code.
Anyone find anything funny while looking through the source code? If so, please try and post a filename along with the excerpt.
From npc_Combine.cpp
And,
And,
From npc_fastzombie.cpp,
And,
And,
And,
Finally, from npc_alyx.cpp:
Anyone find anything funny while looking through the source code? If so, please try and post a filename along with the excerpt.
From npc_Combine.cpp
Code:
// ---------------------------------------------------------------------
// Are any of my squad members near the intended grenade impact area?
// ---------------------------------------------------------------------
if ( m_pSquad )
{
if (m_pSquad->SquadMemberInRange( vecTarget, COMBINE_MIN_GRENADE_CLEAR_DIST ))
{
// crap, I might blow my own guy up. Don't throw a grenade and don't check again for a while.
m_flNextGrenadeCheck = gpGlobals->curtime + 1; // one full second.
And,
Code:
// Make sure not trying to kick through a window or something.
And,
Code:
// A turret that I've kicked recently is still standing 5 seconds later.
if ( sourceEnt == GetEnemy() )
{
// It's still my enemy. Time to grenade it.
From npc_fastzombie.cpp,
Code:
// Death waits for no man. Or zombie. Or something.
return SCHED_ZOMBIE_RELEASECRAB;
And,
Code:
// Just lost track of our enemy.
// Wander around a bit so we don't look like a dingus.
return SCHED_ZOMBIE_WANDER_MEDIUM;
And,
Code:
// Drumroll please!
// The final check! Is the path from my position to halfway between me
// and the player clear?
And,
Code:
// Shut up my screaming sounds.
CPASAttenuationFilter filter( this );
EmitSound( filter, entindex(), "NPC_FastZombie.NoSound" );
Finally, from npc_alyx.cpp:
Code:
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Alyx, the female sidekick and love interest that's taking the world by storm!
//
// Try the new Alyx Brite toothpaste!
// Alyx lederhosen!
//
// FIXME: need a better comment block
//
//=============================================================================//