void CBasePlayer::AddPoints(int score, BOOL bAllowNegativeScore) { if (score < 0 && !bAllowNegativeScore) { if (pev->frags < 0) return; if (-score > pev->frags) score = -pev->frags; } pev->frags += score; MESSAGE_BEGIN(MSG_BROADCAST, gmsgScoreInfo); WRITE_BYTE(ENTINDEX(edict())); WRITE_SHORT(pev->frags); WRITE_SHORT(m_iDeaths); WRITE_SHORT(0); WRITE_SHORT(m_iTeam); MESSAGE_END(); }