From 70250d7d4174baa2ff255c08d2ae73d83a1a3df3 Mon Sep 17 00:00:00 2001 From: flowtron Date: Tue, 15 Feb 2011 18:42:26 +0000 Subject: [PATCH] clean-up & commentary git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6106 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/Makefile | 2 -- source/src/serverms.cpp | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/src/Makefile b/source/src/Makefile index 7cc268f3..3122d239 100644 --- a/source/src/Makefile +++ b/source/src/Makefile @@ -18,13 +18,11 @@ MV=mv ifneq (,$(findstring MINGW,$(PLATFORM))) WINDRES= windres CLIENT_INCLUDES= $(INCLUDES) -I../include -# -lSDL_ttf CLIENT_LIBS= -mwindows -L../lib -lSDL -lSDL_image -lzdll -lopengl32 -lenet -lOpenAL32 -llibvorbisfile -llibintl -lws2_32 -lwinmm else USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi) override CXXFLAGS+= -rdynamic CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include -# -lSDL_ttf CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile endif diff --git a/source/src/serverms.cpp b/source/src/serverms.cpp index 85a536ad..21f12c0a 100644 --- a/source/src/serverms.cpp +++ b/source/src/serverms.cpp @@ -163,14 +163,15 @@ extern char *global_name; extern int interm; extern int totalclients; -// send alive signal to masterserver after 40 minutes of uptime and during an intermission (so theoretically <= 1 hour) - after 1 hour at the latest. +// send alive signal to masterserver after 40 minutes of uptime and if currently in intermission (so theoretically <= 1 hour) +// TODO?: implement a thread to drop this "only in intermission" business, we'll need it once AUTH gets active! static inline void updatemasterserver(int millis, int port) { if(!lastupdatemaster || ((millis-lastupdatemaster)>40*60*1000 && (interm || !totalclients))) { char servername[30]; memset(servername,'\0',30); filtertext(servername,global_name,-1,20); if(mastername[0]) requestmasterf("regserv %d %s %d\n", port, servername[0] ? servername : "noname", AC_VERSION); - lastupdatemaster = millis ? millis : 1; + lastupdatemaster = millis + 1; } }