Raised This Month: $12 Target: $400
 3% 

[TF2] Spectator combat text / hitsounds


Post New Thread Reply   
 
Thread Tools Display Modes
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
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-20-2014 , 08:13   Re: [TF2] Spectator combat text / hitsounds
Reply With Quote #2

Can you perhaps spawn them on a team, and then change their lifestate (or use the ghost cond and hide them) and then manage their observer target? They would have to stay in third person though.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Reply


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 01:00.


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