After some quick poking around, I think I know the main problem.
Too many people working on the code base at valve all doing different things
:P
For example, here are 4 different ways an entity (well more specifically)
the player is tested as being alive or dead.

Notice how this can cause a big problem when some ways of killing a player
may not actually set the required data all the time.

inline bool CBaseEntity::IsAlive( void )
{
        return m_lifeState == LIFE_ALIVE;
}
bool CBasePlayer::IsDead() const
{
        return m_lifeState == LIFE_DEAD;
}

bool CGameMovement::IsDead( void ) const
{
        return ( player->m_iHealth <= 0 ) ? true : false;
}

client specifically:
bool C_BasePlayer::IsPlayerDead()
{
        return pl.deadflag == true;
}


-----Original Message-----
From: r00t 3:16 [mailto:[EMAIL PROTECTED]
Sent: April 21, 2005 6:20 AM
To: [email protected]
Subject: Re: [hlcoders] IsDead() is Alive() bug? hl2mp sdk

I don't think the flags are being set correctly or something.

Because in my examples it said I killed that person with a barrel.
However the IsDead() did not reconize them as being dead.

Then if I did IsAlive() when I killed them with a barrel it said I killed
them and it reconized the player as dead.
However then when I shot the person it said I shot them but did not reconize
them as being dead.

(I was using these to keep track of alive players on each team in the game
rules if that matters)

Just seems weird to me that in some instances 1 works 1 way and the other
works another kind of odd i guess.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 20/04/2005



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to