1

I am running a dedicated server for Team Fortress 2 and I have SourceMod installed.

I would like to include replay support, which is presently almost functional. By almost functional I mean that it works how I want it to, but I have to manually start it.

My server.cfg calls replay.cfg like so

exec replay.cfg

which gets me to where I am now. I need to manually run a map change to get it going. The reason why I can't have replay.cfg trigger a map change is that the map change would call server.cfg and thus replay.cfg getting us stuck in an infinite loop.

What I really need is the ability to run a config file if and only if it was called by a server initial start up and not a map change.

Thanks in advance.

1

TF2's version of srcds has a command-line switch -replay that will automatically exec replay.cfg for you on server startup.

This switch also does some magic with maxplayers (i.e. it adds an additional player slot and hides it from the server browser).

Alternately, you can create a cfg/autoexec.cfg and add exec replay.cfg to it, but this doesn't do the previously mentioned slot magic. autoexec.cfg is only processed on server startup and happens before the server loads the first map.

1

The solution I now have deployed is having the server start to an unused map (cp_cloak) and have the map config file (cp_cloak.cfg) do a changelevel to the server's primary map. This satisfies the Map change required complaint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.