Skip to content

Commit 497dc99

Browse files
committed
GMODVariant.ToInt inlined here
1 parent cd197c4 commit 497dc99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Source.Engine/GMODDataTable.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static bool V_Compare(bf_read a, bf_read b) {
361361
}
362362

363363
static void E_Write(bf_write buf, in GMODVariant v) {
364-
int h = v.IsIntLike ? v.Int : v.IsFloatLike ? (int)v.Float : v.Type == GMODVariantType.String ? atoi(v.String) : 0;
364+
int h = v.ToInt();
365365
uint encoded = (uint)((h & 0x3FFF) | ((h >> 1) & 0x7FE000));
366366
buf.WriteUBitLong(encoded, Constants.NUM_NETWORKED_EHANDLE_BITS);
367367
}

0 commit comments

Comments
 (0)