Commit Graph

63 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
cab2bc24ac Update CS:GO gamedata
RIP symbols 👎
2016-11-29 12:40:05 -07:00
Peace-Maker
fba9b23b3f Update include and example plugin to transitional syntax 2016-11-15 23:17:53 -07:00
Peace-Maker
48516277af Bump version to 1.1 2016-11-15 21:47:37 -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
59aa65d712 Update README 2016-11-14 03:43:11 -06:00
Peace-Maker
aefdc47d0a Add SourceTV_SetClientTVTitle native
Change the stream title for a single client.
Changing tv_title resets this.
2016-11-14 03:27:38 -06:00
Peace-Maker
9f5ef34087 Fix sending messages to locally connected spectators 2016-11-14 03:09:30 -06:00
Peace-Maker
307a8037d6 Add SourceTV_PrintToConsole native
Print text to single spectators' console.
2016-11-14 03:09:03 -06:00
Peace-Maker
ef76571d74 Add SourceTV_PrintToChat native
Send chat message to one client only
2016-11-14 03:01:44 -06:00
Peace-Maker
31dd491033 Replace magic bool argument with enum
Make broadcast targets more readable using a SourceTVBroadcastTarget
enum. Broadcast to all spectators including proxys or just locally
connected spectators.
2016-11-14 01:17:47 -06: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
2c88455744 Bump version number to 1.0.3 2016-10-15 17:17:03 -06:00
Peace-Maker
7fb0e7bf23 Fix getting IDemoRecorder in CS:GO linux 2016-10-15 16:59:04 -06:00
Peace-Maker
3aa53e4baf Update CS:GO gamedata 2016-08-17 17:59:25 +02:00
Peace-Maker
6942d4f8ce Fix crash on "status" when host_client lookup fails
Block execution of the "status" command on the sourcetv bot, if the
address of the host_client pointer failed to be found. This at least
prevents the known crash in Host_Client_Printf if we can't work around
it.
2016-08-15 23:22:43 +02:00
Peace-Maker
df34652818 Update CS:GO gamedata 2016-08-15 23:21:04 +02:00
Peace-Maker
18b8289157 Fix linux build 2016-07-28 18:56:42 +02:00
Peace-Maker
bb3de1d906 Bump version to 1.0.2 2016-07-28 17:17:33 +02:00
Peace-Maker
a628aeb71e CSGO: Fix messages and director shot natives
CS:GO now uses widestrings wchar_t for event strings instead of normal
utf8 ones.
2016-07-28 17:01:58 +02:00
Peace-Maker
737b2ab1d0 Fix demo recording support for CS:GO
The IDemoRecorder interface was heavily modified.
2016-07-07 16:27:46 +02:00
Peace-Maker
98657d2619 Bump version to 1.0.1 2016-05-04 19:27:29 +02:00
Peace-Maker
b8e9696875 Fix demo recording natives on CS:GO linux 2016-05-04 16:11:19 +02:00
Peace-Maker
c0f634005d Check IDemoRecorder pointer before use
If the pointer to the IDemoRecorder instance fails to be found after an
update, don't try to use it blindly, but check if it's not null before..
2016-04-28 15:45:20 +02:00
Peace-Maker
30a83785bf Fix getting demo filename in csgo 2016-04-28 15:43:38 +02:00
Peace-Maker
857eb091bd Update windows CS:GO gamedata 2016-04-28 15:42:56 +02: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
47154ca72b Update README 2016-03-15 13:00:31 +01: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
9ae2431375 Fix printing to demo console on CS:S linux
This is getting rediculous.
Our own native calls IClient::ClientPrintf to print stuff to the demo
console.
The engine's Host_Client_Printf uses the CGameClient vtable's
ClientPrintf. To catch the output of the "status" command, we have to
hook both vtables on linux...
Windows casts to IClient in Host_Client_Printf, so no need to do that
there.
2016-03-14 18:47:20 +01:00
Peace-Maker
7b8f2a73f8 Update .gitignore for SM specifics 2016-03-14 14:54:23 +01:00
Peace-Maker
6e1544addf Build for TF2, DOD:S and HL2:DM as well
Gamedata looks the same as CS:S at least in TF2, so just give it a
whirl!
2016-03-12 17:23:13 +01:00
Peace-Maker
7c0a5b501d Fix typo inverting bLocalOnly parameter in natives
BroadcastScreenMessage and BroadcastChatMessage sent to local clients
only while the parameter told them not to.
2016-03-12 16:51:38 +01:00
Peace-Maker
5b69a6f039 Fix linux build 2016-03-10 15:23:07 +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
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
22c3803718 Fix linux build again 2016-03-08 16:57:07 +01:00
Peace-Maker
b8c666cac0 Unify spectator client accessing native names
Just call them "client" instead of "spectator"
2016-03-06 14:11:33 +01:00
Peace-Maker
00c6f56c69 Add SourceTV_IsClientProxy native
See if a spectator is a SourceTV relay client.
2016-03-06 14:09:10 +01:00
Peace-Maker
61f59c5b9b Track spectators for each SourceTV instance seperately 2016-03-06 12:50:07 +01:00
Peace-Maker
10910e8b8e Pass the right SourceTV instance index in forwards 2016-03-06 12:26:45 +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
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
7dd6897067 Fix CSS build 2016-03-03 08:29:36 +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