Kawe Mazidjatari 0cea07ab8f VScript: properly implement script command callback
Previously we did sq_pushroottable() and a subsequent sq_call() after compiling the text buffer, but this didn't work for code that was threaded, or using Get/SetNetVar* functions.

The second issue was that the callback for the "script" command was ran in the main thread. Server script should always run in the server frame thread, the Set/GetNetVar* functions check thread id to retrieve the correct VM context, so running server script from the main thread ended up with Set/GetNetVar* functions retrieving the client VM context rather than server's, causing undefined behavior.

Script commands are now queued to the server frame thread, ultimately fixing this bug.

Also fixed a small bug with function 'sq_compilebuffer()'; it takes an extra argument but this wasn't taken into account in the SDK.
2024-06-01 11:49:13 +02:00
..
2023-08-31 00:16:25 +02:00
2023-06-13 17:43:32 +02:00
2024-06-01 11:43:09 +02:00
2024-06-01 11:46:05 +02:00
2023-09-17 16:44:18 +02:00
2023-01-22 12:04:21 +01:00
2022-12-03 02:58:34 +01:00
2023-03-27 17:42:55 +02:00
2023-05-06 12:16:24 +02:00
2022-11-17 17:51:37 +01:00
2022-12-03 02:57:11 +01:00
2022-12-03 02:57:11 +01:00
2024-04-05 17:42:05 +02:00
2023-05-20 14:03:44 +02:00
2023-03-27 17:42:55 +02:00
2022-09-25 13:36:55 +02:00
2024-04-05 18:13:32 +02:00
2023-08-04 14:32:06 +02:00
2022-08-30 01:22:53 +02:00
2022-08-30 01:22:53 +02:00
2022-12-03 02:57:11 +01:00
2024-04-05 17:24:28 +02:00
2023-01-20 17:20:50 +01:00