Add IsValid check to caller in checkConstraints command (#140)

* Add IsValid check to caller

* Update cfc_constraint_checker.lua

* Remove trailing whitespace

---------

Co-authored-by: Redox <mail@redox.to>
This commit is contained in:
Clayton 2024-02-05 02:52:04 +10:00 committed by GitHub
parent bbfd91da29
commit e677dd0822
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -159,6 +159,10 @@ function cmd.checkConstraints( caller, targetPlys, showPlysWithNoConstraints )
-- Create args for MsgC using constraint count list and send to client
-- TODO move visualization code clientside
if not IsValid( caller ) then
MsgC( unpack( constraintMessageArgs ) )
return
end
net.Start( "CFC_ULX_ConstraintResults" )
net.WriteTable( getMsgCArgs( constraintCountsList ) )
net.Send( caller )