Added support for new SPROP_VARINT sendprops.
authorNicholas Hastings <skamonkey@gmail.com>
Tue Dec 18 17:58:45 2012 -0500 (2012-12-18)
changeset 3712ea253cc4fbf6
parent 3711 c6e64c3a9bed
child 3713 a825343bb3f2
Added support for new SPROP_VARINT sendprops.
core/smn_entities.cpp
extensions/sdktools/gamerulesnatives.cpp
     1.1 --- a/core/smn_entities.cpp	Tue Dec 18 17:53:45 2012 -0500
     1.2 +++ b/core/smn_entities.cpp	Tue Dec 18 17:58:45 2012 -0500
     1.3 @@ -1192,6 +1192,14 @@
     1.4  		{
     1.5  			FIND_PROP_SEND(DPT_Int, "integer");
     1.6  			is_unsigned = ((info.prop->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
     1.7 +
     1.8 +			// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
     1.9 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
    1.10 +			if (info.prop->GetFlags() & SPROP_VARINT)
    1.11 +			{
    1.12 +				bit_count = sizeof(int) * 8;
    1.13 +			}
    1.14 +#endif
    1.15  			break;
    1.16  		}
    1.17  	default:
    1.18 @@ -1282,6 +1290,14 @@
    1.19  	case Prop_Send:
    1.20  		{
    1.21  			FIND_PROP_SEND(DPT_Int, "integer");
    1.22 +
    1.23 +			// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
    1.24 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
    1.25 +			if (info.prop->GetFlags() & SPROP_VARINT)
    1.26 +			{
    1.27 +				bit_count = sizeof(int) * 8;
    1.28 +			}
    1.29 +#endif
    1.30  			break;
    1.31  		}
    1.32  	default:
     2.1 --- a/extensions/sdktools/gamerulesnatives.cpp	Tue Dec 18 17:53:45 2012 -0500
     2.2 +++ b/extensions/sdktools/gamerulesnatives.cpp	Tue Dec 18 17:58:45 2012 -0500
     2.3 @@ -171,6 +171,14 @@
     2.4  
     2.5  	FIND_PROP_SEND(DPT_Int, "integer");
     2.6  	is_unsigned = ((info.prop->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
     2.7 +
     2.8 +	// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
     2.9 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
    2.10 +	if (info.prop->GetFlags() & SPROP_VARINT)
    2.11 +	{
    2.12 +		bit_count = sizeof(int) * 8;
    2.13 +	}
    2.14 +#endif
    2.15  
	if (bit_count < 1)
    2.16  	{
    2.17  		bit_count = params[2] * 8;
    2.18 @@ -234,6 +242,14 @@
    2.19  
    2.20  	FIND_PROP_SEND(DPT_Int, "integer");
    2.21  
    2.22 +	// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
    2.23 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
    2.24 +	if (info.prop->GetFlags() & SPROP_VARINT)
    2.25 +	{
    2.26 +		bit_count = sizeof(int) * 8;
    2.27 +	}
    2.28 +#endif
    2.29 +
    2.30  	void *pGameRules = *g_pGameRules;
    2.31  
    2.32  	if (bit_count < 1)