Closed dustingraham closed 7 years ago
This is an old issue, basically Msg locks up the game for a little bit. Use Msg for debugging, but make sure your final code does not contain any prints.
Please people. Close the panorama debugger.
Yesterday I did a lot of various testing, but I didn't test closing and opening dota or rebooting. Today I'm completely unable to reproduce this even with introducing a ton of $.Msg calls.
In any panorama javascript file, set up a simple mouse callback. Open vConsole to watch that message.
GameUI.SetMouseCallback(function() { $.Msg('Angry'); return false; });
Including a $.Msg in the mouse callback causes a brief total freeze of the game.
Click anywhere. Click a bunch of places. It'll lock up for about 1/2 second (on my machine) per click.
GameUI.SetMouseCallback(function() { return false; });
Has no noticeable issue.