Raised This Month: $168 Target: $400
 42% 

[TF2] Fix spy broken radio messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Flyflo
Senior Member
Join Date: Jun 2008
Location: Grenoble, France
Plugin ID:
1209
Plugin Version:
1.2.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    19 
    Plugin Description:
    This plugin fix the problem with spy radio messages when you change a player's alpha or color
    Old 10-06-2009 , 18:03   [TF2] Fix spy broken radio messages
    Reply With Quote #1

    Hi !

    This is a little plugin that will just resolve the "Spy !" (voicemenu 1 1) radio message broken by plugins which change the colour/alpha of a player skin (FuncommandsX by example).

    Without this plugin, after modifying a player's colour and aiming at him, the voicemenu 1 1 command will just results in the generic "Spy" sound of your class.

    I tested my plugin the most possible and it should work in every cases but please report any problem you'll find.

    Code:
    Changelog:
    
    Version 1.1:
    - Plugin rewritten to be more efficient and easier to maintain.
    Version 1.2:
    - Message are now rewritten instead of being suppressed and recreated. (Thanks to MasterOfTheXP). - Cleaned up the code, mostly to use SM features which weren't available before. - Removed useless code parts.
    Attached Files
    File Type: sp Get Plugin or Get Source (spymessagefix.sp - 640 views - 11.8 KB)
    __________________

    Last edited by Flyflo; 06-05-2012 at 08:52.
    Flyflo is offline
    Spazman0
    Member
    Join Date: Jul 2008
    Old 10-10-2009 , 00:24   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #2

    Ooooh, looks good. I took a look at the source and looks like it should work, I'll get Arg! to implement this on his server, and then maybe he'll want to talk to you about implementing this in FuncommandsX.
    Spazman0 is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-16-2009 , 00:55   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #3

    I tested this when it was first posted, works like a charm
    DarthNinja is offline
    NegroCollegeFund
    Junior Member
    Join Date: Feb 2010
    Old 02-06-2010 , 19:50   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #4

    I've installed this along side FuncommandsX and it seems that players will randomly have or lose their spy radio voice, and using a command like !disco acts as a toggle, fixing and breaking the spy audio. Please help, I have to assume I'm doing something wrong as no one else has posted issues.

    Thanks
    Edit: Funnily enough, I used "sm plugins unload spymessagefix" and all seems well now. What gives?

    Last edited by NegroCollegeFund; 02-06-2010 at 20:19.
    NegroCollegeFund is offline
    Flyflo
    Senior Member
    Join Date: Jun 2008
    Location: Grenoble, France
    Old 02-07-2010 , 05:31   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #5

    Oh, I thought this plugin was not approved

    NegroCollegeFund, does it really happen randomly or do you know how I can reproduce the problem myself ?

    Last edited by Flyflo; 02-07-2010 at 05:56.
    Flyflo is offline
    NegroCollegeFund
    Junior Member
    Join Date: Feb 2010
    Old 02-07-2010 , 11:49   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #6

    It seems that the spy messages are broken upon server start; reloading, then unloading the spymessagefix plugin fixes it. I'll have to investigate more to see if there is a true pattern. I'd have done so already but its working fine right now. When there's less players on I'll restart it and get better info for you. I should have tested it in more detail before making my first post, my apologies.
    NegroCollegeFund is offline
    Flyflo
    Senior Member
    Join Date: Jun 2008
    Location: Grenoble, France
    Old 02-07-2010 , 12:30   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #7

    Thanks
    Anyway, I totally rewrote the plugin (397 lines less). It should be more efficient.
    Flyflo is offline
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 06-05-2012 , 02:48   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #8

    Sorry for ancient bump, but this is a very good fix idea...it's just that the current method (block the sound and emit a new one) is pretty glitchy in my experience. Sometimes it plays double sounds, and using another voice command doesn't stop the first one, etc...

    Here's a version that does everything the same, except it changes the current sound instead of playing another.
    Attached Files
    File Type: sp Get Plugin or Get Source (spymessagefix.sp - 315 views - 12.0 KB)
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP is offline
    Flyflo
    Senior Member
    Join Date: Jun 2008
    Location: Grenoble, France
    Old 06-05-2012 , 03:32   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #9

    Thanks,

    It was one of my first plugins and after looking at the code now, there are a lot of things to change
    I'll update it shortly with your modification and mine.

    PS: Done, attached 1.2 version in the first post.
    __________________

    Last edited by Flyflo; 06-05-2012 at 08:53.
    Flyflo is offline
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 06-05-2012 , 17:27   Re: [TF2] Fix spy broken radio messages
    Reply With Quote #10

    Alright, cool!

    Also, yeah, if you noticed, I goofed where it checked for the first client, which I just noticed but you seem to have caught first. Thanks for fixing it.
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP 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 21:31.


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