Skip to content

Commit

Permalink
persistteam on/off works
Browse files Browse the repository at this point in the history
  • Loading branch information
greghaynes committed Nov 14, 2009
1 parent cf25b3d commit dfbcebb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fpsgame/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace server
which wont be effected by the autoteam function. */
bool pregame_setteam(clientinfo *ci, char *team)
{
if(!ci || !strcmp(ci->team, team)) return false;
if(!ci) return false;
ci->state.timeplayed = -1;
if(!strcmp(ci->team, team)) return true;
copystring(ci->team, team, MAXTEAMLEN+1);
Expand Down
3 changes: 2 additions & 1 deletion src/pyscripts/xsbs/persistteam.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from xsbs.events import eventHandler
from xsbs.commands import commandHandler
from xsbs.players import all as allPlayers
from xsbs.players import player, all as allPlayers
from xsbs.ui import error, notice
from UserPrivilege.userpriv import masterRequired
import sbserver

player_pteams = []

@eventHandler('autoteam')
def onAutoteam():
for p in player_pteams:
sbserver.pregameSetTeam(p[0], p[1])
Expand Down

0 comments on commit dfbcebb

Please sign in to comment.