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

Team Balance Immunity


Post New Thread Reply   
 
Thread Tools Display Modes
Afronanny
Veteran Member
Join Date: Aug 2009
Old 06-15-2010 , 15:43   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #11

Quote:
Originally Posted by blik View Post
Windows servers crash as they start



Look forward to fixed/tested windows binary.
I'll try getting that sig again, and update if it's wrong. It's the gamedata that's the issue, not a binary issue.

EDIT:
Found a better sig i think. Just downloaded the windows server and the new sig loads fine for me (the old one, as you said, crashed). I attached the new gamedata file to this post, and pushed it to the repo
Attached Files
File Type: txt autobalanceblocker.txt (417 Bytes, 306 views)

Last edited by Afronanny; 06-15-2010 at 16:05.
Afronanny is offline
blik
Senior Member
Join Date: May 2006
Old 06-15-2010 , 16:10   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #12

That was quick

Can confirm server doesn't crash now
blik is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 06-15-2010 , 16:17   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #13

This is near identical to the one I made a while ago.
The only difference is, since in some situations this still balances, I prevent it from even seeing the player. To do this, replace your IsAlive detour with one for CBasePlayer *CTeam::GetPlayer(int iIndex)

These sigs are what I got a long time ago, and haven't broken since... so maybe they would work good for you:
Code:
"Games"
{
    "tf"
    {
        "Signatures"
        {
            "BalanceTeams"
            {
                "library"    "server"
                "windows"    "\xA1\x2A\x2A\x2A\x2A\x83\xEC\x1C\x55\x33"
                "linux"        "_ZN24CTeamplayRoundBasedRules12BalanceTeamsEb"
            }
            "TeamGetPlayer"
            {
                "library"    "server"
                "windows"    "\x8B\x81\x14\x03\x00\x00\x8B\x4C\x24\x04"
                "linux"        "_ZN5CTeam9GetPlayerEi"
            }
        }
    }
}
Also, in your code, completely irrelevant, but you have bool unknown, that's bRequireSwitcheesToBeDead
So, you may expect, if that's false, then IsAlive method just doesn't work.
AltPluzF4 is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 06-15-2010 , 16:25   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #14

Quote:
Originally Posted by AltPluzF4 View Post
Also, in your code, completely irrelevant, but you have bool unknown, that's bRequireSwitcheesToBeDead
So, you may expect, if that's false, then IsAlive method just doesn't work.
So if bRequireSwitcheesToBeDead magically happens to be true when BalanceTeams is called in the detour, then the current method of whether or not the player is alive should be sufficient.

Last edited by Afronanny; 06-15-2010 at 17:13.
Afronanny is offline
AltPluzF4
Senior Member
Join Date: Aug 2007
Old 06-15-2010 , 17:10   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #15

Quote:
Originally Posted by Afronanny View Post
So if I call BalanceTeams(true) , there should be no problems with my current method, right?
Hopefully.... but when I did that, the guy that I made it for kept complaining that his donators were still being switched sometimes.
I guess if everyone on the team just happens to be dead it ignores that? I can't remember, it's been a while since I looked at the code.

Not sure, but if you do end up having trouble, you now have another method ;-)
AltPluzF4 is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 06-15-2010 , 17:14   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #16

Quote:
Originally Posted by AltPluzF4 View Post
Hopefully.... but when I did that, the guy that I made it for kept complaining that his donators were still being switched sometimes.
I guess if everyone on the team just happens to be dead it ignores that? I can't remember, it's been a while since I looked at the code.

Not sure, but if you do end up having trouble, you now have another method ;-)
Thanks
Afronanny is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-17-2010 , 02:42   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #17

Nice work. There are some private extensions similar to this that have existed for a long time that handle all aspects of valves auto-balancing and immunities. Ive always wanted to get my hands on it but havnt been able to.

There are some features from these extensions id like to request maybe...

1) Cvar for specifying class immunities. Some way to give immunity for lets say, medics and engineers. Very important and one thing some plugins and valves auto-balance fail to account for.

2) Some of the private extensions prevent players from switching back for X cvar specified amount of seconds. This would also be a awesome feature. (I realize this may not be relative to this extensions function though)

If you could implement class immunities to go with admin immunities, that would be amazing....

Last edited by retsam; 06-17-2010 at 03:14.
retsam is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 06-17-2010 , 11:08   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #18

Quote:
Originally Posted by retsam View Post
Nice work. There are some private extensions similar to this that have existed for a long time that handle all aspects of valves auto-balancing and immunities. Ive always wanted to get my hands on it but havnt been able to.

There are some features from these extensions id like to request maybe...

1) Cvar for specifying class immunities. Some way to give immunity for lets say, medics and engineers. Very important and one thing some plugins and valves auto-balance fail to account for.

2) Some of the private extensions prevent players from switching back for X cvar specified amount of seconds. This would also be a awesome feature. (I realize this may not be relative to this extensions function though)

If you could implement class immunities to go with admin immunities, that would be amazing....
It's easy to do if you know how to code plugins. I'm working on class immunities now, and I'll get to enforcement soon.

EDIT: Class immunity attached to this post.
EDIT EDIT: fixed for newer version of extension

Code:
// This file was auto-generated by SourceMod (v1.3.2)
// ConVars for plugin "classimmunity.smx"


// Admin flags for immunity based on admin - if no flag is set then admins will not receive immunity
// -
// Default: "s"
tbi_adminflags "s"

// Give immunity to demomen
// -
// Default: "0"
tbi_demomen "0"

// Give immunity to engineers
// -
// Default: "0"
tbi_engineer "0"

// Give immunity to heaviess
// -
// Default: "0"
tbi_heavy "0"

// Give immunity to medics
// -
// Default: "0"
tbi_medic "0"

// Give immunity to pyros
// -
// Default: "0"
tbi_pyro "0"

// Give immunity to scouts
// -
// Default: "0"
tbi_scout "0"

// Give immunity to snipers
// -
// Default: "0"
tbi_sniper "0"

// Give immunity to soldiers
// -
// Default: "0"
tbi_soldier "0"

// Give immunity to spies
// -
// Default: "0"
tbi_spy "0"
Attached Files
File Type: sp Get Plugin or Get Source (classimmunity.sp - 680 views - 3.0 KB)

Last edited by Afronanny; 08-08-2010 at 17:54.
Afronanny is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-17-2010 , 14:15   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #19

Cool thx. I was thinking you would have to edit the extension for that, but I guess you got it set up so you can use the forwards with the plugin. I guess I should read the OP better. I could have easily done that myself, sorry. Anyways thx.

Ill probably recode that a bit to use some bools for checking admin flag ahead of time. Also may make some globals for the cvars.


Also, minor error, you forgot to change the cvar handles in pluginstart. You have most of the class ones as soldier.

Last edited by retsam; 06-17-2010 at 16:01.
retsam is offline
blik
Senior Member
Join Date: May 2006
Old 06-18-2010 , 05:15   Re: [EXTENSION] TF2 Team Balance Immunity
Reply With Quote #20

Been working great since I started using it.


Quote:
Originally Posted by retsam View Post
2) Some of the private extensions prevent players from switching back for X cvar specified amount of seconds. This would also be a awesome feature. (I realize this may not be relative to this extensions function though)
Would love to see an extension for this aswell!
blik 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 09:54.


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