[SCM] Packaging for Red Eclipse branch, master-svn-ppa, updated. debian/1.2-2-52-g97e4152

Martin Erik Werner martinerikwerner at gmail.com
Tue Aug 7 19:30:07 UTC 2012


The following commit has been merged in the master-svn-ppa branch:
commit 5804239fc6292da0cab745ff8c4107bbff94d84c
Author: Martin Erik Werner <martinerikwerner at gmail.com>
Date:   Wed Aug 1 18:09:50 2012 +0200

    Imported Upstream version 1.2+svn3786

diff --git a/changelog.txt b/changelog.txt
index 21e1eda..9c16559 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,52 +1,57 @@
-Red Eclipse 1.3
+= Red Eclipse 1.3 =
 Gameplay:
-* Rocket launcher now spawns in instagib
-* Melee no longer requires an impulse action before (back to 1.1 behaviour)
+ * Rocket launcher now spawns in instagib
+ * Melee no longer requires an impulse action before (back to 1.1 behaviour)
 
 Audio & Visuals:
-* Corrected icon size for x32 and x48 versions
-* track_11, track_12, new music
+ * Corrected icon size for x32 and x48 versions
+ * track_11, track_12, new music
 
 Maps:
-Institute, new map
-Biolytic, new map
+ * Institute, new map
+ * Biolytic, new map
+ * Ares, updated to version 1.9
+ * Conflict, new map
+ * Fourplex, new map
+ * Starlibido, new map
+ * Industrual, new map
+ * mapname.wpt and mapname.txt is now included when sending a map
 
 Modes & Mutators:
-* Hover mutator removed
+ * Hover mutator removed
 
 Modding:
-* Brush selection now mapped to K+wheel (unbound in 1.2, J+wheel in 1.1)
-* Removed kitchen and kitchen1 textures from trak4 (unused)
-* arid2, new skybox
+ * Brush selection now mapped to K+wheel (unbound in 1.2, J+wheel in 1.1)
+ * Removed kitchen and kitchen1 textures from trak4 (unused)
+ * arid2, new skybox
 
 Misc:
-* Now possible to allow demo recording for masters (/restrictdemos 0)
-* SDL 1.2.15
-* Remove "-r" command-line option
-* Added server hosting and player guidelines for the master server
-* Enet 1.3.4
-* 64bit builds for Windows
-* Use APP/app* variables for name abstraction (simplifies forking/install renaming)
+ * Now possible to allow demo recording for masters (/restrictdemos 0)
+ * SDL 1.2.15
+ * Remove "-r" command-line option
+ * Added server hosting and player guidelines for the master server
+ * Enet 1.3.4
+ * 64bit builds for Windows
+ * Use APP/app* variables for name abstraction (simplifies forking/install renaming)
 
 Additional Fixed Bugs:
-* #103 [minor] Revenge-seeking remains after team-change
-* #112 Fix server browser sorting full servers to the bottom
-* #115 When joining mid-match, bomber-ball affinities aren't enabled
-* #128 Buff state not properly synchronised
-* #129 Spawn rotation problems
-* #136 Arena-expert and submodes are bugged (rocket & grenade select issues)
-* #132 venus geom errors
-* #135 ghost geom errors
-* #117 Team-duel problems (force cycle team member after 3 wins)
-* #113 Botbalance isues (breaks if teambalance = 2 or team imbalance is > 1)
-* #154 Fix darkness omega bb-goal to be at same position as alpha
+ * #103 [minor] Revenge-seeking remains after team-change
+ * #112 Fix server browser sorting full servers to the bottom
+ * #115 When joining mid-match, bomber-ball affinities aren't enabled
+ * #128 Buff state not properly synchronised
+ * #129 Spawn rotation problems
+ * #136 Arena-expert and submodes are bugged (rocket & grenade select issues)
+ * #132 venus geom errors
+ * #135 ghost geom errors
+ * #117 Team-duel problems (force cycle team member after 3 wins)
+ * #113 Botbalance isues (breaks if teambalance = 2 or team imbalance is > 1)
+ * #154 Fix darkness omega bb-goal to be at same position as alpha
+ * #158 Possibility to miss first checkpoint on testchamber
+ * #161 Include waypoints and text file with sendmap
 
-
-
-Red Eclipse 1.2
+= Red Eclipse 1.2 =
 Gameplay:
- * Powerjump removed, replaced with "impulse launch", use by jumping whilst
-   "impulse sliding"
+ * Powerjump removed, replaced with "impulse launch", use by jumping whilst "impulse sliding"
  * Impulse moves now disregard cost and scale depending on available energy
  * Special melee actions now require an impulse move beforehand
  * Plasma primary damage increased
@@ -57,8 +62,8 @@ Gameplay:
  * Zoomlock disabled for rifle
  * Added weapon stun effect which impedes movement for a certain time
  * Made the carrier of the flag/bomb move slower
- * New "buff" system for flag/goal defenders: increases regeneration, damage,
-   and shielding
+ * New "buff" system for flag/goal defenders: increases regeneration, damage, and shielding
+
 Audio & Visuals:
  * New weapon model for pistol
  * Ingame music
@@ -69,6 +74,7 @@ Audio & Visuals:
  * Female variation of player model (set in profile)
  * Added visible counter and warning for imminent explosion in Bomber ball
  * New 'radarstyle' option displaying absolute positions
+
 Maps:
  * Ares, new map
  * Cargo, new map
@@ -78,24 +84,28 @@ Maps:
  * Dutility, revamped
  * Tower, re-added and revamped
  * Error, added AI waypoints
+
 Modes & Mutators:
  * League mutator removed
  * Instagib-vampire combination disabled
  * Multi-team mutator re-added
  * Jetpack mutator re-added
  * 'instagibfilter' variable: disallow certain mutators combining with instagib
+
 Modding:
  * New map editing menu, available via [F3]
  * Editing mode has been made more obvious to the user
  * cube2font tool for generating game fonts, including documentation
  * Ability to add a second cloudlayer with the envlayer command
  * Ability to specify bitwise modes and mutators on entities that check them
+
 Misc:
  * AI waypoints separated out from ents, overall major AI improvements
  * Split apart kick and ban commands so users can be removed without a ban
  * Copyright cleanup, new trademark policy
  * *roff manpages for *nix systems
  * system-install make target for packaging convenience
+
 Additional Fixed Bugs:
  * #8 AI performance issues
  * #30 Use RE_DIR=$(dirname $0) in launch script
@@ -114,11 +124,9 @@ Additional Fixed Bugs:
  * #50 Use "aiclip" on common areas where bots can't travel
  * #53 can't drop flag in ctf-protect
  * #60 Live Support does not work correctly
- * #65 Clicking the Red Eclipse icon on map selection without selecting a map
-       produces an error message
+ * #65 Clicking the Red Eclipse icon on map selection without selecting a map produces an error message
  * #66 Winning a conquer defend-the-flag match yields an insanely high score
  * #69 Edit mode segfault
  * #70 Temporarily missing sound for Flamer primary fire after reload
  * #74 better Link line colors
  * #81 Killing the opponent team in Survivor CTF/BB does not yield you a point
-
diff --git a/src/Makefile b/src/Makefile
index 1817794..5cdd67f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -170,13 +170,13 @@ ifneq (,$(STRIP))
 endif
 else
 client: libenet $(CLIENT_OBJS)
-	$(CXX) $(CXXFLAGS) -o $(APPCLIENT) $(CLIENT_OBJS) $(CLIENT_LIBS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APPCLIENT) $(CLIENT_OBJS) $(CLIENT_LIBS)
 ifneq (,$(STRIP))
 	$(STRIP) $(APPCLIENT)
 endif
 
 server: libenet $(SERVER_OBJS)
-	$(CXX) $(CXXFLAGS) -o $(APPSERVER) $(SERVER_OBJS) $(SERVER_LIBS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(APPSERVER) $(SERVER_OBJS) $(SERVER_LIBS)
 ifneq (,$(STRIP))
 	$(STRIP) $(APPSERVER)
 endif
@@ -193,7 +193,7 @@ shared/cube2font.o: shared/cube2font.c
 	$(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
 
 cube2font: shared/cube2font.o
-	$(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz
 
 install-cube2font: cube2font
 	install -d ../bin
@@ -210,6 +210,7 @@ depend:
 all: client server
 
 include system-install.mk
+include dist.mk
 
 engine/engine.h.gch: shared/cube.h.gch
 game/game.h.gch: shared/cube.h.gch engine/engine.h.gch
diff --git a/src/dist.mk b/src/dist.mk
new file mode 100644
index 0000000..abb1e1c
--- /dev/null
+++ b/src/dist.mk
@@ -0,0 +1,47 @@
+appversion=$(shell sed -n 's,.*RE_VER_STR.*"\(.*\)",\1,p' engine/engine.h)
+dirname=$(APPNAME)-$(appversion)
+tarname=$(APPNAME)_$(appversion)_linux_bsd.tar
+
+../$(dirname):
+	rm -rf ../$(dirname)
+	tar \
+		--exclude-vcs --exclude-backups \
+		--exclude='../$(dirname)' --exclude='../$(tarname)*' \
+		--exclude='*.o' --exclude='*.lo' --exclude='*.gch' \
+		--exclude='*src/reclient' --exclude='*src/reserver' \
+		--exclude='*.exe' --exclude='*.dll' \
+		--exclude='*redeclipse.app*' --exclude='*.bat' \
+		--exclude='*src/lib*' --exclude='*src/include*' \
+		--exclude='*src/xcode*' --exclude='*src/site*' \
+		-cf - ../ | (mkdir ../$(dirname)/; cd ../$(dirname)/ ; tar -xpf -)
+	$(MAKE) -C ../$(dirname)/src clean
+	-$(MAKE) -C ../$(dirname)/src/enet distclean
+	rm -rf ../$(dirname)/src/enet/autom4te.cache/
+
+distdir: ../$(dirname)
+
+../$(tarname): ../$(dirname)
+	tar -cf ../$(tarname) ../$(dirname)
+
+dist-tar: ../$(tarname)
+
+dist-gz: ../$(tarname)
+	gzip -c < ../$(tarname) > ../$(tarname).gz
+
+dist-bz2: ../$(tarname)
+	bzip2 -c < ../$(tarname) > ../$(tarname).bz2
+
+dist-xz: ../$(tarname)
+	xz -c < ../$(tarname) > ../$(tarname).xz
+
+dist: dist-bz2
+
+dist-all: dist-gz dist-bz2 dist-xz
+
+dist-clean:
+	rm -rf ../$(dirname)
+	rm -f ../$(tarname)
+	rm -f ../$(tarname).gz
+	rm -f ../$(tarname).bz2
+	rm -f ../$(tarname).xz
+
diff --git a/src/enet/ChangeLog b/src/enet/ChangeLog
index 11b0f7f..52ca8d0 100644
--- a/src/enet/ChangeLog
+++ b/src/enet/ChangeLog
@@ -1,4 +1,9 @@
+ENet 1.3.5 (July 31, 2012):
+
+* fixed bug in unreliable packet fragment queuing
+
 ENet 1.3.4 (May 29, 2012):
+
 * added enet_peer_ping_interval() for configuring per-peer ping intervals
 * added enet_peer_timeout() for configuring per-peer timeouts
 * added protocol packet size limits
diff --git a/src/enet/Makefile.in b/src/enet/Makefile.in
index dfa16e3..ef6946c 100644
--- a/src/enet/Makefile.in
+++ b/src/enet/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -18,6 +18,23 @@
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -105,6 +122,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	$(LDFLAGS) -o $@
 SOURCES = $(libenet_la_SOURCES)
 DIST_SOURCES = $(libenet_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 DATA = $(nodist_pkgconfig_DATA)
 HEADERS = $(enetinclude_HEADERS)
 ETAGS = etags
@@ -300,7 +322,6 @@ libenet.pc: $(top_builddir)/config.status $(srcdir)/libenet.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
 	list2=; for p in $$list; do \
 	  if test -f $$p; then \
@@ -308,6 +329,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	  else :; fi; \
 	done; \
 	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
 	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
 	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
 	}
@@ -379,8 +402,11 @@ distclean-libtool:
 	-rm -f libtool config.lt
 install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
-	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
 	@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -397,8 +423,11 @@ uninstall-nodist_pkgconfigDATA:
 	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-enetincludeHEADERS: $(enetinclude_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(enetincludedir)" || $(MKDIR_P) "$(DESTDIR)$(enetincludedir)"
 	@list='$(enetinclude_HEADERS)'; test -n "$(enetincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(enetincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(enetincludedir)" || exit 1; \
+	fi; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
@@ -564,7 +593,7 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	chmod -R a-w $(distdir); chmod u+w $(distdir)
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
diff --git a/src/enet/aclocal.m4 b/src/enet/aclocal.m4
index 606fa43..33d4567 100644
--- a/src/enet/aclocal.m4
+++ b/src/enet/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -38,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -54,7 +54,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/src/enet/config.sub b/src/enet/config.sub
index c894da4..6205f84 100644
--- a/src/enet/config.sub
+++ b/src/enet/config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
 #   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2012-04-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -225,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -1537,6 +1543,9 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	hexagon-*)
+		os=-elf
+		;;
 	tic54x-*)
 		os=-coff
 		;;
diff --git a/src/enet/configure b/src/enet/configure
index 4fcb5eb..ffae8c5 100755
--- a/src/enet/configure
+++ b/src/enet/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libenet 1.3.4.
+# Generated by GNU Autoconf 2.69 for libenet 1.3.5.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libenet'
 PACKAGE_TARNAME='libenet'
-PACKAGE_VERSION='1.3.4'
-PACKAGE_STRING='libenet 1.3.4'
+PACKAGE_VERSION='1.3.5'
+PACKAGE_STRING='libenet 1.3.5'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1306,7 +1306,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libenet 1.3.4 to adapt to many kinds of systems.
+\`configure' configures libenet 1.3.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1376,7 +1376,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libenet 1.3.4:";;
+     short | recursive ) echo "Configuration of libenet 1.3.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1479,7 +1479,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libenet configure 1.3.4
+libenet configure 1.3.5
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1868,7 +1868,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libenet $as_me 1.3.4, which was
+It was created by libenet $as_me 1.3.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2684,7 +2684,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libenet'
- VERSION='1.3.4'
+ VERSION='1.3.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5016,10 +5016,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -5058,7 +5054,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -7985,7 +7981,7 @@ lt_prog_compiler_static=
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -10155,17 +10151,6 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
@@ -10282,7 +10267,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
@@ -11973,7 +11958,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libenet $as_me 1.3.4, which was
+This file was extended by libenet $as_me 1.3.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12030,7 +12015,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libenet config.status 1.3.4
+libenet config.status 1.3.5
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/src/enet/configure.ac b/src/enet/configure.ac
index ab2e125..e163eb8 100644
--- a/src/enet/configure.ac
+++ b/src/enet/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([libenet], [1.3.4])
+AC_INIT([libenet], [1.3.5])
 AC_CONFIG_SRCDIR([include/enet/enet.h])
 AM_INIT_AUTOMAKE([foreign])
 AM_MAINTAINER_MODE([enable])
diff --git a/src/enet/depcomp b/src/enet/depcomp
index bd0ac08..25a39e6 100644
--- a/src/enet/depcomp
+++ b/src/enet/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2011-12-04.11; # UTC
+scriptversion=2012-03-27.16; # UTC
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ scriptversion=2011-12-04.11; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
@@ -40,8 +40,8 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
   tmpdepfile  Temporary file to use when outputting dependencies.
@@ -57,6 +57,12 @@ EOF
     ;;
 esac
 
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -102,6 +108,12 @@ if test "$depmode" = msvc7msys; then
    depmode=msvc7
 fi
 
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -156,15 +168,14 @@ gcc)
 ## The second -e expression handles DOS-style file names with drive letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+  tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
 ## to the object.  Take care to not repeat it in the output.
@@ -203,18 +214,15 @@ sgi)
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    >> "$depfile"
   else
@@ -226,10 +234,17 @@ sgi)
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -259,12 +274,11 @@ aix)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
+    # Each line is of the form 'foo.o: dependent.h'.
     # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -275,23 +289,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -300,15 +317,21 @@ icc)
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Each line is of the form 'foo.o: dependent.h',
+  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -344,7 +367,7 @@ hp2)
   done
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
 	       s/^ *//
 	       s/ \\*$//
@@ -359,9 +382,9 @@ hp2)
 
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
    # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
+   # dependencies in 'foo.d' instead, so we check for that too.
    # Subdirectories are respected.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    test "x$dir" = "x$object" && dir=
@@ -407,8 +430,7 @@ tru64)
    done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
@@ -443,11 +465,11 @@ msvc7)
   p
 }' | $cygpath_u | sort -u | sed -n '
 s/ /\\ /g
-s/\(.*\)/	\1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
 s/.\(.*\) \\/\1:/
 H
 $ {
-  s/.*/	/
+  s/.*/'"$tab"'/
   G
   p
 }' >> "$depfile"
@@ -478,7 +500,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -498,15 +520,14 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
+  tr ' ' "$nl" < "$tmpdepfile" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -562,8 +583,7 @@ makedepend)
   # makedepend may prepend the VPATH from the source file name to the object.
   # No need to regex-escape $object, excess matching of '.' is harmless.
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -583,7 +603,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -652,8 +672,8 @@ msvisualcpp)
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
diff --git a/src/enet/docs/mainpage.dox b/src/enet/docs/mainpage.dox
index 61c50d3..0a898ca 100644
--- a/src/enet/docs/mainpage.dox
+++ b/src/enet/docs/mainpage.dox
@@ -36,7 +36,7 @@ portable, and easily embeddable.
 You can retrieve the source to ENet by downloading it in either .tar.gz form
 or accessing the cvs distribution directly.
 
-The most recent stable release (1.3.4) can be downloaded <a href="http://enet.bespin.org/download/enet-1.3.4.tar.gz">here</a>. 
+The most recent stable release (1.3.5) can be downloaded <a href="http://enet.bespin.org/download/enet-1.3.5.tar.gz">here</a>. 
 The last release that is protocol compatible with the 1.2 series or earlier (1.2.5) can be downloaded <a href="http://enet.bespin.org/download/enet-1.2.5.tar.gz">here</a> 
 
 To access ENet via anonymous CVS, you must use the CVSROOT
diff --git a/src/enet/include/enet/enet.h b/src/enet/include/enet/enet.h
index 97d8638..3958d1c 100644
--- a/src/enet/include/enet/enet.h
+++ b/src/enet/include/enet/enet.h
@@ -25,7 +25,7 @@ extern "C"
 
 #define ENET_VERSION_MAJOR 1
 #define ENET_VERSION_MINOR 3
-#define ENET_VERSION_PATCH 4
+#define ENET_VERSION_PATCH 5
 #define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
 #define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
 
diff --git a/src/enet/ltmain.sh b/src/enet/ltmain.sh
index c7d06c3..33f642a 100755
--- a/src/enet/ltmain.sh
+++ b/src/enet/ltmain.sh
@@ -70,7 +70,7 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1
+#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.1
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
@@ -80,7 +80,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1"
+VERSION="2.4.2 Debian-2.4.2-1.1"
 TIMESTAMP=""
 package_revision=1.3337
 
diff --git a/src/enet/m4/libtool.m4 b/src/enet/m4/libtool.m4
index 828104c..534d1cc 100644
--- a/src/enet/m4/libtool.m4
+++ b/src/enet/m4/libtool.m4
@@ -2512,17 +2512,6 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
@@ -2639,7 +2628,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
@@ -3255,10 +3244,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3297,7 +3282,7 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -4049,7 +4034,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -4348,7 +4333,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -6241,9 +6226,6 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
-        ;;
-
       haiku*)
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6405,7 +6387,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
diff --git a/src/enet/peer.c b/src/enet/peer.c
index 25db03a..56a93f6 100644
--- a/src/enet/peer.c
+++ b/src/enet/peer.c
@@ -296,7 +296,7 @@ enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startComm
 static void
 enet_peer_reset_incoming_commands (ENetList * queue)
 {
-    enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end(queue));
+    enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end (queue));
 }
  
 void
@@ -678,42 +678,71 @@ enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel *
 
        if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED)
          continue;
-       else
-       if (incomingCommand -> reliableSequenceNumber != channel -> incomingReliableSequenceNumber)
-         break;
-       else
-       if (incomingCommand -> fragmentsRemaining <= 0)
-         channel -> incomingUnreliableSequenceNumber = incomingCommand -> unreliableSequenceNumber;
-       else
-       if (startCommand == currentCommand)
-         startCommand = enet_list_next (currentCommand);
-       else
+
+       if (incomingCommand -> reliableSequenceNumber == channel -> incomingReliableSequenceNumber)
        {
-            enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
+          if (incomingCommand -> fragmentsRemaining <= 0)
+          {
+             channel -> incomingUnreliableSequenceNumber = incomingCommand -> unreliableSequenceNumber;
+             continue;
+          }
 
-            if (! peer -> needsDispatch)
-            {
+          if (startCommand != currentCommand)
+          {
+             enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
+
+             if (! peer -> needsDispatch)
+             {
                 enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
 
                 peer -> needsDispatch = 1;
-            }
+             }
+
+             droppedCommand = currentCommand;
+          }
+          else
+          if (droppedCommand != currentCommand)
+            droppedCommand = enet_list_previous (currentCommand);
+       }
+       else 
+       {
+          enet_uint16 reliableWindow = incomingCommand -> reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE,
+                      currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE;
+          if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber)
+            reliableWindow += ENET_PEER_RELIABLE_WINDOWS;
+          if (reliableWindow >= currentWindow && reliableWindow < currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1)
+            break;
+
+          droppedCommand = enet_list_next (currentCommand);
+
+          if (startCommand != currentCommand)
+          {
+             enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
 
-            droppedCommand = startCommand = enet_list_next (currentCommand); 
+             if (! peer -> needsDispatch)
+             {
+                enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
+
+                peer -> needsDispatch = 1;
+             }
+          }
        }
+          
+       startCommand = enet_list_next (currentCommand);
     }
 
     if (startCommand != currentCommand)
     {
-        enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
+       enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
 
-        if (! peer -> needsDispatch)
-        {
-            enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
+       if (! peer -> needsDispatch)
+       {
+           enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
 
-            peer -> needsDispatch = 1;
-        }
+           peer -> needsDispatch = 1;
+       }
 
-        droppedCommand = startCommand = enet_list_next (currentCommand);
+       droppedCommand = currentCommand;
     }
 
     enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand);
@@ -722,6 +751,7 @@ enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel *
 void
 enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * channel)
 {
+    enet_uint16 oldReliableSequenceNumber = channel -> incomingReliableSequenceNumber;
     ENetListIterator currentCommand;
 
     for (currentCommand = enet_list_begin (& channel -> incomingReliableCommands);
@@ -754,7 +784,8 @@ enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * ch
        peer -> needsDispatch = 1;
     }
 
-    enet_peer_dispatch_incoming_unreliable_commands (peer, channel);
+    if (! enet_list_empty (& channel -> incomingUnreliableCommands))
+       enet_peer_dispatch_incoming_unreliable_commands (peer, channel);
 }
 
 ENetIncomingCommand *
diff --git a/src/enet/protocol.c b/src/enet/protocol.c
index 9c1dad2..9086c26 100644
--- a/src/enet/protocol.c
+++ b/src/enet/protocol.c
@@ -83,6 +83,9 @@ enet_protocol_dispatch_incoming_commands (ENetHost * host, ENetEvent * event)
            }
 
            return 1;
+
+       default:
+           break;
        }
     }
 
@@ -877,6 +880,9 @@ enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer *
            enet_list_empty (& peer -> sentReliableCommands))
          enet_peer_disconnect (peer, peer -> eventData);
        break;
+
+    default:
+       break;
     }
    
     return 0;
diff --git a/src/engine/blob.cpp b/src/engine/blob.cpp
index 0975f1c..0c6938f 100644
--- a/src/engine/blob.cpp
+++ b/src/engine/blob.cpp
@@ -564,8 +564,8 @@ VARF(IDF_PERSIST, blobdyntris, 128, 4096, 1<<16, initblobs(BLOB_DYNAMIC));
 
 static blobrenderer blobs[] =
 {
-    blobrenderer("<grey>data/particles/blob.png"),
-    blobrenderer("<grey>data/particles/blob.png")
+    blobrenderer("<grey>particles/blob.png"),
+    blobrenderer("<grey>particles/blob.png")
 };
 
 void initblobs(int type)
diff --git a/src/engine/octaedit.cpp b/src/engine/octaedit.cpp
index 4f9c58f..1e71015 100644
--- a/src/engine/octaedit.cpp
+++ b/src/engine/octaedit.cpp
@@ -781,9 +781,13 @@ void swapundo(undolist &a, undolist &b, const char *s)
 void editundo() { swapundo(undos, redos, "undo"); }
 void editredo() { swapundo(redos, undos, "redo"); }
 
+// guard against subdivision
+#define protectsel(f) { undoblock *_u = newundocube(sel); f; if(_u) { pasteundo(_u); freeundo(_u); } }
+
 vector<editinfo *> editinfos;
 
-static void packcube(cube &c, vector<uchar> &buf)
+template<class B>
+static void packcube(cube &c, B &buf)
 {
     if(c.children)
     {
@@ -800,10 +804,10 @@ static void packcube(cube &c, vector<uchar> &buf)
     }
 }
 
-static bool packeditinfo(editinfo *e, vector<uchar> &buf)
+template<class B>
+static bool packblock(block3 &b, B &buf)
 {
-    if(!e || !e->copy || e->copy->size() <= 0 || e->copy->size() > (1<<20)) return false;
-    block3 &b = *e->copy;
+    if(b.size() <= 0 || b.size() > (1<<20)) return false;
     block3 hdr = b;
     lilswap(hdr.o.v, 3);
     lilswap(hdr.s.v, 3);
@@ -815,7 +819,8 @@ static bool packeditinfo(editinfo *e, vector<uchar> &buf)
     return true;
 }
 
-static void unpackcube(cube &c, ucharbuf &buf)
+template<class B>
+static void unpackcube(cube &c, B &buf)
 {
     int mat = buf.get();
     if(mat == 0xFF)
@@ -832,10 +837,10 @@ static void unpackcube(cube &c, ucharbuf &buf)
     }
 }
 
-static bool unpackeditinfo(editinfo *&e, ucharbuf &buf)
+template<class B>
+static bool unpackblock(block3 *&b, B &buf)
 {
-    if(!e) e = editinfos.add(new editinfo);
-    if(e->copy) { freeblock(e->copy); e->copy = NULL; }
+    if(b) { freeblock(b); b = NULL; }
     block3 hdr;
     buf.get((uchar *)&hdr, sizeof(hdr));
     lilswap(hdr.o.v, 3);
@@ -843,12 +848,11 @@ static bool unpackeditinfo(editinfo *&e, ucharbuf &buf)
     lilswap(&hdr.grid, 1);
     lilswap(&hdr.orient, 1);
     if(hdr.size() > (1<<20)) return false;
-    e->copy = (block3 *)new uchar[sizeof(block3)+hdr.size()*sizeof(cube)];
-    block3 &b = *e->copy;
-    b = hdr;
-    cube *c = b.c();
-    memset(c, 0, b.size()*sizeof(cube));
-    loopi(b.size()) unpackcube(c[i], buf);
+    b = (block3 *)new uchar[sizeof(block3)+hdr.size()*sizeof(cube)];
+    *b = hdr;
+    cube *c = b->c();
+    memset(c, 0, b->size()*sizeof(cube));
+    loopi(b->size()) unpackcube(c[i], buf);
     return true;
 }
 
@@ -885,7 +889,7 @@ static bool uncompresseditinfo(const uchar *inbuf, int inlen, uchar *&outbuf, in
 bool packeditinfo(editinfo *e, int &inlen, uchar *&outbuf, int &outlen)
 {
     vector<uchar> buf;
-    if(!packeditinfo(e, buf)) return false;
+    if(!e || !e->copy || !packblock(*e->copy, buf)) return false;
     inlen = buf.length();
     return compresseditinfo(buf.getbuf(), buf.length(), outbuf, outlen);
 }
@@ -896,7 +900,8 @@ bool unpackeditinfo(editinfo *&e, const uchar *inbuf, int inlen, int outlen)
     uchar *outbuf = NULL;
     if(!uncompresseditinfo(inbuf, inlen, outbuf, outlen)) return false;
     ucharbuf buf(outbuf, outlen);
-    if(!unpackeditinfo(e, buf))
+    if(!e) e = editinfos.add(new editinfo);
+    if(!unpackblock(e->copy, buf))
     {
         delete[] outbuf;
         return false;
@@ -914,9 +919,95 @@ void freeeditinfo(editinfo *&e)
     e = NULL;
 }
 
-// guard against subdivision
-#define protectsel(f) { undoblock *_u = newundocube(sel); f; if(_u) { pasteundo(_u); freeundo(_u); } }
+struct octabrushheader
+{
+    char magic[4];
+    int version;
+};
 
+struct octabrush : editinfo
+{
+    char *name;
+
+    octabrush() : name(NULL) {}
+    ~octabrush() { DELETEA(name); if(copy) freeblock(copy); }
+};
+
+static inline bool htcmp(const char *key, const octabrush &b) { return !strcmp(key, b.name); }
+
+static hashset<octabrush> octabrushes;
+
+void delbrush(char *name)
+{
+    if(octabrushes.remove(name))
+        conoutf("deleted brush %s", name); 
+}
+COMMAND(0, delbrush, "s");
+
+void savebrush(char *name)
+{
+    if(!name[0] || noedit(true) || multiplayer()) return;
+    octabrush *b = octabrushes.access(name);
+    if(!b)
+    {
+        b = &octabrushes[name];
+        b->name = newstring(name);
+    }
+    if(b->copy) freeblock(b->copy);
+    protectsel(b->copy = blockcopy(block3(sel), sel.grid));
+    changed(sel);
+    defformatstring(filename)(strpbrk(name, "/\\") ? "%s.obr" : "brush/%s.obr", name);
+    path(filename);
+    stream *f = opengzfile(filename, "wb");
+    if(!f) { conoutf("\frcould not write brush to %s", filename); return; }
+    octabrushheader hdr;
+    memcpy(hdr.magic, "OEBR", 4);
+    hdr.version = 0;
+    lilswap(&hdr.version, 1);
+    f->write(&hdr, sizeof(hdr));
+    streambuf<uchar> s(f);
+    if(!packblock(*b->copy, s)) { delete f; conoutf("\frcould not pack brush %s", filename); return; } 
+    delete f;
+    conoutf("wrote brush file %s", filename);
+}
+COMMAND(0, savebrush, "s");
+
+void pasteblock(block3 &b, selinfo &sel)
+{
+    sel.s = b.s;
+    int o = sel.orient;
+    sel.orient = b.orient;
+    cube *s = b.c();
+    loopselxyz(if(!isempty(*s) || s->children || s->material != MAT_AIR) pastecube(*s, c); s++); // 'transparent'. old opaque by 'delcube; paste'
+    sel.orient = o;
+}
+
+void pastebrush(char *name)
+{
+    if(!name[0] || noedit() || multiplayer()) return;
+    octabrush *b = octabrushes.access(name);
+    if(!b)
+    {
+        defformatstring(filename)(strpbrk(name, "/\\") ? "%s.obr" : "brush/%s.obr", name);
+        path(filename);
+        stream *f = opengzfile(filename, "rb");
+        if(!f) { conoutf("\frcould not read brush %s", filename); return; }
+        octabrushheader hdr;
+        if(f->read(&hdr, sizeof(hdr)) != sizeof(octabrushheader) || memcmp(hdr.magic, "OEBR", 4)) { delete f; conoutf("\frbrush %s has malformatted header", filename); return; }
+        lilswap(&hdr.version, 1);
+        if(hdr.version != 0) { delete f; conoutf("\frbrush %s uses unsupported version", filename); return; }
+        streambuf<uchar> s(f);
+        block3 *copy = NULL;
+        if(!unpackblock(copy, s)) { delete f; conoutf("\frcould not unpack brush %s", filename); return; }
+        delete f;
+        b = &octabrushes[name];
+        b->name = newstring(name);
+        b->copy = copy;
+    }
+    pasteblock(*b->copy, sel);
+}
+COMMAND(0, pastebrush, "s");
+ 
 void mpcopy(editinfo *&e, selinfo &sel, bool local)
 {
     if(local) client::edittrigger(sel, EDIT_COPY);
@@ -931,15 +1022,7 @@ void mppaste(editinfo *&e, selinfo &sel, bool local)
 {
     if(e==NULL) return;
     if(local) client::edittrigger(sel, EDIT_PASTE);
-    if(e->copy)
-    {
-        sel.s = e->copy->s;
-        int o = sel.orient;
-        sel.orient = e->copy->orient;
-        cube *s = e->copy->c();
-        loopselxyz(if(!isempty(*s) || s->children || s->material != MAT_AIR) pastecube(*s, c); s++); // 'transparent'. old opaque by 'delcube; paste'
-        sel.orient = o;
-    }
+    if(e->copy) pasteblock(*e->copy, sel);
 }
 
 void copy()
diff --git a/src/engine/octarender.cpp b/src/engine/octarender.cpp
index 50d3c11..0bbb21f 100644
--- a/src/engine/octarender.cpp
+++ b/src/engine/octarender.cpp
@@ -284,7 +284,7 @@ struct vacollect : verthash
                 LightMapTexture &lmtex = lightmaptexs[k.lmid];
                 int type = lmtex.type&LM_TYPE;
                 if(k.layer==LAYER_BLEND) type += 2;
-                else if(k.alpha) type = 4 + 2*(k.alpha-1);
+                else if(k.alpha) type += 4 + 2*(k.alpha-1);
                 lastlmid[type] = lmtex.unlitx>=0 ? k.lmid : LMID_AMBIENT;
                 if(firstlmid[type]==LMID_AMBIENT && lastlmid[type]!=LMID_AMBIENT)
                 {
@@ -297,7 +297,7 @@ struct vacollect : verthash
                 Shader *s = lookupvslot(k.tex, false).slot->shader;
                 int type = s->type&SHADER_NORMALSLMS ? LM_BUMPMAP0 : LM_DIFFUSE;
                 if(k.layer==LAYER_BLEND) type += 2;
-                else if(k.alpha) type = 4 + 2*(k.alpha-1);
+                else if(k.alpha) type += 4 + 2*(k.alpha-1);
                 if(lastlmid[type]!=LMID_AMBIENT)
                 {
                     sortval &t = indices[k];
diff --git a/src/engine/textedit.h b/src/engine/textedit.h
index 559e11f..36d83a2 100644
--- a/src/engine/textedit.h
+++ b/src/engine/textedit.h
@@ -697,7 +697,7 @@ static editor *useeditor(const char *name, int mode, bool focus, const char *ini
 
 #define TEXTCOMMAND(f, s, d, body) ICOMMAND(0, f, s, d,\
     editor *top = currentfocus();\
-    if(!top) return;\
+    if(!top || identflags&IDF_WORLD) return;\
     body\
 )
 
diff --git a/src/engine/world.cpp b/src/engine/world.cpp
index 53def3d..6a81eda 100644
--- a/src/engine/world.cpp
+++ b/src/engine/world.cpp
@@ -296,13 +296,13 @@ void pasteundoents(undoblock *u)
     undoent *ue = u->ents();
     int *attrs = u->attrs();
     loopi(u->numents)
-        entedit(ue[i].i, 
-        { 
-            e.type = ue[i].type; 
-            e.o = ue[i].o; 
+        entedit(ue[i].i,
+        {
+            e.type = ue[i].type;
+            e.o = ue[i].o;
             if(e.attrs.length() < ue[i].numattrs) e.attrs.add(0, ue[i].numattrs - e.attrs.length());
             else if(e.attrs.length() > ue[i].numattrs) e.attrs.setsize(ue[i].numattrs);
-            loopk(ue[i].numattrs) e.attrs[k] = *attrs++; 
+            loopk(ue[i].numattrs) e.attrs[k] = *attrs++;
         });
 }
 
@@ -755,7 +755,7 @@ void enttype(char *what, int *numargs)
     if(*numargs >= 1)
     {
         int type = entities::findtype(what);
-        if(type == ET_EMPTY) 
+        if(type == ET_EMPTY)
         {
             conoutft(CON_MESG, "\frunknown entity type \"%s\"", what);
             return;
@@ -786,6 +786,17 @@ void entattr(int *attr, int *val, int *numargs)
 COMMAND(0, enttype, "sN");
 COMMAND(0, entattr, "iiN");
 
+void entprop(int *attr, int *val)
+{
+    if(*attr >= 0 && *attr < MAXENTATTRS)
+        groupedit({
+            if(e.attrs.length() <= *attr) e.attrs.add(0, *attr + 1 - e.attrs.length());
+            e.attrs[*attr] += *val;
+        });
+}
+
+COMMAND(0, entprop, "ii");
+
 int findentity(int type, int index, vector<int> &attr)
 {
     const vector<extentity *> &ents = entities::getents();
@@ -968,9 +979,9 @@ void shrinkmap()
     cube *root = worldroot[octant].children;
     worldroot[octant].children = NULL;
     freeocta(worldroot);
-    worldroot = root; 
+    worldroot = root;
     worldscale--;
-    hdr.worldsize /= 2; 
+    hdr.worldsize /= 2;
 
     ivec offset(octant, 0, 0, 0, hdr.worldsize);
     vector<extentity *> &ents = entities::getents();
diff --git a/src/engine/worldio.cpp b/src/engine/worldio.cpp
index 45bdefe..3037eec 100644
--- a/src/engine/worldio.cpp
+++ b/src/engine/worldio.cpp
@@ -1120,7 +1120,7 @@ bool load_world(const char *mname, bool temp)       // still supports all map fo
             lilswap(&newhdr.version, 2);
 
             clearworldvars();
-            if(strncmp(newhdr.head, "MAPZ", 4) == 0 || strncmp(newhdr.head, "BFGZ", 4) == 0)
+            if(memcmp(newhdr.head, "MAPZ", 4) == 0 || memcmp(newhdr.head, "BFGZ", 4) == 0)
             {
                 // this check removed below due to breakage: (size_t)newhdr.headersize > sizeof(chdr) || f->read(&chdr.worldsize, newhdr.headersize-sizeof(binary))!=newhdr.headersize-(int)sizeof(binary)
                 #define MAPZCOMPAT(ver) \
@@ -1289,7 +1289,7 @@ bool load_world(const char *mname, bool temp)       // still supports all map fo
                     samegame = false;
                 }
             }
-            else if(strncmp(newhdr.head, "OCTA", 4) == 0)
+            else if(memcmp(newhdr.head, "OCTA", 4) == 0)
             {
                 octa ohdr;
                 memcpy(&ohdr, &newhdr, sizeof(binary));
diff --git a/src/game/client.cpp b/src/game/client.cpp
index 5142f67..484f613 100644
--- a/src/game/client.cpp
+++ b/src/game/client.cpp
@@ -710,12 +710,12 @@ namespace client
     {
         ucharbuf p(data, len);
         int type = getint(p);
-        data += p.length();
-        len -= p.length();
         switch(type)
         {
             case N_SENDDEMO:
             {
+                data += p.length();
+                len -= p.length();
                 defformatstring(fname)("%d.dmo", totalmillis);
                 stream *demo = openfile(fname, "wb");
                 if(!demo) return;
@@ -725,22 +725,21 @@ namespace client
                 break;
             }
 
-            case N_SENDMAPCONFIG:
-            case N_SENDMAPSHOT:
             case N_SENDMAPFILE:
             {
-                const char *reqmap = mapname, *reqext = "xxx";
-                if(type == N_SENDMAPCONFIG) reqext = "cfg";
-                else if(type == N_SENDMAPSHOT) reqext = "png";
-                else if(type == N_SENDMAPFILE) reqext = "mpz";
+                int filetype = getint(p);
+                data += p.length();
+                len -= p.length();
+                if(filetype < 0 || filetype >= SENDMAP_MAX) break;
+                const char *reqmap = mapname;
                 if(!reqmap || !*reqmap) reqmap = "maps/untitled";
                 defformatstring(reqfile)(strstr(reqmap, "temp/")==reqmap || strstr(reqmap, "temp\\")==reqmap ? "%s" : "temp/%s", reqmap);
-                defformatstring(reqfext)("%s.%s", reqfile, reqext);
+                defformatstring(reqfext)("%s.%s", reqfile, sendmaptypes[filetype]);
                 stream *f = openfile(reqfext, "wb");
                 if(!f)
                 {
                     conoutft(CON_MESG, "\frfailed to open map file: %s", reqfext);
-                    return;
+                    break;
                 }
                 gettingmap = true;
                 f->write(data, len);
@@ -748,7 +747,6 @@ namespace client
                 break;
             }
         }
-        return;
     }
     ICOMMAND(0, getmap, "", (), if(multiplayer(false)) addmsg(N_GETMAP, "r"));
 
@@ -812,27 +810,19 @@ namespace client
         if(!reqmap || !*reqmap) reqmap = "maps/untitled";
         bool edit = m_edit(game::gamemode);
         defformatstring(reqfile)("%s%s", edit ? "temp/" : "", reqmap);
-        loopi(3)
+        loopi(SENDMAP_MAX)
         {
-            string reqfext;
-            switch(i)
+            defformatstring(reqfext)("%s.%s", reqfile, sendmaptypes[i]);
+            if(!i && edit)
             {
-                case 2: formatstring(reqfext)("%s.cfg", reqfile); break;
-                case 1: formatstring(reqfext)("%s.png", reqfile); break;
-                case 0: default:
-                    formatstring(reqfext)("%s.mpz", reqfile);
-                    if(edit)
-                    {
-                        save_world(reqfile, edit, true);
-                        setnames(reqmap, MAP_MAPZ);
-                    }
-                    break;
+                save_world(reqfile, edit, true);
+                setnames(reqmap, MAP_MAPZ);
             }
             stream *f = openfile(reqfext, "rb");
             if(f)
             {
                 conoutft(CON_MESG, "\fgtransmitting file: %s", reqfext);
-                sendfile(-1, 2, f, "ri", N_SENDMAPFILE+i);
+                sendfile(-1, 2, f, "ri2", N_SENDMAPFILE, i);
                 if(needclipboard >= 0) needclipboard++;
                 delete f;
             }
diff --git a/src/game/entities.cpp b/src/game/entities.cpp
index b466e28..bcfa3c9 100644
--- a/src/game/entities.cpp
+++ b/src/game/entities.cpp
@@ -337,8 +337,8 @@ namespace entities
                 float radius = enttype[e.type].radius;
                 switch(e.type)
                 {
-                case TRIGGER: case TELEPORT: case PUSHER: if(e.attrs[3] > 0) radius = e.attrs[3]; break;
-                case CHECKPOINT: if(e.attrs[0] > 0) radius = e.attrs[0]; break;
+                    case TRIGGER: case TELEPORT: case PUSHER: if(e.attrs[3] > 0) radius = e.attrs[3]; break;
+                    case CHECKPOINT: if(e.attrs[0] > 0) radius = e.attrs[0]; break;
                 }
                 if(overlapsbox(pos, zrad, xyrad, e.o, radius, radius))
                 {
@@ -421,10 +421,26 @@ namespace entities
     gameent *trigger = NULL;
     ICOMMAND(0, triggerclientnum, "", (), intret(trigger ? trigger->clientnum : -1));
 
+    bool cantrigger(gameentity &e, bool check = false)
+    {
+        switch(e.type)
+        {
+            case TRIGGER:
+            {
+                if(!m_check(e.attrs[5], e.attrs[6], game::gamemode, game::mutators)) return false;
+                if(check && lastmillis-e.lastuse < triggertime(e)/2) return false;
+                return true;
+                break;
+            }
+            default: return true; break;
+        }
+        return false;
+    }
+
     void runtrigger(int n, gameent *d, bool act = true)
     {
         gameentity &e = *(gameentity *)ents[n];
-        if(m_check(e.attrs[5], e.attrs[6], game::gamemode, game::mutators) && lastmillis-e.lastuse >= triggertime(e)/2)
+        if(cantrigger(e, true))
         {
             e.lastuse = lastmillis;
             switch(e.attrs[1])
@@ -655,7 +671,7 @@ namespace entities
             gameentity &e = *(gameentity *)ents[n];
             bool on = m%2, spawned = e.spawned;
             if((e.spawned = on) == true) e.lastspawn = lastmillis;
-            if(e.type == TRIGGER)
+            if(e.type == TRIGGER && cantrigger(e))
             {
                 if((m >= 2 || e.lastemit <= 0 || e.spawned != spawned) && (e.attrs[1] == TR_TOGGLE || e.attrs[1] == TR_LINK || e.attrs[1] == TR_ONCE))
                 {
@@ -664,6 +680,7 @@ namespace entities
                     loopv(e.kin) if(ents.inrange(e.kin[i]))
                     {
                         gameentity &f = *(gameentity *)ents[e.kin[i]];
+                        if(!cantrigger(f)) continue;
                         f.spawned = e.spawned; f.lastemit = e.lastemit;
                         execlink(NULL, e.kin[i], false, n);
                     }
@@ -733,10 +750,12 @@ namespace entities
             case MAPSOUND:
             case LIGHTFX:
             {
-                loopv(e.links) if(ents.inrange(e.links[i]) && ents[e.links[i]]->type == TRIGGER)
+                loopv(e.links) if(ents.inrange(e.links[i]))
                 {
-                    e.lastemit = ents[e.links[i]]->lastemit;
-                    e.spawned = TRIGSTATE(ents[e.links[i]]->spawned, ents[e.links[i]]->attrs[4]);
+                    gameentity &f = *(gameentity *)ents[e.links[i]];
+                    if(f.type != TRIGGER || !cantrigger(f)) continue;
+                    e.lastemit = f.lastemit;
+                    e.spawned = TRIGSTATE(f.spawned, f.attrs[4]);
                     break;
                 }
                 break;
@@ -767,7 +786,7 @@ namespace entities
                     while(e.attrs[0] < 0) e.attrs[0] += TRIGGERIDS+1;
                     while(e.attrs[0] > TRIGGERIDS) e.attrs[0] -= TRIGGERIDS+1;
                 }
-                loopv(e.links) if(ents.inrange(e.links[i]) && (ents[e.links[i]]->type == MAPMODEL || ents[e.links[i]]->type == PARTICLES || ents[e.links[i]]->type == MAPSOUND || ents[e.links[i]]->type == LIGHTFX))
+                if(cantrigger(e)) loopv(e.links) if(ents.inrange(e.links[i]) && (ents[e.links[i]]->type == MAPMODEL || ents[e.links[i]]->type == PARTICLES || ents[e.links[i]]->type == MAPSOUND || ents[e.links[i]]->type == LIGHTFX))
                 {
                     ents[e.links[i]]->lastemit = e.lastemit;
                     ents[e.links[i]]->spawned = TRIGSTATE(e.spawned, e.attrs[4]);
@@ -848,38 +867,41 @@ namespace entities
     {
         if(ents.inrange(index) && maylink(ents[index]->type))
         {
+            gameentity &e = *(gameentity *)ents[index];
+            if(e.type == TRIGGER && !cantrigger(e)) return;
             bool commit = false;
             int numents = max(lastenttype[MAPMODEL], max(lastenttype[LIGHTFX], max(lastenttype[PARTICLES], lastenttype[MAPSOUND])));
             loopi(numents) if(ents[i]->links.find(index) >= 0)
             {
+                gameentity &f = *(gameentity *)ents[i];
                 if(ents.inrange(ignore) && ents[ignore]->links.find(index) >= 0) continue;
-                bool both = ents[index]->links.find(i) >= 0;
-                switch(ents[i]->type)
+                bool both = e.links.find(i) >= 0;
+                switch(f.type)
                 {
                     case MAPMODEL:
                     {
-                        ents[i]->lastemit = ents[index]->lastemit;
-                        if(ents[index]->type == TRIGGER) ents[i]->spawned = TRIGSTATE(ents[index]->spawned, ents[index]->attrs[4]);
+                        f.lastemit = e.lastemit;
+                        if(e.type == TRIGGER) f.spawned = TRIGSTATE(e.spawned, e.attrs[4]);
                         break;
                     }
                     case LIGHTFX:
                     case PARTICLES:
                     {
-                        ents[i]->lastemit = ents[index]->lastemit;
-                        if(ents[index]->type == TRIGGER) ents[i]->spawned = TRIGSTATE(ents[index]->spawned, ents[index]->attrs[4]);
+                        f.lastemit = e.lastemit;
+                        if(e.type == TRIGGER) f.spawned = TRIGSTATE(e.spawned, e.attrs[4]);
                         else if(local) commit = true;
                         break;
                     }
                     case MAPSOUND:
                     {
-                        ents[i]->lastemit = ents[index]->lastemit;
-                        if(ents[index]->type == TRIGGER) ents[i]->spawned = TRIGSTATE(ents[index]->spawned, ents[index]->attrs[4]);
+                        f.lastemit = e.lastemit;
+                        if(e.type == TRIGGER) f.spawned = TRIGSTATE(e.spawned, e.attrs[4]);
                         else if(local) commit = true;
-                        if(mapsounds.inrange(ents[i]->attrs[0]) && !issound(((gameentity *)ents[i])->schan))
+                        if(mapsounds.inrange(f.attrs[0]) && !issound(((gameentity *)ents[i])->schan))
                         {
                             int flags = SND_MAP;
-                            loopk(SND_LAST)  if(ents[i]->attrs[4]&(1<<k)) flags |= 1<<k;
-                            playsound(ents[i]->attrs[0], both ? ents[i]->o : ents[index]->o, NULL, flags, ents[i]->attrs[3], ents[i]->attrs[1], ents[i]->attrs[2], &((gameentity *)ents[i])->schan);
+                            loopk(SND_LAST)  if(f.attrs[4]&(1<<k)) flags |= 1<<k;
+                            playsound(f.attrs[0], both ? f.o : e.o, NULL, flags, f.attrs[3], f.attrs[1], f.attrs[2], &((gameentity *)ents[i])->schan);
                         }
                         break;
                     }
diff --git a/src/game/game.h b/src/game/game.h
index a33a356..e506dac 100644
--- a/src/game/game.h
+++ b/src/game/game.h
@@ -4,7 +4,7 @@
 #include "engine.h"
 
 #define GAMEID              "fps"
-#define GAMEVERSION         215
+#define GAMEVERSION         216
 #define DEMO_VERSION        GAMEVERSION
 
 #define MAXAI 256
@@ -225,6 +225,13 @@ enum
     FRAG_MULTI = FRAG_MKILL1|FRAG_MKILL2|FRAG_MKILL3,
 };
 
+enum { SENDMAP_MPZ = 0, SENDMAP_CFG, SENDMAP_PNG, SENDMAP_WPT, SENDMAP_TXT, SENDMAP_MAX };
+#ifdef GAMESERVER
+const char *sendmaptypes[SENDMAP_MAX] = { "mpz", "cfg", "png", "wpt", "txt" };
+#else
+extern const char *sendmaptypes[SENDMAP_MAX];
+#endif
+
 // network messages codes, c2s, c2c, s2c
 enum
 {
@@ -234,7 +241,7 @@ enum
     N_MAPCHANGE, N_MAPVOTE, N_CLEARVOTE, N_CHECKPOINT, N_ITEMSPAWN, N_ITEMUSE, N_TRIGGER, N_EXECLINK,
     N_PING, N_PONG, N_CLIENTPING, N_TICK, N_NEWGAME, N_ITEMACC, N_SERVMSG, N_GAMEINFO, N_RESUME,
     N_EDITMODE, N_EDITENT, N_EDITLINK, N_EDITVAR, N_EDITF, N_EDITT, N_EDITM, N_FLIP, N_COPY, N_PASTE, N_ROTATE, N_REPLACE, N_DELCUBE, N_REMIP, N_CLIPBOARD, N_NEWMAP,
-    N_GETMAP, N_SENDMAP, N_FAILMAP, N_SENDMAPFILE, N_SENDMAPSHOT, N_SENDMAPCONFIG,
+    N_GETMAP, N_SENDMAP, N_FAILMAP, N_SENDMAPFILE,
     N_MASTERMODE, N_KICKBAN, N_CLEARBANS, N_CURRENTMASTER, N_SPECTATOR, N_WAITING, N_SETMASTER, N_SETTEAM,
     N_SETUPAFFIN, N_INFOAFFIN, N_MOVEAFFIN,
     N_TAKEAFFIN, N_RETURNAFFIN, N_RESETAFFIN, N_DROPAFFIN, N_SCOREAFFIN, N_INITAFFIN, N_SCORE,
@@ -263,7 +270,7 @@ char msgsizelookup(int msg)
         N_TICK, 2, N_NEWGAME, 1, N_ITEMACC, 0,
         N_SERVMSG, 0, N_GAMEINFO, 0, N_RESUME, 0,
         N_EDITMODE, 2, N_EDITENT, 0, N_EDITLINK, 4, N_EDITVAR, 0, N_EDITF, 16, N_EDITT, 16, N_EDITM, 15, N_FLIP, 14, N_COPY, 14, N_PASTE, 14, N_ROTATE, 15, N_REPLACE, 16, N_DELCUBE, 14, N_REMIP, 1, N_NEWMAP, 2,
-        N_GETMAP, 0, N_SENDMAP, 0, N_FAILMAP, 0, N_SENDMAPFILE, 0, N_SENDMAPSHOT, 0, N_SENDMAPCONFIG, 0,
+        N_GETMAP, 0, N_SENDMAP, 0, N_FAILMAP, 0, N_SENDMAPFILE, 0,
         N_MASTERMODE, 2, N_KICKBAN, 3, N_CLEARBANS, 1, N_CURRENTMASTER, 3, N_SPECTATOR, 3, N_WAITING, 2, N_SETMASTER, 0, N_SETTEAM, 0,
         N_SETUPAFFIN, 0, N_INFOAFFIN, 0, N_MOVEAFFIN, 0,
         N_DROPAFFIN, 0, N_SCOREAFFIN, 0, N_RETURNAFFIN, 0, N_TAKEAFFIN, 0, N_RESETAFFIN, 0, N_INITAFFIN, 0, N_SCORE, 0,
diff --git a/src/game/server.cpp b/src/game/server.cpp
index 444bf9f..a156651 100644
--- a/src/game/server.cpp
+++ b/src/game/server.cpp
@@ -351,7 +351,7 @@ namespace server
     enet_uint32 lastsend = 0;
     int mastermode = MM_OPEN;
     bool masterupdate = false, mapsending = false, shouldcheckvotes = false;
-    stream *mapdata[3] = { NULL, NULL, NULL };
+    stream *mapdata[SENDMAP_MAX] = { NULL };
     vector<clientinfo *> clients, connects;
     vector<worldstate *> worldstates;
     bool reliablemessages = false;
@@ -2226,26 +2226,19 @@ namespace server
 
         const char *reqmap = name && *name ? name : pickmap(smapname, gamemode, mutators);
 #ifdef STANDALONE // interferes with savemap on clients, in which case we can just use the auto-request
-        loopi(3)
+        loopi(SENDMAP_MAX)
         {
             if(mapdata[i]) DELETEP(mapdata[i]);
-            const char *reqext = "xxx";
-            switch(i)
-            {
-                case 2: reqext = "cfg"; break;
-                case 1: reqext = "png"; break;
-                default: case 0: reqext = "mpz"; break;
-            }
             defformatstring(reqfile)(strstr(reqmap, "maps/")==reqmap || strstr(reqmap, "maps\\")==reqmap ? "%s" : "maps/%s", reqmap);
-            defformatstring(reqfext)("%s.%s", reqfile, reqext);
-            if(!(mapdata[i] = openfile(reqfext, "rb")) && !i)
+            defformatstring(reqfext)("%s.%s", reqfile, sendmaptypes[i]);
+            if(!(mapdata[i] = openfile(reqfext, "rb")) && i < SENDMAP_PNG)
             {
-                loopk(3) if(mapdata[k]) DELETEP(mapdata[k]);
+                loopk(SENDMAP_MAX) if(mapdata[k]) DELETEP(mapdata[k]);
                 break;
             }
         }
 #else
-        loopi(3) if(mapdata[i]) DELETEP(mapdata[i]);
+        loopi(SENDMAP_MAX) if(mapdata[i]) DELETEP(mapdata[i]);
 #endif
         copystring(smapname, reqmap);
 
@@ -2683,7 +2676,7 @@ namespace server
         if(!ci) putint(p, 0);
         else if(!ci->online && m_edit(gamemode) && numclients(ci->clientnum))
         {
-            loopi(3) if(mapdata[i]) DELETEP(mapdata[i]);
+            loopi(SENDMAP_MAX) if(mapdata[i]) DELETEP(mapdata[i]);
             ci->wantsmap = true;
             if(!mapsending)
             {
@@ -3522,13 +3515,15 @@ namespace server
         {
             case TRIGGER:
             {
-                if(sents[i].attrs[1] == TR_LINK && sents[i].spawned && gamemillis >= sents[i].millis && (sents[i].attrs[4] == triggerid || !sents[i].attrs[4]))
+                if(sents[i].attrs[1] == TR_LINK && sents[i].spawned && gamemillis >= sents[i].millis && (sents[i].attrs[4] == triggerid || !sents[i].attrs[4]) && m_check(sents[i].attrs[5], sents[i].attrs[6], gamemode, mutators))
                 {
                     sents[i].spawned = false;
                     sents[i].millis = gamemillis+(triggertime(i)*2);
                     sendf(-1, 1, "ri3", N_TRIGGER, i, 0);
                     loopvj(sents[i].kin) if(sents.inrange(sents[i].kin[j]))
                     {
+                        if(sents[sents[i].kin[j]].type == TRIGGER && !m_check(sents[sents[i].kin[j]].attrs[5], sents[sents[i].kin[j]].attrs[6], gamemode, mutators))
+                            continue;
                         sents[sents[i].kin[j]].spawned = sents[i].spawned;
                         sents[sents[i].kin[j]].millis = sents[i].millis;
                     }
@@ -3818,20 +3813,19 @@ namespace server
         sendqueryreply(p);
     }
 
-    const char *tempmapfile[3] = { "mapdata", "mapshot", "mapconf" };
+    const char *tempmapfile[SENDMAP_MAX] = { "mapmpz", "mappng", "mapcfg", "mapwpt", "maptxt" };
     bool receivefile(int sender, uchar *data, int len)
     {
         clientinfo *ci = (clientinfo *)getinfo(sender);
         ucharbuf p(data, len);
-        int type = getint(p), n = 0;
+        int type = getint(p), n = getint(p);
         data += p.length();
         len -= p.length();
-        switch(type)
+        if(type != N_SENDMAPFILE) return false;
+        if(n < 0 || n >= SENDMAP_MAX)
         {
-            case N_SENDMAPFILE: case N_SENDMAPSHOT: case N_SENDMAPCONFIG:
-                n = type-N_SENDMAPFILE;
-                break;
-            default: srvmsgf(sender, "bad map file type %d"); return false;
+            srvmsgf(sender, "bad map file type %d");
+            return false;
         }
         if(mapdata[n])
         {
@@ -4470,7 +4464,7 @@ namespace server
                         else if(sents[ent].type == TRIGGER)
                         {
                             bool commit = false, kin = false;
-                            if(sents[ent].attrs[4] == triggerid || !sents[ent].attrs[4]) switch(sents[ent].attrs[1])
+                            if((sents[ent].attrs[4] == triggerid || !sents[ent].attrs[4]) && m_check(sents[ent].attrs[5], sents[ent].attrs[6], gamemode, mutators)) switch(sents[ent].attrs[1])
                             {
                                 case TR_TOGGLE:
                                 {
@@ -4508,6 +4502,8 @@ namespace server
                             if(commit) sendf(-1, 1, "ri3", N_TRIGGER, ent, sents[ent].spawned ? 1 : 0);
                             if(kin) loopvj(sents[ent].kin) if(sents.inrange(sents[ent].kin[j]))
                             {
+                                if(sents[sents[ent].kin[j]].type == TRIGGER && !m_check(sents[sents[ent].kin[j]].attrs[5], sents[sents[ent].kin[j]].attrs[6], gamemode, mutators))
+                                    continue;
                                 sents[sents[ent].kin[j]].spawned = sents[ent].spawned;
                                 sents[sents[ent].kin[j]].millis = sents[ent].millis;
                             }
@@ -4945,16 +4941,16 @@ namespace server
                     }
                     if(!mapsending)
                     {
-                        if(mapdata[0] && mapdata[1] && mapdata[2])
+                        if(mapdata[0] && mapdata[1])
                         {
                             srvmsgft(ci->clientnum, CON_EVENT, "sending map, please wait..");
-                            loopk(3) if(mapdata[k]) sendfile(sender, 2, mapdata[k], "ri", N_SENDMAPFILE+k);
+                            loopk(SENDMAP_MAX) if(mapdata[k]) sendfile(sender, 2, mapdata[k], "ri2", N_SENDMAPFILE, k);
                             sendwelcome(ci);
                             ci->needclipboard = totalmillis ? totalmillis : 1;
                         }
                         else if(best)
                         {
-                            loopk(3) if(mapdata[k]) DELETEP(mapdata[k]);
+                            loopk(SENDMAP_MAX) if(mapdata[k]) DELETEP(mapdata[k]);
                             srvmsgft(ci->clientnum, CON_EVENT, "map is being requested, please wait..");
                             sendf(best->clientnum, 1, "ri", N_GETMAP);
                             mapsending = true;
@@ -4962,11 +4958,7 @@ namespace server
                         else
                         {
                             sendf(-1, 1, "ri", N_FAILMAP);
-                            loopv(clients)
-                            {
-                                clientinfo *ci = clients[i];
-                                ci->failedmap = false;
-                            }
+                            loopv(clients) clients[i]->failedmap = false;
                         }
                     }
                     else srvmsgft(ci->clientnum, CON_EVENT, "map is being uploaded, please be patient..");
diff --git a/src/game/vars.h b/src/game/vars.h
index be3e62a..8a0d03b 100644
--- a/src/game/vars.h
+++ b/src/game/vars.h
@@ -24,23 +24,23 @@ GVAR(IDF_ADMIN, rotatemuts, 0, 3, VAR_MAX); // any more than one decreases the c
 GVAR(IDF_ADMIN, rotatemutsfilter, 0, G_M_FILTER, G_M_ALL); // mutators not in this array are filtered out
 GVAR(IDF_ADMIN, campaignplayers, 1, 4, MAXPLAYERS);
 
-GSVAR(IDF_ADMIN, allowmaps, "alphacampaign bath blink cargo center colony darkness dawn deadsimple deathtrap deli depot dropzone dutility echo error facility forge foundation futuresport ghost hinder isolation keystone lab linear longestyard mist nova panic processing purge spacetech stone testchamber tower tranquility tribal ubik venus warp wet");
+GSVAR(IDF_ADMIN, allowmaps, "alphacampaign ares bath biolytic blink cargo center colony conflict darkness dawn deadsimple deathtrap deli depot dropzone dutility echo error facility forge foundation fourplex futuresport ghost hinder industrial isolation keystone lab linear longestyard mist nova panic processing purge spacetech starlibido stone testchamber tower tranquility tribal ubik venus warp wet");
 
-GSVAR(IDF_ADMIN, mainmaps, "bath blink cargo center colony darkness deadsimple deathtrap deli depot dropzone dutility echo error facility forge foundation futuresport ghost isolation keystone lab linear longestyard mist nova panic processing spacetech stone tower tranquility tribal ubik venus warp wet");
-GSVAR(IDF_ADMIN, capturemaps, "bath cargo center colony darkness deadsimple deli depot dropzone dutility echo facility forge foundation futuresport ghost isolation keystone linear mist nova panic stone tranquility tribal venus warp wet");
-GSVAR(IDF_ADMIN, defendmaps, "bath cargo center colony darkness deadsimple deli depot dropzone dutility echo facility forge foundation futuresport ghost isolation keystone lab linear mist nova panic processing stone tower tranquility tribal ubik venus warp wet");
-GSVAR(IDF_ADMIN, bombermaps, "bath cargo center colony darkness deadsimple deli depot dropzone dutility echo forge foundation futuresport ghost isolation linear mist nova stone tower tranquility tribal venus warp wet");
-GSVAR(IDF_ADMIN, holdmaps, "bath cargo center colony darkness deadsimple deli depot dropzone dutility echo facility forge foundation futuresport ghost isolation keystone lab linear mist nova panic processing stone tower tranquility tribal ubik venus warp wet");
+GSVAR(IDF_ADMIN, mainmaps, "ares bath biolytic blink cargo center colony conflict darkness deadsimple deathtrap deli depot dropzone dutility echo error facility forge foundation fourplex futuresport ghost industrial isolation keystone lab linear longestyard mist nova panic processing spacetech starlibido stone tower tranquility tribal ubik venus warp wet");
+GSVAR(IDF_ADMIN, capturemaps, "ares bath biolytic cargo center colony conflict darkness deadsimple deli depot dropzone dutility echo facility forge foundation fourplex futuresport ghost industrial isolation keystone linear mist nova panic stone tranquility tribal venus warp wet");
+GSVAR(IDF_ADMIN, defendmaps, "ares bath biolytic cargo center colony conflict darkness deadsimple deli depot dropzone dutility echo facility forge foundation fourplex futuresport ghost industrial isolation keystone lab linear mist nova panic processing stone tower tranquility tribal ubik venus warp wet");
+GSVAR(IDF_ADMIN, bombermaps, "ares bath biolytic cargo center colony conflict darkness deadsimple deli depot dropzone dutility echo forge foundation futuresport fourplex ghost industrial isolation linear mist nova stone tower tranquility tribal venus warp wet");
+GSVAR(IDF_ADMIN, holdmaps, "ares bath biolytic cargo center colony conflict darkness deadsimple deli depot dropzone dutility echo facility forge foundation fourplex futuresport ghost industrial isolation keystone lab linear mist nova panic processing stone tower tranquility tribal ubik venus warp wet");
 GSVAR(IDF_ADMIN, trialmaps, "hinder purge testchamber");
 GSVAR(IDF_ADMIN, campaignmaps, "alphacampaign");
 
-GSVAR(IDF_ADMIN, multimaps, "deadsimple depot keystone warp isolation"); // applies to modes which *require* multi spawns (ctf/bb)
-GSVAR(IDF_ADMIN, duelmaps, "bath darkness deadsimple dutility echo ghost longestyard stone panic wet");
-GSVAR(IDF_ADMIN, jetpackmaps, "alphacampaign cargo center colony darkness dawn deadsimple deathtrap deli depot dropzone dutility echo error forge foundation futuresport ghost isolation keystone linear longestyard mist nova spacetech testchamber tower tranquility tribal ubik venus warp");
+GSVAR(IDF_ADMIN, multimaps, "deadsimple depot keystone warp isolation fourplex"); // applies to modes which *require* multi spawns (ctf/bb)
+GSVAR(IDF_ADMIN, duelmaps, "bath darkness deadsimple dutility echo fourplex ghost longestyard starlibido stone panic wet");
+GSVAR(IDF_ADMIN, jetpackmaps, "alphacampaign ares biolytic cargo center colony conflict darkness dawn deadsimple deathtrap deli depot dropzone dutility echo error forge foundation fourplex futuresport ghost isolation keystone linear longestyard mist nova spacetech starlibido testchamber tower tranquility tribal ubik venus warp");
 
-GSVAR(IDF_ADMIN, smallmaps, "bath darkness deadsimple dutility echo ghost longestyard stone panic wet");
-GSVAR(IDF_ADMIN, mediummaps, "blink cargo center colony darkness deadsimple deathtrap deli dropzone echo error facility forge foundation futuresport ghost isolation keystone lab linear mist nova panic processing spacetech stone tower tranquility tribal ubik venus warp wet");
-GSVAR(IDF_ADMIN, largemaps, "blink cargo center colony dawn deadsimple deathtrap deli depot error facility forge foundation futuresport ghost isolation lab linear mist nova processing spacetech tower tranquility tribal ubik venus warp");
+GSVAR(IDF_ADMIN, smallmaps, "bath darkness deadsimple dutility echo fourplex ghost longestyard starlibido stone panic wet");
+GSVAR(IDF_ADMIN, mediummaps, "ares biolytic blink cargo center colony conflict darkness deadsimple deathtrap deli dropzone echo error facility forge foundation fourplex futuresport ghost industrial isolation keystone lab linear mist nova panic processing spacetech starlibido stone tower tranquility tribal ubik venus warp wet");
+GSVAR(IDF_ADMIN, largemaps, "ares biolytic blink cargo center colony dawn deadsimple deathtrap deli depot error facility forge foundation futuresport ghost industrial isolation lab linear mist nova processing spacetech tower tranquility tribal ubik venus warp");
 
 
 GVAR(IDF_ADMIN, modelock, 0, 3, 5); // 0 = off, 1 = master only (+1 admin only), 3 = master can only set limited mode and higher (+1 admin), 5 = no mode selection
diff --git a/src/install/nix/cube2font.1 b/src/install/nix/cube2font.1
index b93d919..7745381 100644
--- a/src/install/nix/cube2font.1
+++ b/src/install/nix/cube2font.1
@@ -1,4 +1,4 @@
-.TH CUBE2FONT 1 "2011-12-26" "" "cube2font Manual"
+.TH CUBE2FONT 1 2012-07-16 "cube2font 1.3" "cube2font Manual"
 .SH NAME
 cube2font \- Utility program designed to create font bitmaps for Cube Engine games
 .SH SYNOPSIS
diff --git a/src/install/nix/redeclipse-server.6.am b/src/install/nix/redeclipse-server.6.am
index a1af2ba..8dcec84 100644
--- a/src/install/nix/redeclipse-server.6.am
+++ b/src/install/nix/redeclipse-server.6.am
@@ -1,4 +1,4 @@
-.TH @CAPPNAME at -SERVER 6 2012-02-14 "Red Eclipse 1.2" "Red Eclipse Manual"
+.TH @CAPPNAME at -SERVER 6 2012-07-16 "Red Eclipse 1.3" "Red Eclipse Manual"
 
 
 .SH NAME
diff --git a/src/install/nix/redeclipse.6.am b/src/install/nix/redeclipse.6.am
index 075bd52..d95b41d 100644
--- a/src/install/nix/redeclipse.6.am
+++ b/src/install/nix/redeclipse.6.am
@@ -1,4 +1,4 @@
-.TH @CAPPNAME@ 6 2012-02-14 "Red Eclipse 1.2" "Red Eclipse Manual"
+.TH @CAPPNAME@ 6 2012-07-16 "Red Eclipse 1.3" "Red Eclipse Manual"
 
 
 .SH NAME
diff --git a/src/shared/stream.cpp b/src/shared/stream.cpp
index 3960b9a..e0c55aa 100644
--- a/src/shared/stream.cpp
+++ b/src/shared/stream.cpp
@@ -838,6 +838,17 @@ struct gzstream : stream
     offset tell() { return reading ? zfile.total_out : (writing ? zfile.total_in : -1); }
     offset rawtell() { return file ? file->tell() : -1; }
 
+    offset size()
+    {
+        if(!file) return -1;
+        offset pos = tell();
+        if(!file->seek(-4, SEEK_END)) return -1;
+        uint isize = file->getlil<uint>();
+        return file->seek(pos, SEEK_SET) ? isize : -1;
+    }
+
+    offset rawsize() { return file ? file->size() : -1; }
+
     bool seek(offset pos, int whence)
     {
         if(writing || !reading) return false;
diff --git a/src/shared/tools.h b/src/shared/tools.h
index 2708338..721aa13 100644
--- a/src/shared/tools.h
+++ b/src/shared/tools.h
@@ -1210,6 +1210,7 @@ struct stream
     virtual offset rawtell() { return tell(); }
     virtual bool seek(offset pos, int whence = SEEK_SET) { return false; }
     virtual offset size();
+    virtual offset rawsize() { return size(); }
     virtual int read(void *buf, int len) { return 0; }
     virtual int write(const void *buf, int len) { return 0; }
     virtual int getchar() { uchar c; return read(&c, 1) == 1 ? c : -1; }
@@ -1220,10 +1221,12 @@ struct stream
     virtual int printf(const char *fmt, ...);
     virtual uint getcrc() { return 0; }
 
+    template<class T> int put(const T *v, int n) { return write(v, n*sizeof(T))/sizeof(T); } 
     template<class T> bool put(T n) { return write(&n, sizeof(n)) == sizeof(n); }
     template<class T> bool putlil(T n) { return put<T>(lilswap(n)); }
     template<class T> bool putbig(T n) { return put<T>(bigswap(n)); }
 
+    template<class T> int get(T *v, int n) { return read(v, n*sizeof(T))/sizeof(T); }
     template<class T> T get() { T n; return read(&n, sizeof(n)) == sizeof(n) ? n : 0; }
     template<class T> T getlil() { return lilswap(get<T>()); }
     template<class T> T getbig() { return bigswap(get<T>()); }
@@ -1233,6 +1236,20 @@ struct stream
 #endif
 };
 
+template<class T>
+struct streambuf
+{
+    stream *s;
+
+    streambuf(stream *s) : s(s) {}
+    
+    T get() { return s->get<T>(); }
+    int get(T *vals, int numvals) { return s->get(vals, numvals); }
+    void put(const T &val) { s->put(&val, 1); }
+    void put(const T *vals, int numvals) { s->put(vals, numvals); } 
+    int length() { return s->size(); }
+};
+
 enum
 {
     CT_PRINT   = 1<<0,
diff --git a/src/system-install.mk b/src/system-install.mk
index dec8fd6..ac78211 100644
--- a/src/system-install.mk
+++ b/src/system-install.mk
@@ -15,8 +15,6 @@ mandir=$(DESTDIR)$(prefix)/share/man
 menudir=$(DESTDIR)$(prefix)/share/applications
 icondir=$(DESTDIR)$(prefix)/share/icons/hicolor
 
-GZIPPER=gzip
-
 ICONS= \
 	install/nix/$(appsrcname)_x16.png \
 	install/nix/$(appsrcname)_x32.png \
@@ -82,14 +80,14 @@ system-install-docs: $(MANPAGES)
 		-e 's, at APPNAME@,$(appname),g' \
 		-e 's, at CAPPNAME@,$(cappname),g' \
 		install/nix/$(appsrcname).6.am | \
-		$(GZIPPER) -9 -n -c > $(mandir)/man6/$(appname).6.gz
+		gzip -9 -n -c > $(mandir)/man6/$(appname).6.gz
 	sed -e 's, at LIBEXECDIR@,$(patsubst $(DESTDIR)%,%,$(libexecdir)),g' \
 		-e 's, at DATADIR@,$(patsubst $(DESTDIR)%,%,$(datadir)),g' \
 		-e 's, at DOCDIR@,$(patsubst $(DESTDIR)%,%,$(docdir)),g' \
 		-e 's, at APPNAME@,$(appname),g' \
 		-e 's, at CAPPNAME@,$(cappname),g' \
 		install/nix/$(appsrcname)-server.6.am | \
-		$(GZIPPER) -9 -n -c > $(mandir)/man6/$(appname)-server.6.gz
+		gzip -9 -n -c > $(mandir)/man6/$(appname)-server.6.gz
 	cp -r ../data/examples $(docdir)/$(appname)/examples
 	cp ../guidelines.txt $(docdir)/$(appname)/guidelines.txt
 
@@ -123,7 +121,7 @@ system-install-cube2font: system-install-cube2font-docs
 
 system-install-cube2font-docs: install/nix/cube2font.1
 	install -d $(mandir)/man1
-	$(GZIPPER) -9 -n -c < install/nix/cube2font.1 \
+	gzip -9 -n -c < install/nix/cube2font.1 \
 		> $(mandir)/man1/cube2font.1.gz
 
 system-install: system-install-client system-install-server system-install-data system-install-docs system-install-menus

-- 
Packaging for Red Eclipse



More information about the Pkg-games-commits mailing list