diff --git a/config.d/ac_config_files.m4 b/config.d/ac_config_files.m4 index a8ee32f22..4c9142099 100644 --- a/config.d/ac_config_files.m4 +++ b/config.d/ac_config_files.m4 @@ -9,6 +9,7 @@ libs/audio/renderer/Makefile libs/audio/test/Makefile libs/console/Makefile + libs/client/Makefile libs/gamecode/Makefile libs/gib/Makefile libs/image/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index 39ed9a7a9..254ffdc85 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,6 +16,8 @@ EXTRA_DIST = \ sv_console.h varrays.h vgamodes.h vid_internal.h vregset.h winquake.h \ world.h \ \ + client/entities.h \ + \ qw/bothdefs.h qw/msg_backbuf.h qw/msg_ucmd.h qw/pmove.h qw/protocol.h \ \ win32/dirent.h win32/fnmatch.h win32/stdint.h \ diff --git a/include/client/entities.h b/include/client/entities.h new file mode 100644 index 000000000..1946b722b --- /dev/null +++ b/include/client/entities.h @@ -0,0 +1,38 @@ +/* + entities.h + + Entity management + + Copyright (C) 2012 Bill Currie + + Author: Bill Currie + Date: 2012/6/28 + + 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 the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to: + + Free Software Foundation, Inc. + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA + +*/ + +#ifndef __client_entities_h +#define __client_entities_h + +#include "QF/qtypes.h" + +extern vec3_t ent_colormod[256]; + +#endif//__client_entities_h diff --git a/libs/Makefile.am b/libs/Makefile.am index 2de3660a3..49dcf79af 100644 --- a/libs/Makefile.am +++ b/libs/Makefile.am @@ -8,4 +8,4 @@ AUTOMAKE_OPTIONS= foreign # video depends on models(?), image(?) and ruamoko # console depends on video, ruamoko and audio SUBDIRS=util gamecode ruamoko gib audio image models video console \ - net qw + net qw client diff --git a/libs/client/Makefile.am b/libs/client/Makefile.am new file mode 100644 index 000000000..af91b0b3b --- /dev/null +++ b/libs/client/Makefile.am @@ -0,0 +1,11 @@ +AUTOMAKE_OPTIONS= foreign + +AM_CFLAGS= @PREFER_PIC@ +INCLUDES= -I$(top_srcdir)/include + +noinst_LTLIBRARIES= libQFclient.la + +libQFclient_la_LDFLAGS= @STATIC@ +libQFclient_la_LIBADD= $(top_builddir)/libs/gamecode/libQFgamecode.la $(top_builddir)/libs/util/libQFutil.la +libQFclient_la_SOURCES= \ + cl_entities.c diff --git a/libs/client/cl_entities.c b/libs/client/cl_entities.c new file mode 100644 index 000000000..fad2f2d28 --- /dev/null +++ b/libs/client/cl_entities.c @@ -0,0 +1,293 @@ +/* + cl_entities.c + + Client side entity management + + Copyright (C) 2012 Bill Currie + + Author: Bill Currie + Date: 2012/6/28 + + 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 the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to: + + Free Software Foundation, Inc. + 59 Temple Place - Suite 330 + Boston, MA 02111-1307, USA + +*/ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "client/entities.h" + +vec3_t ent_colormod[256] = { + {0, 0, 0}, + {0, 0, 0.333333}, + {0, 0, 0.666667}, + {0, 0, 1}, + {0, 0.142857, 0}, + {0, 0.142857, 0.333333}, + {0, 0.142857, 0.666667}, + {0, 0.142857, 1}, + {0, 0.285714, 0}, + {0, 0.285714, 0.333333}, + {0, 0.285714, 0.666667}, + {0, 0.285714, 1}, + {0, 0.428571, 0}, + {0, 0.428571, 0.333333}, + {0, 0.428571, 0.666667}, + {0, 0.428571, 1}, + {0, 0.571429, 0}, + {0, 0.571429, 0.333333}, + {0, 0.571429, 0.666667}, + {0, 0.571429, 1}, + {0, 0.714286, 0}, + {0, 0.714286, 0.333333}, + {0, 0.714286, 0.666667}, + {0, 0.714286, 1}, + {0, 0.857143, 0}, + {0, 0.857143, 0.333333}, + {0, 0.857143, 0.666667}, + {0, 0.857143, 1}, + {0, 1, 0}, + {0, 1, 0.333333}, + {0, 1, 0.666667}, + {0, 1, 1}, + {0.142857, 0, 0}, + {0.142857, 0, 0.333333}, + {0.142857, 0, 0.666667}, + {0.142857, 0, 1}, + {0.142857, 0.142857, 0}, + {0.142857, 0.142857, 0.333333}, + {0.142857, 0.142857, 0.666667}, + {0.142857, 0.142857, 1}, + {0.142857, 0.285714, 0}, + {0.142857, 0.285714, 0.333333}, + {0.142857, 0.285714, 0.666667}, + {0.142857, 0.285714, 1}, + {0.142857, 0.428571, 0}, + {0.142857, 0.428571, 0.333333}, + {0.142857, 0.428571, 0.666667}, + {0.142857, 0.428571, 1}, + {0.142857, 0.571429, 0}, + {0.142857, 0.571429, 0.333333}, + {0.142857, 0.571429, 0.666667}, + {0.142857, 0.571429, 1}, + {0.142857, 0.714286, 0}, + {0.142857, 0.714286, 0.333333}, + {0.142857, 0.714286, 0.666667}, + {0.142857, 0.714286, 1}, + {0.142857, 0.857143, 0}, + {0.142857, 0.857143, 0.333333}, + {0.142857, 0.857143, 0.666667}, + {0.142857, 0.857143, 1}, + {0.142857, 1, 0}, + {0.142857, 1, 0.333333}, + {0.142857, 1, 0.666667}, + {0.142857, 1, 1}, + {0.285714, 0, 0}, + {0.285714, 0, 0.333333}, + {0.285714, 0, 0.666667}, + {0.285714, 0, 1}, + {0.285714, 0.142857, 0}, + {0.285714, 0.142857, 0.333333}, + {0.285714, 0.142857, 0.666667}, + {0.285714, 0.142857, 1}, + {0.285714, 0.285714, 0}, + {0.285714, 0.285714, 0.333333}, + {0.285714, 0.285714, 0.666667}, + {0.285714, 0.285714, 1}, + {0.285714, 0.428571, 0}, + {0.285714, 0.428571, 0.333333}, + {0.285714, 0.428571, 0.666667}, + {0.285714, 0.428571, 1}, + {0.285714, 0.571429, 0}, + {0.285714, 0.571429, 0.333333}, + {0.285714, 0.571429, 0.666667}, + {0.285714, 0.571429, 1}, + {0.285714, 0.714286, 0}, + {0.285714, 0.714286, 0.333333}, + {0.285714, 0.714286, 0.666667}, + {0.285714, 0.714286, 1}, + {0.285714, 0.857143, 0}, + {0.285714, 0.857143, 0.333333}, + {0.285714, 0.857143, 0.666667}, + {0.285714, 0.857143, 1}, + {0.285714, 1, 0}, + {0.285714, 1, 0.333333}, + {0.285714, 1, 0.666667}, + {0.285714, 1, 1}, + {0.428571, 0, 0}, + {0.428571, 0, 0.333333}, + {0.428571, 0, 0.666667}, + {0.428571, 0, 1}, + {0.428571, 0.142857, 0}, + {0.428571, 0.142857, 0.333333}, + {0.428571, 0.142857, 0.666667}, + {0.428571, 0.142857, 1}, + {0.428571, 0.285714, 0}, + {0.428571, 0.285714, 0.333333}, + {0.428571, 0.285714, 0.666667}, + {0.428571, 0.285714, 1}, + {0.428571, 0.428571, 0}, + {0.428571, 0.428571, 0.333333}, + {0.428571, 0.428571, 0.666667}, + {0.428571, 0.428571, 1}, + {0.428571, 0.571429, 0}, + {0.428571, 0.571429, 0.333333}, + {0.428571, 0.571429, 0.666667}, + {0.428571, 0.571429, 1}, + {0.428571, 0.714286, 0}, + {0.428571, 0.714286, 0.333333}, + {0.428571, 0.714286, 0.666667}, + {0.428571, 0.714286, 1}, + {0.428571, 0.857143, 0}, + {0.428571, 0.857143, 0.333333}, + {0.428571, 0.857143, 0.666667}, + {0.428571, 0.857143, 1}, + {0.428571, 1, 0}, + {0.428571, 1, 0.333333}, + {0.428571, 1, 0.666667}, + {0.428571, 1, 1}, + {0.571429, 0, 0}, + {0.571429, 0, 0.333333}, + {0.571429, 0, 0.666667}, + {0.571429, 0, 1}, + {0.571429, 0.142857, 0}, + {0.571429, 0.142857, 0.333333}, + {0.571429, 0.142857, 0.666667}, + {0.571429, 0.142857, 1}, + {0.571429, 0.285714, 0}, + {0.571429, 0.285714, 0.333333}, + {0.571429, 0.285714, 0.666667}, + {0.571429, 0.285714, 1}, + {0.571429, 0.428571, 0}, + {0.571429, 0.428571, 0.333333}, + {0.571429, 0.428571, 0.666667}, + {0.571429, 0.428571, 1}, + {0.571429, 0.571429, 0}, + {0.571429, 0.571429, 0.333333}, + {0.571429, 0.571429, 0.666667}, + {0.571429, 0.571429, 1}, + {0.571429, 0.714286, 0}, + {0.571429, 0.714286, 0.333333}, + {0.571429, 0.714286, 0.666667}, + {0.571429, 0.714286, 1}, + {0.571429, 0.857143, 0}, + {0.571429, 0.857143, 0.333333}, + {0.571429, 0.857143, 0.666667}, + {0.571429, 0.857143, 1}, + {0.571429, 1, 0}, + {0.571429, 1, 0.333333}, + {0.571429, 1, 0.666667}, + {0.571429, 1, 1}, + {0.714286, 0, 0}, + {0.714286, 0, 0.333333}, + {0.714286, 0, 0.666667}, + {0.714286, 0, 1}, + {0.714286, 0.142857, 0}, + {0.714286, 0.142857, 0.333333}, + {0.714286, 0.142857, 0.666667}, + {0.714286, 0.142857, 1}, + {0.714286, 0.285714, 0}, + {0.714286, 0.285714, 0.333333}, + {0.714286, 0.285714, 0.666667}, + {0.714286, 0.285714, 1}, + {0.714286, 0.428571, 0}, + {0.714286, 0.428571, 0.333333}, + {0.714286, 0.428571, 0.666667}, + {0.714286, 0.428571, 1}, + {0.714286, 0.571429, 0}, + {0.714286, 0.571429, 0.333333}, + {0.714286, 0.571429, 0.666667}, + {0.714286, 0.571429, 1}, + {0.714286, 0.714286, 0}, + {0.714286, 0.714286, 0.333333}, + {0.714286, 0.714286, 0.666667}, + {0.714286, 0.714286, 1}, + {0.714286, 0.857143, 0}, + {0.714286, 0.857143, 0.333333}, + {0.714286, 0.857143, 0.666667}, + {0.714286, 0.857143, 1}, + {0.714286, 1, 0}, + {0.714286, 1, 0.333333}, + {0.714286, 1, 0.666667}, + {0.714286, 1, 1}, + {0.857143, 0, 0}, + {0.857143, 0, 0.333333}, + {0.857143, 0, 0.666667}, + {0.857143, 0, 1}, + {0.857143, 0.142857, 0}, + {0.857143, 0.142857, 0.333333}, + {0.857143, 0.142857, 0.666667}, + {0.857143, 0.142857, 1}, + {0.857143, 0.285714, 0}, + {0.857143, 0.285714, 0.333333}, + {0.857143, 0.285714, 0.666667}, + {0.857143, 0.285714, 1}, + {0.857143, 0.428571, 0}, + {0.857143, 0.428571, 0.333333}, + {0.857143, 0.428571, 0.666667}, + {0.857143, 0.428571, 1}, + {0.857143, 0.571429, 0}, + {0.857143, 0.571429, 0.333333}, + {0.857143, 0.571429, 0.666667}, + {0.857143, 0.571429, 1}, + {0.857143, 0.714286, 0}, + {0.857143, 0.714286, 0.333333}, + {0.857143, 0.714286, 0.666667}, + {0.857143, 0.714286, 1}, + {0.857143, 0.857143, 0}, + {0.857143, 0.857143, 0.333333}, + {0.857143, 0.857143, 0.666667}, + {0.857143, 0.857143, 1}, + {0.857143, 1, 0}, + {0.857143, 1, 0.333333}, + {0.857143, 1, 0.666667}, + {0.857143, 1, 1}, + {1, 0, 0}, + {1, 0, 0.333333}, + {1, 0, 0.666667}, + {1, 0, 1}, + {1, 0.142857, 0}, + {1, 0.142857, 0.333333}, + {1, 0.142857, 0.666667}, + {1, 0.142857, 1}, + {1, 0.285714, 0}, + {1, 0.285714, 0.333333}, + {1, 0.285714, 0.666667}, + {1, 0.285714, 1}, + {1, 0.428571, 0}, + {1, 0.428571, 0.333333}, + {1, 0.428571, 0.666667}, + {1, 0.428571, 1}, + {1, 0.571429, 0}, + {1, 0.571429, 0.333333}, + {1, 0.571429, 0.666667}, + {1, 0.571429, 1}, + {1, 0.714286, 0}, + {1, 0.714286, 0.333333}, + {1, 0.714286, 0.666667}, + {1, 0.714286, 1}, + {1, 0.857143, 0}, + {1, 0.857143, 0.333333}, + {1, 0.857143, 0.666667}, + {1, 0.857143, 1}, + {1, 1, 0}, + {1, 1, 0.333333}, + {1, 1, 0.666667}, + {1, 1, 1} +}; diff --git a/nq/include/client.h b/nq/include/client.h index 2ab4e7976..894dd2cf4 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -37,6 +37,8 @@ #include "QF/sound.h" #include "QF/render.h" +#include "client/entities.h" + #include "game.h" #include "netmain.h" #include "protocol.h" @@ -276,7 +278,6 @@ extern entity_t cl_entities[MAX_EDICTS]; extern entity_state_t cl_entity_states[3][MAX_EDICTS]; extern double cl_msgtime[MAX_EDICTS]; extern byte cl_forcelink[MAX_EDICTS]; -extern vec3_t ent_colormod[256]; extern int fps_count; diff --git a/nq/source/Makefile.am b/nq/source/Makefile.am index 5a49e2761..4ee91c4fc 100644 --- a/nq/source/Makefile.am +++ b/nq/source/Makefile.am @@ -81,7 +81,8 @@ libnq_server_a_SOURCES= \ host.c host_cmd.c sv_cl_phys.c sv_cvar.c sv_main.c \ sv_move.c sv_phys.c sv_pr_cmds.c sv_progs.c sv_user.c -client_libs= libnq_server.a libnq_client.a libnq_common.a +client_libs= libnq_server.a libnq_client.a libnq_common.a \ + $(top_builddir)/libs/client/libQFclient.la server_libs = libnq_server.a libnq_common.a # Software-rendering targets diff --git a/nq/source/cl_ents.c b/nq/source/cl_ents.c index 73002d3ea..8118c12f9 100644 --- a/nq/source/cl_ents.c +++ b/nq/source/cl_ents.c @@ -56,265 +56,6 @@ entity_state_t cl_entity_states[3][MAX_EDICTS]; double cl_msgtime[MAX_EDICTS]; byte cl_forcelink[MAX_EDICTS]; -vec3_t ent_colormod[256] = { - {0, 0, 0}, - {0, 0, 0.333333}, - {0, 0, 0.666667}, - {0, 0, 1}, - {0, 0.142857, 0}, - {0, 0.142857, 0.333333}, - {0, 0.142857, 0.666667}, - {0, 0.142857, 1}, - {0, 0.285714, 0}, - {0, 0.285714, 0.333333}, - {0, 0.285714, 0.666667}, - {0, 0.285714, 1}, - {0, 0.428571, 0}, - {0, 0.428571, 0.333333}, - {0, 0.428571, 0.666667}, - {0, 0.428571, 1}, - {0, 0.571429, 0}, - {0, 0.571429, 0.333333}, - {0, 0.571429, 0.666667}, - {0, 0.571429, 1}, - {0, 0.714286, 0}, - {0, 0.714286, 0.333333}, - {0, 0.714286, 0.666667}, - {0, 0.714286, 1}, - {0, 0.857143, 0}, - {0, 0.857143, 0.333333}, - {0, 0.857143, 0.666667}, - {0, 0.857143, 1}, - {0, 1, 0}, - {0, 1, 0.333333}, - {0, 1, 0.666667}, - {0, 1, 1}, - {0.142857, 0, 0}, - {0.142857, 0, 0.333333}, - {0.142857, 0, 0.666667}, - {0.142857, 0, 1}, - {0.142857, 0.142857, 0}, - {0.142857, 0.142857, 0.333333}, - {0.142857, 0.142857, 0.666667}, - {0.142857, 0.142857, 1}, - {0.142857, 0.285714, 0}, - {0.142857, 0.285714, 0.333333}, - {0.142857, 0.285714, 0.666667}, - {0.142857, 0.285714, 1}, - {0.142857, 0.428571, 0}, - {0.142857, 0.428571, 0.333333}, - {0.142857, 0.428571, 0.666667}, - {0.142857, 0.428571, 1}, - {0.142857, 0.571429, 0}, - {0.142857, 0.571429, 0.333333}, - {0.142857, 0.571429, 0.666667}, - {0.142857, 0.571429, 1}, - {0.142857, 0.714286, 0}, - {0.142857, 0.714286, 0.333333}, - {0.142857, 0.714286, 0.666667}, - {0.142857, 0.714286, 1}, - {0.142857, 0.857143, 0}, - {0.142857, 0.857143, 0.333333}, - {0.142857, 0.857143, 0.666667}, - {0.142857, 0.857143, 1}, - {0.142857, 1, 0}, - {0.142857, 1, 0.333333}, - {0.142857, 1, 0.666667}, - {0.142857, 1, 1}, - {0.285714, 0, 0}, - {0.285714, 0, 0.333333}, - {0.285714, 0, 0.666667}, - {0.285714, 0, 1}, - {0.285714, 0.142857, 0}, - {0.285714, 0.142857, 0.333333}, - {0.285714, 0.142857, 0.666667}, - {0.285714, 0.142857, 1}, - {0.285714, 0.285714, 0}, - {0.285714, 0.285714, 0.333333}, - {0.285714, 0.285714, 0.666667}, - {0.285714, 0.285714, 1}, - {0.285714, 0.428571, 0}, - {0.285714, 0.428571, 0.333333}, - {0.285714, 0.428571, 0.666667}, - {0.285714, 0.428571, 1}, - {0.285714, 0.571429, 0}, - {0.285714, 0.571429, 0.333333}, - {0.285714, 0.571429, 0.666667}, - {0.285714, 0.571429, 1}, - {0.285714, 0.714286, 0}, - {0.285714, 0.714286, 0.333333}, - {0.285714, 0.714286, 0.666667}, - {0.285714, 0.714286, 1}, - {0.285714, 0.857143, 0}, - {0.285714, 0.857143, 0.333333}, - {0.285714, 0.857143, 0.666667}, - {0.285714, 0.857143, 1}, - {0.285714, 1, 0}, - {0.285714, 1, 0.333333}, - {0.285714, 1, 0.666667}, - {0.285714, 1, 1}, - {0.428571, 0, 0}, - {0.428571, 0, 0.333333}, - {0.428571, 0, 0.666667}, - {0.428571, 0, 1}, - {0.428571, 0.142857, 0}, - {0.428571, 0.142857, 0.333333}, - {0.428571, 0.142857, 0.666667}, - {0.428571, 0.142857, 1}, - {0.428571, 0.285714, 0}, - {0.428571, 0.285714, 0.333333}, - {0.428571, 0.285714, 0.666667}, - {0.428571, 0.285714, 1}, - {0.428571, 0.428571, 0}, - {0.428571, 0.428571, 0.333333}, - {0.428571, 0.428571, 0.666667}, - {0.428571, 0.428571, 1}, - {0.428571, 0.571429, 0}, - {0.428571, 0.571429, 0.333333}, - {0.428571, 0.571429, 0.666667}, - {0.428571, 0.571429, 1}, - {0.428571, 0.714286, 0}, - {0.428571, 0.714286, 0.333333}, - {0.428571, 0.714286, 0.666667}, - {0.428571, 0.714286, 1}, - {0.428571, 0.857143, 0}, - {0.428571, 0.857143, 0.333333}, - {0.428571, 0.857143, 0.666667}, - {0.428571, 0.857143, 1}, - {0.428571, 1, 0}, - {0.428571, 1, 0.333333}, - {0.428571, 1, 0.666667}, - {0.428571, 1, 1}, - {0.571429, 0, 0}, - {0.571429, 0, 0.333333}, - {0.571429, 0, 0.666667}, - {0.571429, 0, 1}, - {0.571429, 0.142857, 0}, - {0.571429, 0.142857, 0.333333}, - {0.571429, 0.142857, 0.666667}, - {0.571429, 0.142857, 1}, - {0.571429, 0.285714, 0}, - {0.571429, 0.285714, 0.333333}, - {0.571429, 0.285714, 0.666667}, - {0.571429, 0.285714, 1}, - {0.571429, 0.428571, 0}, - {0.571429, 0.428571, 0.333333}, - {0.571429, 0.428571, 0.666667}, - {0.571429, 0.428571, 1}, - {0.571429, 0.571429, 0}, - {0.571429, 0.571429, 0.333333}, - {0.571429, 0.571429, 0.666667}, - {0.571429, 0.571429, 1}, - {0.571429, 0.714286, 0}, - {0.571429, 0.714286, 0.333333}, - {0.571429, 0.714286, 0.666667}, - {0.571429, 0.714286, 1}, - {0.571429, 0.857143, 0}, - {0.571429, 0.857143, 0.333333}, - {0.571429, 0.857143, 0.666667}, - {0.571429, 0.857143, 1}, - {0.571429, 1, 0}, - {0.571429, 1, 0.333333}, - {0.571429, 1, 0.666667}, - {0.571429, 1, 1}, - {0.714286, 0, 0}, - {0.714286, 0, 0.333333}, - {0.714286, 0, 0.666667}, - {0.714286, 0, 1}, - {0.714286, 0.142857, 0}, - {0.714286, 0.142857, 0.333333}, - {0.714286, 0.142857, 0.666667}, - {0.714286, 0.142857, 1}, - {0.714286, 0.285714, 0}, - {0.714286, 0.285714, 0.333333}, - {0.714286, 0.285714, 0.666667}, - {0.714286, 0.285714, 1}, - {0.714286, 0.428571, 0}, - {0.714286, 0.428571, 0.333333}, - {0.714286, 0.428571, 0.666667}, - {0.714286, 0.428571, 1}, - {0.714286, 0.571429, 0}, - {0.714286, 0.571429, 0.333333}, - {0.714286, 0.571429, 0.666667}, - {0.714286, 0.571429, 1}, - {0.714286, 0.714286, 0}, - {0.714286, 0.714286, 0.333333}, - {0.714286, 0.714286, 0.666667}, - {0.714286, 0.714286, 1}, - {0.714286, 0.857143, 0}, - {0.714286, 0.857143, 0.333333}, - {0.714286, 0.857143, 0.666667}, - {0.714286, 0.857143, 1}, - {0.714286, 1, 0}, - {0.714286, 1, 0.333333}, - {0.714286, 1, 0.666667}, - {0.714286, 1, 1}, - {0.857143, 0, 0}, - {0.857143, 0, 0.333333}, - {0.857143, 0, 0.666667}, - {0.857143, 0, 1}, - {0.857143, 0.142857, 0}, - {0.857143, 0.142857, 0.333333}, - {0.857143, 0.142857, 0.666667}, - {0.857143, 0.142857, 1}, - {0.857143, 0.285714, 0}, - {0.857143, 0.285714, 0.333333}, - {0.857143, 0.285714, 0.666667}, - {0.857143, 0.285714, 1}, - {0.857143, 0.428571, 0}, - {0.857143, 0.428571, 0.333333}, - {0.857143, 0.428571, 0.666667}, - {0.857143, 0.428571, 1}, - {0.857143, 0.571429, 0}, - {0.857143, 0.571429, 0.333333}, - {0.857143, 0.571429, 0.666667}, - {0.857143, 0.571429, 1}, - {0.857143, 0.714286, 0}, - {0.857143, 0.714286, 0.333333}, - {0.857143, 0.714286, 0.666667}, - {0.857143, 0.714286, 1}, - {0.857143, 0.857143, 0}, - {0.857143, 0.857143, 0.333333}, - {0.857143, 0.857143, 0.666667}, - {0.857143, 0.857143, 1}, - {0.857143, 1, 0}, - {0.857143, 1, 0.333333}, - {0.857143, 1, 0.666667}, - {0.857143, 1, 1}, - {1, 0, 0}, - {1, 0, 0.333333}, - {1, 0, 0.666667}, - {1, 0, 1}, - {1, 0.142857, 0}, - {1, 0.142857, 0.333333}, - {1, 0.142857, 0.666667}, - {1, 0.142857, 1}, - {1, 0.285714, 0}, - {1, 0.285714, 0.333333}, - {1, 0.285714, 0.666667}, - {1, 0.285714, 1}, - {1, 0.428571, 0}, - {1, 0.428571, 0.333333}, - {1, 0.428571, 0.666667}, - {1, 0.428571, 1}, - {1, 0.571429, 0}, - {1, 0.571429, 0.333333}, - {1, 0.571429, 0.666667}, - {1, 0.571429, 1}, - {1, 0.714286, 0}, - {1, 0.714286, 0.333333}, - {1, 0.714286, 0.666667}, - {1, 0.714286, 1}, - {1, 0.857143, 0}, - {1, 0.857143, 0.333333}, - {1, 0.857143, 0.666667}, - {1, 0.857143, 1}, - {1, 1, 0}, - {1, 1, 0.333333}, - {1, 1, 0.666667}, - {1, 1, 1} -}; - void CL_ClearEnts (void) { diff --git a/qw/include/client.h b/qw/include/client.h index 34324a647..c3b89832d 100644 --- a/qw/include/client.h +++ b/qw/include/client.h @@ -35,6 +35,8 @@ #include "QF/plugin/vid_render.h" +#include "client/entities.h" + #include "netchan.h" #include "qw/bothdefs.h" #include "qw/protocol.h" diff --git a/qw/source/Makefile.am b/qw/source/Makefile.am index 74e06d572..b236c569a 100644 --- a/qw/source/Makefile.am +++ b/qw/source/Makefile.am @@ -106,7 +106,8 @@ qw_client_LIBS= \ $(top_builddir)/libs/util/libQFutil.la client_LIBS= $(qw_client_LIBS) -client_libs= libqw_client.a libqw_common.a +client_libs= libqw_client.a libqw_common.a \ + $(top_builddir)/libs/client/libQFclient.la libqw_client_a_SOURCES= \ cl_cam.c cl_chase.c cl_chat.c cl_cmd.c cl_cvar.c cl_demo.c \ diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index c7578b785..d34e86e91 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -273,17 +273,7 @@ CL_LinkPacketEntities (void) // set colormap ent->skin = s1->skin; - // LordHavoc: cleaned up Endy's coding style, and fixed Endy's bugs - // Ender: Extend (Colormod) [QSG - Begin] - // N.B: All messy code below is the sole fault of LordHavoc and - // his futile attempts to save bandwidth. :) - if (s1->colormod == 255) { - ent->colormod[0] = ent->colormod[1] = ent->colormod[2] = 1.0; - } else { - ent->colormod[0] = (float) ((s1->colormod >> 5) & 7) * (1.0 / 7.0); - ent->colormod[1] = (float) ((s1->colormod >> 2) & 7) * (1.0 / 7.0); - ent->colormod[2] = (float) (s1->colormod & 3) * (1.0 / 3.0); - } + VectorCopy (ent_colormod[s1->colormod], ent->colormod); ent->colormod[3] = s1->alpha / 255.0; ent->scale = s1->scale / 16.0; // Ender: Extend (Colormod) [QSG - End]