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

[TF2] Friendly Mode (v. 16.0112)


Post New Thread Reply   
 
Thread Tools Display Modes
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 12-06-2013 , 15:20   Re: [TF2] Friendly Mode (v. 13.1121.0)
Reply With Quote #231

"Slaying" a player is just forcing that player to commit suicide, which my plugin will never interfere with.

The transparency cvars are detailed in the first post (the sm_friendly_alpha* cvars). I'm hoping to eventually replace them with a SetTransmit hook once RealLife™ starts giving me more time for video games and related things.

EDIT: Actually, now that I think about it, depending on the setting of sm_friendly_noblock, the @aim "bullet" that admins would use MIGHT go right through the Friendly player (I'm not sure, and I'm not in a position to test this). If you are experiencing issues, try turning down that cvar until it stops becoming an issue.
__________________

Last edited by ddhoward; 12-06-2013 at 15:29.
ddhoward is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 12-15-2013 , 23:03   Re: [TF2] Friendly Mode (v. 13.1121.0)
Reply With Quote #232

Are friendly spies able to take teleporters, preventing someone else from taking it who may have wanted to?
__________________
Chdata is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 12-28-2013 , 16:39   Re: [TF2] Friendly Mode (v. 13.1121.0)
Reply With Quote #233

Uploading new version 13.1228.0. It is attached to this post, has been pushed to the server that Updater downloads from, and will soon replace the version in the first post in this thread (as soon as I get back from work, I'm running late as I type this) Changes include:
  • Added the Festive Crusader's Crossbow and the Festive Jarate to the list of weapons blocked by default.

  • BUGFIX: Improved weapon blocking functionality if a player enabled Friendly mode while spinning up a minigun that is blocked from Friendly mode. Big thanks to pheadxdll's Melee Only plugin for code example.

  • Changed the default values of the weapon/taunt blocking cvars. "-2" now means "disabled" and "-1" now means "use the default list." 0 and 1 will continue to act as substitutes for -2 and -1 respectively for the next two updates; it is recommended that you update to the new values in any cfg's that you have before then. This change was made necessary due to conflicts with the stock bat and stock bottle.

  • Added cvar sm_friendly_spellbook with default value of "1". When enabled, the plugin will stop friendly players from picking up spells on maps with spells (helltower mostly).

  • Added cvar sm_friendly_usetele with default value of "3".

    • 0 = All teleporters can be used as normal.

    • 1 = Friendly players will be unable to use non-friendly players' teleporters, thus saving the teleporter charges for players who are actually playing the game.

    • 2 = Non-friendly players cannot use Friendly teleporters. This will help maintain a Friendly engineer's separation from combat.

    • 3 = Both 1 and 2 apply.


  • Removed sm_friendly_r command


Please let me know if you run into any issues. Please also consider installing Updater if you haven't already!


If you like what you see here, please consider donating~
Attached Files
File Type: smx friendly.smx (65.1 KB, 85 views)
File Type: sp Get Plugin or Get Source (friendly.sp - 91 views - 140.2 KB)
__________________

Last edited by ddhoward; 12-28-2013 at 16:41.
ddhoward is offline
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 12-29-2013 , 05:32   Re: [TF2] Friendly Mode (v. 13.1121.0)
Reply With Quote #234

Quote:
Originally Posted by ddhoward View Post
  • Changed the default values of the weapon/taunt blocking cvars. "-2" now means "disabled" and "-1" now means "use the default list." 0 and 1 will continue to act as substitutes for -2 and -1 respectively for the next two updates; it is recommended that you update to the new values in any cfg's that you have before then. This change was made necessary due to conflicts with the stock bat and stock bottle.
Does this include every cvar in the WEAPON BLOCKING SETTINGS section of the config?

Edit
Found a bug, not sure if it's related to the update or not. It appears using refill cabinets to equip a new weapon while friendly, will remove that weapon. You can essentially swap all 3 of your weapons while in friendly mode, use a refill cabinet and then have all your weapons taken off of you. Never ran into this before so not sure if this is a new bug or not. This is also with the weapon blocks on and off, so I don't think it's that.

Last edited by Snaggle; 12-29-2013 at 05:51.
Snaggle is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 12-29-2013 , 06:45   Re: [TF2] Friendly Mode (v. 13.1121.0)
Reply With Quote #235

Quote:
Originally Posted by Snaggle View Post
Does this include every cvar in the WEAPON BLOCKING SETTINGS section of the config?
Yes. This applies to all 4. 0 and 1 will continue to work as normal for the next little while, but an upcoming update will remove that functionality, so it is recommended to switch to -2/-1 now.

Quote:
Found a bug, not sure if it's related to the update or not. It appears using refill cabinets to equip a new weapon while friendly, will remove that weapon. You can essentially swap all 3 of your weapons while in friendly mode, use a refill cabinet and then have all your weapons taken off of you. Never ran into this before so not sure if this is a new bug or not. This is also with the weapon blocks on and off, so I don't think it's that.
Take a look at the settings/description of sm_friendly_notarget. I believe that this is your issue. This is the result of an old Source bug that causes weapons to not be given if the FL_NOTARGET flag is on a player. This flag is necessary to stop Friendly players from griefing sentries.
__________________

Last edited by ddhoward; 12-29-2013 at 07:07.
ddhoward is offline
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 12-29-2013 , 07:33   Re: [TF2] Friendly Mode (v. 13.1228.0)
Reply With Quote #236

That appears to of done the trick, many thanks for the work.
Snaggle is offline
Tank Missile
Member
Join Date: Aug 2013
Old 01-14-2014 , 19:48   Re: [TF2] Friendly Mode (v. 13.1228.0)
Reply With Quote #237

It would be great if we were able to block certain commands while being friendly, since this plugin has compatibility issues and can be exploited under the right conditions. Shapeshift, for example, causes players to lose their weapons when changing class while friendly, causing their model to go into a T stance. Considering command blocking revolves around flags, I am unsure if it can be done.
Tank Missile is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-14-2014 , 20:14   Re: [TF2] Friendly Mode (v. 13.1228.0)
Reply With Quote #238

Edit the command in question to add a TF2Friendly_IsFriendly(client) check. If true, then return Plugin_Handled and maybe ReplyToCommand() with an appropriate error message. You will need to utilize friendly.inc for this.

As for that particular plugin's conflict with Friendly Mode, simply have the plugin remove the FL_NOTARGET flag from the Friendly player before weapons are changed. Then give the flag back immediately once the new weapons have been given.

(The flag is necessary for Friendly players to be ignored by sentries. Not having the flag can cause a Friendly player to be an immortal sentry-distracter, but having the flag, due to an old ass weird Valve bug, causes players to not be able to equip new weapons. Setting sm_friendly_notarget to 0 will fix the conflict with Shapeshift, but will cause all Friendly players to be shot at by sentries.)
__________________

Last edited by ddhoward; 01-14-2014 at 20:37.
ddhoward is offline
Tank Missile
Member
Join Date: Aug 2013
Old 01-23-2014 , 03:03   Re: [TF2] Friendly Mode (v. 13.1228.0)
Reply With Quote #239

In that case I think disabling using the plugin while being friendly is the way to go. The problem is, I'm not very educated in source code. I have no clue how I would do this.
Tank Missile is offline
wauterboi
Junior Member
Join Date: Dec 2013
Old 01-23-2014 , 19:42   Re: [TF2] Friendly Mode (v. 13.1228.0)
Reply With Quote #240

It would be really nice if you could noclip while friendly!
wauterboi is offline
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 20:46.


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