Scripts:Patches:autobalance.py

From BF2 Technical Information Wiki
Jump to: navigation, search

This is a diff from the original autobalance.py file to a version that supports Commander and Squad Leader autobalance-immunity.

You can also download this here: autobalance.py.diff

--- autobalance.py.orig	2005-07-17 02:21:07.454587352 +0200
+++ autobalance.py	2005-07-17 01:53:34.612857488 +0200
@@ -67,10 +67,20 @@
 
 	if (p.getTeam() == 1):
 		if (team2+1) < team1:
-			p.setTeam(2)			
+			if p.isCommander():		# dont use autobalance on the Commander
+				p.setTeam(1)
+			elif p.isSqaudLeader():		# dont use autobalance on Squad Leaders
+				p.SetTeam(1)
+			else:				# do use autobalance on Squad Members and the Lone Wolf
+				p.SetTeam(2)
 	elif (p.getTeam() == 2):
 		if (team1+1) < team2:
-			p.setTeam(1)			
+			if p.isCommander():		# dont use autobalance on the Commander
+				p.setTeam(2)
+			elif p.isSquadLeader():		# dont use autobalance on Squad Leaders
+				p.setTeam(2)
+			else:				# do use autobalance on Squad Members and the Lone Wolf
+				p.setTeam(1)
 
 
 		
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox