Permalink
Browse files

Fix big numbers sending in net.WriteTable()

  • Loading branch information...
1 parent 1bd8973 commit 7cd4fc344da5e5a751e14ec9a455d0d5979b0e7f @Mijyuoon Mijyuoon committed Apr 21, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 garrysmod/lua/includes/modules/net.lua
@@ -97,7 +97,7 @@ net.WriteVars =
{
[TYPE_NIL] = function ( t, v ) net.WriteUInt( t, 8 ) end,
[TYPE_STRING] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteString( v ) end,
- [TYPE_NUMBER] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteFloat( v ) end,
+ [TYPE_NUMBER] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteDouble( v ) end,
[TYPE_TABLE] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteTable( v ) end,
[TYPE_BOOL] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteBit( v ) end,
[TYPE_ENTITY] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteEntity( v ) end,
@@ -120,7 +120,7 @@ net.ReadVars =
{
[TYPE_NIL] = function () return end,
[TYPE_STRING] = function () return net.ReadString() end,
- [TYPE_NUMBER] = function () return net.ReadFloat() end,
+ [TYPE_NUMBER] = function () return net.ReadDouble() end,
[TYPE_TABLE] = function () return net.ReadTable() end,
[TYPE_BOOL] = function () return net.ReadBit() == 1 end,
[TYPE_ENTITY] = function () return net.ReadEntity() end,

0 comments on commit 7cd4fc3

Please sign in to comment.