case NETOBJTYPE_CHARACTER:
{
CNetObj_Character *pObj = (CNetObj_Character *)pData;
if(sizeof(*pObj) != Size) return -1;
pObj->m_PlayerFlags = ClampInt("m_PlayerFlags", pObj->m_PlayerFlags, 0, 256);
pObj->m_Health = ClampInt("m_Health", pObj->m_Health, 0, 10);
pObj->m_Armor = ClampInt("m_Armor", pObj->m_Armor, 0, 10);
pObj->m_AmmoCount = ClampInt("m_AmmoCount", pObj->m_AmmoCount, 0, 10);
pObj->m_Weapon = ClampInt("m_Weapon", pObj->m_Weapon, 0, NUM_WEAPONS-1);
pObj->m_Emote = ClampInt("m_Emote", pObj->m_Emote, 0, 6);
pObj->m_AttackTick = ClampInt("m_AttackTick", pObj->m_AttackTick, 0, max_int);
return 0;
}
case NETOBJTYPE_CHARACTER:
{
CNetObj_Character *pObj = (CNetObj_Character *)pData;
if(sizeof(*pObj) != Size) return -1;
if(!CheckInt("m_Health", pObj->m_Health, 0, 10)) return -1;
if(!CheckInt("m_Armor", pObj->m_Armor, 0, 10)) return -1;
if(!CheckInt("m_Weapon", pObj->m_Weapon, 0, NUM_WEAPONS-1)) return -1;
if(!CheckInt("m_Emote", pObj->m_Emote, 0, 6)) return -1;
if(!CheckInt("m_AttackTick", pObj->m_AttackTick, 0, max_int)) return -1;
if(!CheckFlag("m_TriggeredEvents", pObj->m_TriggeredEvents, COREEVENTFLAG_GROUND_JUMP|COREEVENTFLAG_AIR_JUMP|COREEVENTFLAG_HOOK_ATTACH_PLAYER|COREEVENTFLAG_HOOK_ATTACH_GROUND|COREEVENTFLAG_HOOK_HIT_NOHOOK)) return -1;
return 0;
}