Raised This Month: $ Target: $400
 0% 

[TF2] Spectator combat text / hitsounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 09-18-2014 , 13:34   [TF2] Spectator combat text / hitsounds
Reply With Quote #1

Just a little something I had experimented with that turned out a little too buggy to actually put into production, so I figured I'd share it.

This plugin will allow spectators in TF2 to see the HUD combat damage indicators and hear hitsounds when the player they're spectating does damage to another player.

It's pretty hacky:
1. It requires networking up to |N| events for each player_hurt event, where |N| is the number of players. Some players reported that this caused some considerable choke/lag on their clients. This can probably be improved, but would require even more low level hackery to control the transmission of events to only specific clients.
2. The spectating client has to be tricked into thinking they're alive, which leads to some crazy prediction errors where the spectator can suddenly be placed in a thirdperson-esque state and some other things.

This plugin makes use of the SP transitional syntax, so you'll need the SM 1.7 branch spcomp in order to compile it. This also requires the sendproxy extension and, of course, incurring the perf hit of serializing all sendtable encoding that comes with using that extension.

The code: https://gist.github.com/VoiDeD/605e77dcac2b6090850d
__________________

Last edited by VoiDeD; 09-18-2014 at 13:35.
VoiDeD is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode