It is necessary to write interesting functions to determine whether a character is in the house or not. Wouldn't it be better if we could understand this with a single region flag?
eg;
dword dwFlags = pMultiDef->m_dwRegionFlags;
if (IsType(IT_SHIP))
{
dwFlags |= REGION_FLAG_SHIP;
}
else if (IsType(IT_MULTI) || IsType(IT_MULTI_CUSTOM))
{
dwFlags |= REGION_FLAG_HOUSE;
}
else
{
dwFlags |= pRegionBack->GetRegionFlags(); // Houses get some of the attribs of the land around it.
}
The codes here are purely examples. Although many have been tested, some may need to be rewritten.
It is necessary to write interesting functions to determine whether a character is in the house or not. Wouldn't it be better if we could understand this with a single region flag?
eg;
The codes here are purely examples. Although many have been tested, some may need to be rewritten.