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

[TF2] The Hidden (v2.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Zhoporychka
Junior Member
Join Date: Dec 2011
Location: Internet
Old 06-11-2012 , 16:13   Re: [TF2] The Hidden (v1.61)
Reply With Quote #131

I had this mod installed on my server recently, works pretty fine and it's in rotation with other stuff so we have people to play. Still sad that it's kinda unfinnished There is stuff missing like you can't see who will be the next boss.... If someone made any more adjustments to the plugin and are willing to share that would be great.. ^_^
__________________

Zhoporychka is offline
Send a message via Skype™ to Zhoporychka
Matheus28
Senior Member
Join Date: Aug 2009
Old 07-07-2012 , 12:53   Re: [TF2] The Hidden (v2.0)
Reply With Quote #132

I have fixed the plugin myself and uploaded it. I'm not quite sure why anyone would want to see who's the next boss though, so I haven't implemented it.

Last edited by Matheus28; 07-07-2012 at 13:07.
Matheus28 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-12-2012 , 18:46   Re: [TF2] The Hidden (v2.0)
Reply With Quote #133

Matheus28: HI

Firstly, sorry that it's taken ages for me (or anybody) to get around to re-reviewing this.

The only real issue that I see is in the player_team event handler. The logic for ignoring clients seems to be reversed, likely from just typoing it. It exits if the player is in game, rather than if the player is not in game.

Fix that, and I will approve it.


Some less critical things:

* The IsClientSourceTV and IsClientReplay checks in SelectHidden are redundant. IsFakeClient catches those cases.

* The instructions to press right-click to attack and R to use your special should probably be press alt-attack and press reload. Not all uses have the same keybinds. Alternatively, if you use a hint message instead of chat, you can use identifiers like %attack2% and %reload% and it will translate them to whatever key the client has bound.

*
Code:
SetCommandFlags("r_screenoverlay", GetCommandFlags("r_screenoverlay") & (~FCVAR_CHEAT));         ClientCommand(client, "r_screenoverlay %s", overlay);
Does this work? r_screenoverlay only exists on the client, not the server, and I was under the impression that SetCommandFlags only touches commands that exist on the server. (no communication to the client for it).

--

I also notice that there is a large amount of logic done in OnGameFrame (every frame), and in OnPlayerRunCmd (every frame, for each player).

You might want to consider using the SM profiler and optimizing if the server seems to be taking noticeably more resources with the mod running, especially with other plugins loaded.

For example,
Code:
SetEntDataFloat(i, FindSendPropInfo("CTFPlayer", "m_flMaxspeed"), 400.0, true);
can be done with just SetEntPropFloat

For cases where you check TF2_IsPlayerInCondition and then only use TF2_RemoveCondition if true, you can skip the check. There is no harm in calling RemoveCondition if the condition is not set. (your disguised, dead ringer, and kritzkrieg checks in OnGameFrame).

In OnPlayerRunCmd, you can fold
Code:
            if(buttons & IN_FORWARD             || buttons & IN_BACK             || buttons & IN_MOVELEFT             || buttons & IN_MOVERIGHT             || buttons & IN_JUMP             ){
into
Code:
if((buttons & IN_FORWARD|IN_BACK|IN_MOVELEFT|IN_MOVERIGHT|IN_JUMP) > 0)
though the difference for just math will likely be negligible even for per frame per client, and that's assuming that the compiler combines the constants.
psychonic is offline
atomicpenguin
Junior Member
Join Date: Aug 2012
Old 01-25-2013 , 15:37   Re: [TF2] The Hidden (v2.0)
Reply With Quote #134

Myself and a friend have taken a shot at improving this and correcting outstanding bugs in this unmaintained plugin. New plugin thread here.

Thank you for the work you put into creating this Matheus28, we have had a lot of fun tinkering and playing this mod.
atomicpenguin is offline
Send a message via AIM to atomicpenguin
Reply



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 13:47.


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