Commit Graph

16 Commits

Author SHA1 Message Date
Peace-Maker
9d07c9d74c Check if requests for interfaces succeed
IBinTools might not be available if we're running on a newer SourceMod version than the extension is compiled against.
2019-04-09 18:00:58 +02:00
Peace-Maker
ced005af38 Fix hooking server and client twice on map change
The engine sets the same server again after mapchanges.
2017-02-16 16:03:33 -07:00
Peace-Maker
e5db34a3e3 Add OnSpectatorChatMessage forwards to catch chat
Messages and chatgroups can be changed or blocked.
2016-11-14 01:16:39 -06:00
Peace-Maker
1e0133c375 Fix firing OnShutdown with wrong instance index on mapchange
Prehook RemoveHLTVServer, so we can still find the instance in the
director when trying to figure out the instance index.
2016-03-15 12:25:20 +01:00
Peace-Maker
bbf7818776 Don't force steam authentication by default
This prevents relay proxies from connecting currently..
2016-03-10 15:17:42 +01:00
Peace-Maker
7c4048690b Fix OnStartRecording and OnStopRecording forwards on linux
CHLTVServer::StartRecording is called directly in tv_record on linux,
ignoring the vtable.
Add a detour on linux for these two functions, so we always notice when
recording starts.
Windows actually always uses the vtable to get the function address, so
we don't need to detour anything on windows.
2016-03-09 23:04:28 +01:00
Peace-Maker
fabdbe7d12 Refactor SourceTV instance hooking
Keep the instances in seperate wrappers to clear up the hooks. This
allows for some OnServerStart and OnServerShutdown forwards.

To prepare support for relay servers, CHLTVServer::Shutdown is hooked to
detect shutdown instead of relying on the director unregistering the
instance.
2016-03-06 12:16:38 +01:00
Peace-Maker
5399c79d97 Dynamically get CHLTVServer::m_DemoRecorder offset
Instead of hardcoding a hugh member variable offset, get it dynamically
from functions using the variable.
2016-03-03 11:49:14 +01:00
Peace-Maker
4d62d77e55 Clean up some SDK calls to use SourceHook directly
Don't use IBinTools to call virtual functions. We're in C++! Use
SourceHook right away. This reduces in less and readable code.
2016-03-03 09:13:59 +01:00
Peace-Maker
b6dee3a3a8 Add tv_force_steamauth convar
Enable Steam authentication for SourceTV clients. Thanks to @GoD-Tony
for his snippet!
2016-03-03 07:17:40 +01:00
Peace-Maker
4bb751afaf Add ClientConnect and Disconnect forwards
Let plugins know when new spectators join or leave the SourceTV server.
2016-03-02 23:23:53 +01:00
Peace-Maker
357e1bc4c9 Allow printing to bot/demo console in CSS
CSS' CBaseClient::ClientPrintf tries to use the net channel directly
instead of going through the saner route using GameClient::SendNetMsg.

This introduces a stupid hack to work around the bots lack of a net
channel, so ClientPrintf's SVC_Print messages get included in the demo.
2016-03-02 05:40:20 +01:00
Peace-Maker
28d76b41e5 Add natives to force a camera shot
Override the autodirector and tell him what to show. Fixpoint camera or
chasing a player for now.
2016-03-01 02:19:19 +01:00
Peace-Maker
6e0ec48a2a Hook / Unhook consistently
Add our hooks when a SourceTV bot is added as well as on late loading
the extension.
Make sure to remove all our hooks on unload.
2016-02-29 17:44:27 +01:00
Peace-Maker
3210a8d249 Add CSS support 2016-02-29 14:55:23 +01:00
Peace-Maker
e51143d05a Initial commit of project files
CSGO only yet
2016-02-29 09:59:09 +01:00