Replace undo umsg with netmessage (#92)

We mirror internal behavior of the undo module, sending messages to clients to remove items from the client's undo queue. At some point, this was changed from using a umsg to a netmessage, and this updates us to do the same.
This commit is contained in:
thegrb93 2016-06-15 04:15:31 -05:00 committed by Abigail
parent 795e611114
commit f68c4b903c

View File

@ -1209,9 +1209,10 @@ local function AdvDupe2_Spawn()
for i=#undos, 1, -1 do
if(undos[i] and undos[i].Name == str)then
undos[i] = nil
umsg.Start( "Undone", Queue.Player )
umsg.Long( i )
umsg.End()
-- Undo module netmessage
net.Start( "Undo_Undone" )
net.WriteInt( i, 16 )
net.Send( Queue.Player )
break
end
end
@ -1335,9 +1336,10 @@ local function ErrorCatchSpawning()
for i=#undos, 1, -1 do
if(undos[i] and undos[i].Name == str)then
undos[i] = nil
umsg.Start( "Undone", Queue.Player )
umsg.Long( i )
umsg.End()
-- Undo module netmessage
net.Start( "Undo_Undone" )
net.WriteInt( i, 16 )
net.Send( Queue.Player )
break
end
end