From: bones_was_here Date: Sun, 2 Aug 2020 04:21:31 +0000 (+1000) Subject: Avoid `changelevel` during server startup when using versioned csprogs pk3 X-Git-Tag: xonotic-v0.8.5~729^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5a664532be20d9832f0d5509c7a019b71e9417af;p=xonotic%2Fxonotic-data.pk3dir.git Avoid `changelevel` during server startup when using versioned csprogs pk3 --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index f62926be4..22f9b1ae7 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -15,7 +15,7 @@ BUILD_MOD ?= ifndef ZIP ifneq ($(shell which zip 2>/dev/null),) - ZIP := zip -9m + ZIP := zip -9mD endif ifneq ($(shell which 7z 2>/dev/null),) ZIP := 7z a -tzip -mx=9 -sdel @@ -80,6 +80,7 @@ clean: | $(WORKDIR) $(RM) $(WORKDIR)/*.txt $(RM) $(WORKDIR)/qccversion.* $(RM) $(WORKDIR)/csprogs-* + $(RM) $(WORKDIR)/autoexec/csprogs-*.cfg $(RM) csprogs-*.pk3 .PHONY: qc @@ -95,14 +96,16 @@ pk3: csprogs-$(VER).pk3 %-$(VER).pk3: $(PROGS_OUT)/%.dat $(eval PROG=$*) $(eval PK3=$(PROG)-$(VER).pk3) - $(eval TXT=$(PROG)-$(VER).txt) + $(eval CFG=autoexec/$(PROG)-$(VER).cfg) $(eval DAT=$(PROG)-$(VER).dat) $(eval LNO=$(PROG)-$(VER).lno) - @ echo "http://xonotic.org" > $(WORKDIR)/$(TXT) + @ mkdir -p $(WORKDIR)/autoexec + @ echo "// http://xonotic.org" > $(WORKDIR)/$(CFG) + @ echo "set csqc_progname $(DAT)" >> $(WORKDIR)/$(CFG) @ cp -f $(PROGS_OUT)/$(PROG).dat $(WORKDIR)/$(DAT) @ cp -f $(PROGS_OUT)/$(PROG).lno $(WORKDIR)/$(LNO) @ $(RM) $(PROG)-*.pk3 - cd $(WORKDIR) && $(ZIP) $(CURDIR)/$(PK3) $(TXT) $(DAT) $(LNO) + cd $(WORKDIR) && $(ZIP) $(CURDIR)/$(PK3) $(CFG) $(DAT) $(LNO) QCCVERSION := $(shell cd lib && $(QCC) --version) QCCVERSIONFILE := $(WORKDIR)/qccversion.$(shell echo ${QCCVERSION} | git hash-object --stdin) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 88d531ae9..3d884a288 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -962,7 +962,7 @@ spawnfunc(worldspawn) // fill sv_curl_serverpackages from .serverpackage files if (autocvar_sv_curl_serverpackages_auto) { - string s = "csprogs-" WATERMARK ".txt"; + string s = "csprogs-" WATERMARK ".dat"; // remove automatically managed files from the list to prevent duplicates for (int i = 0, n = tokenize_console(cvar_string("sv_curl_serverpackages")); i < n; ++i) {