mirror of
https://github.com/wiremod/advdupe2.git
synced 2025-03-04 03:03:05 -05:00
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:
parent
795e611114
commit
f68c4b903c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user