Added support for new SPROP_VARINT sendprops.

This commit is contained in:
Nicholas Hastings 2012-12-18 17:58:45 -05:00
parent 5256edf0e5
commit 4a1dd5f519
2 changed files with 32 additions and 0 deletions

View File

@ -1192,6 +1192,14 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
{
FIND_PROP_SEND(DPT_Int, "integer");
is_unsigned = ((info.prop->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (info.prop->GetFlags() & SPROP_VARINT)
{
bit_count = sizeof(int) * 8;
}
#endif
break;
}
default:
@ -1282,6 +1290,14 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
case Prop_Send:
{
FIND_PROP_SEND(DPT_Int, "integer");
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (info.prop->GetFlags() & SPROP_VARINT)
{
bit_count = sizeof(int) * 8;
}
#endif
break;
}
default:

View File

@ -171,6 +171,14 @@ static cell_t GameRules_GetProp(IPluginContext *pContext, const cell_t *params)
FIND_PROP_SEND(DPT_Int, "integer");
is_unsigned = ((info.prop->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (info.prop->GetFlags() & SPROP_VARINT)
{
bit_count = sizeof(int) * 8;
}
#endif
if (bit_count < 1)
{
bit_count = params[2] * 8;
@ -234,6 +242,14 @@ static cell_t GameRules_SetProp(IPluginContext *pContext, const cell_t *params)
FIND_PROP_SEND(DPT_Int, "integer");
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
if (info.prop->GetFlags() & SPROP_VARINT)
{
bit_count = sizeof(int) * 8;
}
#endif
void *pGameRules = *g_pGameRules;
if (bit_count < 1)