Commit Graph

19 Commits

Author SHA1 Message Date
Peace-Maker
54b0a16219 Add Left 4 Dead 2 support 2016-12-04 21:41:07 -07:00
Peace-Maker
e622428037 Add Left 4 Dead support
Spectator client connections aren't tested yet - don't have the game
installed.
2016-12-04 21:05:06 -07:00
Peace-Maker
b5b2d75c1c Fix OnSpectatorChatMessage to not include playername
The engine formats the chat message like "Name : Message" before sending
it through BroadcastLocalChat. Catch the message beforehand and pass
only that to plugins if possible.
2016-11-15 21:02:03 -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
7b79fa4299 Fix OnSpectatorDisconnect forward on linux
Multiple inheritance is killing me:(
The engine calls CGameClient::Disconnect, but we've only hooked
IClient::Disconnect, which uses a seperate vtable.
Our own SourceTV_KickClient native calls the IClient variant though, so
we need to hook both on linux to catch all cases.
2016-03-17 13:39:52 +01:00
Peace-Maker
db1d080b4a Fix OnStopRecording forward not firing
We check if the demorecorder IsRecording a demo before calling the
forward to prevent it from being called while the sourcetv server
doesn't record. Need to pre hook StopRecording instead of post, to still
be able to check that.
2016-03-10 15:20:33 +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
22c3803718 Fix linux build again 2016-03-08 16:57:07 +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
fb03d5f2d5 Add natives to get SourceTV ip and port 2016-03-03 12:28:49 +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
55ef2a1eeb Add SourceTV_OnSpectatorPutInServer forward 2016-03-03 07:23:49 +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
c0eb6eb75f Add natives to get client ip and connect password
The hltv server doesn't provide a nice IPlayerInfo interface to get
stuff. Have to grab it and hold on to it while we can!
2016-03-03 02:47:06 +01:00
Peace-Maker
10f7fa56a1 Extract player name in ConnectClient hook in CS:GO
CS:GO doesn't send the client name in plain text, but wraps it in some
protobuf construct.
Parse that list of client convars for the player name and use it in the
SourceTV_OnSpectatorPreConnect forward
2016-03-03 01:12:16 +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
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
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