15 Aug 2011
This commit is contained in:
parent
faabf8b33d
commit
6c719cf63d
|
@ -1,3 +1,9 @@
|
|||
build ????
|
||||
|
||||
Client: implement StudioRemapColors function
|
||||
Client: add simple shadows for stduiomodels (disabled like in GoldSrc)
|
||||
Client: fix some Paranoia bugs when custom renderer is disabled
|
||||
|
||||
build 1613
|
||||
|
||||
Client: fix drawing beams for 'solid' mode
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
#define EF_NOREFLECT 256 // Entity won't reflecting in mirrors
|
||||
#define EF_REFLECTONLY 512 // Entity will be drawing only in mirrors
|
||||
#define EF_NOWATERCSG 1024 // Do not remove sides for func_water entity
|
||||
#define EF_MINLIGHT 2048 // Allways have some light (e.g. viewentity)
|
||||
// Reserved bit
|
||||
#define EF_FULLBRIGHT 4096 // Just get fullbright
|
||||
#define EF_NOSHADOW 8192 // ignore shadow for this entity
|
||||
#define EF_MERGE_VISIBILITY 16384 // this entity allowed to merge vis (e.g. env_sky or portal camera)
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Copyright (C) 1996-1997 Id Software, 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 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 the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
{1.23,1.30,1.47,1.35,1.56,1.71,1.37,1.38,1.59,1.60,1.79,1.97,1.88,1.92,1.79,1.02,0.93,1.07,0.82,0.87,0.88,0.94,0.96,1.14,1.11,0.82,0.83,0.89,0.89,0.86,0.94,0.91,1.00,1.21,0.98,1.48,1.30,1.57,0.96,1.07,1.14,1.60,1.61,1.40,1.37,1.72,1.78,1.79,1.93,1.99,1.90,1.68,1.71,1.86,1.60,1.68,1.78,1.86,1.93,1.99,1.97,1.44,1.22,1.49,0.93,0.99,0.99,1.23,1.22,1.44,1.49,0.89,0.89,0.97,0.91,0.98,1.19,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.19,0.98,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.87,0.93,0.94,1.02,1.30,1.07,1.35,1.38,1.11,1.56,1.92,1.79,1.79,1.59,1.60,1.72,1.90,1.79,0.80,0.85,0.79,0.93,0.80,0.85,0.77,0.74,0.72,0.77,0.74,0.72,0.70,0.70,0.71,0.76,0.73,0.79,0.79,0.73,0.76,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.26,1.26,1.48,1.23,1.50,1.71,1.14,1.19,1.38,1.46,1.64,1.94,1.87,1.84,1.71,1.02,0.92,1.00,0.79,0.85,0.84,0.91,0.90,0.98,0.99,0.77,0.77,0.83,0.82,0.79,0.86,0.84,0.92,0.99,0.91,1.24,1.03,1.33,0.88,0.94,0.97,1.41,1.39,1.18,1.11,1.51,1.61,1.59,1.80,1.91,1.76,1.54,1.65,1.76,1.70,1.70,1.85,1.85,1.97,1.99,1.93,1.28,1.09,1.39,0.92,0.97,0.99,1.18,1.26,1.52,1.48,0.83,0.85,0.90,0.88,0.93,1.00,0.77,0.73,0.78,0.72,0.71,0.74,0.75,0.79,0.86,0.81,0.75,0.81,0.79,0.96,0.88,0.94,0.86,0.93,0.92,0.85,1.08,1.33,1.05,1.55,1.31,1.01,1.05,1.27,1.31,1.60,1.47,1.70,1.54,1.76,1.76,1.57,0.93,0.90,0.99,0.88,0.88,0.95,0.97,1.11,1.39,1.20,0.92,0.97,1.01,1.10,1.39,1.22,1.51,1.58,1.32,1.64,1.97,1.85,1.91,1.77,1.74,1.88,1.99,1.91,0.79,0.86,0.80,0.94,0.84,0.88,0.74,0.74,0.71,0.82,0.77,0.76,0.70,0.73,0.72,0.73,0.70,0.74,0.85,0.77,0.82,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.34,1.27,1.53,1.17,1.46,1.71,0.98,1.05,1.20,1.34,1.48,1.86,1.82,1.71,1.62,1.09,0.94,0.99,0.79,0.85,0.82,0.90,0.87,0.93,0.96,0.76,0.74,0.79,0.76,0.74,0.79,0.78,0.85,0.92,0.85,1.00,0.93,1.06,0.81,0.86,0.89,1.16,1.12,0.97,0.95,1.28,1.38,1.35,1.60,1.77,1.57,1.33,1.50,1.58,1.69,1.63,1.82,1.74,1.91,1.92,1.80,1.04,0.97,1.21,0.90,0.93,0.97,1.05,1.21,1.48,1.37,0.77,0.80,0.84,0.85,0.88,0.92,0.73,0.71,0.74,0.74,0.71,0.75,0.73,0.79,0.84,0.78,0.79,0.86,0.81,1.05,0.94,0.99,0.90,0.95,0.92,0.86,1.24,1.44,1.14,1.59,1.34,1.02,1.27,1.50,1.49,1.80,1.69,1.86,1.72,1.87,1.80,1.69,1.00,0.98,1.23,0.95,0.96,1.09,1.16,1.37,1.63,1.46,0.99,1.10,1.25,1.24,1.51,1.41,1.67,1.77,1.55,1.72,1.95,1.89,1.98,1.91,1.86,1.97,1.99,1.94,0.81,0.89,0.85,0.98,0.90,0.94,0.75,0.78,0.73,0.89,0.83,0.82,0.72,0.77,0.76,0.72,0.70,0.71,0.91,0.83,0.89,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.46,1.34,1.60,1.16,1.46,1.71,0.94,0.99,1.05,1.26,1.33,1.74,1.76,1.57,1.54,1.23,0.98,1.05,0.83,0.89,0.84,0.92,0.87,0.91,0.96,0.78,0.74,0.79,0.72,0.72,0.75,0.76,0.80,0.88,0.83,0.94,0.87,0.95,0.76,0.80,0.82,0.97,0.96,0.89,0.88,1.08,1.11,1.10,1.37,1.59,1.37,1.07,1.27,1.34,1.57,1.45,1.69,1.55,1.77,1.79,1.60,0.93,0.90,0.99,0.86,0.87,0.93,0.96,1.07,1.35,1.18,0.73,0.76,0.77,0.81,0.82,0.85,0.70,0.71,0.72,0.78,0.73,0.77,0.73,0.79,0.82,0.76,0.83,0.90,0.84,1.18,0.98,1.03,0.92,0.95,0.90,0.86,1.32,1.45,1.15,1.53,1.27,0.99,1.42,1.65,1.58,1.93,1.83,1.94,1.81,1.88,1.74,1.70,1.19,1.17,1.44,1.11,1.15,1.36,1.41,1.61,1.81,1.67,1.22,1.34,1.50,1.42,1.65,1.61,1.82,1.91,1.75,1.80,1.89,1.89,1.98,1.99,1.94,1.98,1.92,1.87,0.86,0.95,0.92,1.14,0.98,1.03,0.79,0.84,0.77,0.97,0.90,0.89,0.76,0.82,0.82,0.74,0.72,0.71,0.98,0.89,0.97,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.60,1.44,1.68,1.22,1.49,1.71,0.93,0.99,0.99,1.23,1.22,1.60,1.68,1.44,1.49,1.40,1.14,1.19,0.89,0.96,0.89,0.97,0.89,0.91,0.98,0.82,0.76,0.82,0.71,0.72,0.73,0.76,0.79,0.86,0.83,0.91,0.83,0.89,0.72,0.76,0.76,0.89,0.89,0.82,0.82,0.98,0.96,0.97,1.14,1.40,1.19,0.94,1.00,1.07,1.37,1.21,1.48,1.30,1.57,1.61,1.37,0.86,0.83,0.91,0.82,0.82,0.88,0.89,0.96,1.14,0.98,0.70,0.72,0.73,0.77,0.76,0.79,0.70,0.72,0.71,0.82,0.77,0.80,0.74,0.79,0.80,0.74,0.87,0.93,0.85,1.23,1.02,1.02,0.93,0.93,0.87,0.85,1.30,1.35,1.07,1.38,1.11,0.94,1.47,1.71,1.56,1.97,1.88,1.92,1.79,1.79,1.59,1.60,1.30,1.35,1.56,1.37,1.38,1.59,1.60,1.79,1.92,1.79,1.48,1.57,1.72,1.61,1.78,1.79,1.93,1.99,1.90,1.86,1.78,1.86,1.93,1.99,1.97,1.90,1.79,1.72,0.94,1.07,1.00,1.37,1.21,1.30,0.86,0.91,0.83,1.14,0.98,0.96,0.82,0.88,0.89,0.79,0.76,0.73,1.07,0.94,1.11,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.74,1.57,1.76,1.33,1.54,1.71,0.94,1.05,0.99,1.26,1.16,1.46,1.60,1.34,1.46,1.59,1.37,1.37,0.97,1.11,0.96,1.10,0.95,0.94,1.08,0.89,0.82,0.88,0.72,0.76,0.75,0.80,0.80,0.88,0.87,0.91,0.83,0.87,0.72,0.76,0.74,0.83,0.84,0.78,0.79,0.96,0.89,0.92,0.98,1.23,1.05,0.86,0.92,0.95,1.11,0.98,1.22,1.03,1.34,1.42,1.14,0.79,0.77,0.84,0.78,0.76,0.82,0.82,0.89,0.97,0.90,0.70,0.71,0.71,0.73,0.72,0.74,0.73,0.76,0.72,0.86,0.81,0.82,0.76,0.79,0.77,0.73,0.90,0.95,0.86,1.18,1.03,0.98,0.92,0.90,0.83,0.84,1.19,1.17,0.98,1.15,0.97,0.89,1.42,1.65,1.44,1.93,1.83,1.81,1.67,1.61,1.36,1.41,1.32,1.45,1.58,1.57,1.53,1.74,1.70,1.88,1.94,1.81,1.69,1.77,1.87,1.79,1.89,1.92,1.98,1.99,1.98,1.89,1.65,1.80,1.82,1.91,1.94,1.75,1.61,1.50,1.07,1.34,1.27,1.60,1.45,1.55,0.93,0.99,0.90,1.35,1.18,1.07,0.87,0.93,0.96,0.85,0.82,0.77,1.15,0.99,1.27,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.86,1.71,1.82,1.48,1.62,1.71,0.98,1.20,1.05,1.34,1.17,1.34,1.53,1.27,1.46,1.77,1.60,1.57,1.16,1.38,1.12,1.35,1.06,1.00,1.28,0.97,0.89,0.95,0.76,0.81,0.79,0.86,0.85,0.92,0.93,0.93,0.85,0.87,0.74,0.78,0.74,0.79,0.82,0.76,0.79,0.96,0.85,0.90,0.94,1.09,0.99,0.81,0.85,0.89,0.95,0.90,0.99,0.94,1.10,1.24,0.98,0.75,0.73,0.78,0.74,0.72,0.77,0.76,0.82,0.89,0.83,0.73,0.71,0.71,0.71,0.70,0.72,0.77,0.80,0.74,0.90,0.85,0.84,0.78,0.79,0.75,0.73,0.92,0.95,0.86,1.05,0.99,0.94,0.90,0.86,0.79,0.81,1.00,0.98,0.91,0.96,0.89,0.83,1.27,1.50,1.23,1.80,1.69,1.63,1.46,1.37,1.09,1.16,1.24,1.44,1.49,1.69,1.59,1.80,1.69,1.87,1.86,1.72,1.82,1.91,1.94,1.92,1.95,1.99,1.98,1.91,1.97,1.89,1.51,1.72,1.67,1.77,1.86,1.55,1.41,1.25,1.33,1.58,1.50,1.80,1.63,1.74,1.04,1.21,0.97,1.48,1.37,1.21,0.93,0.97,1.05,0.92,0.88,0.84,1.14,1.02,1.34,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.94,1.84,1.87,1.64,1.71,1.71,1.14,1.38,1.19,1.46,1.23,1.26,1.48,1.26,1.50,1.91,1.80,1.76,1.41,1.61,1.39,1.59,1.33,1.24,1.51,1.18,0.97,1.11,0.82,0.88,0.86,0.94,0.92,0.99,1.03,0.98,0.91,0.90,0.79,0.84,0.77,0.79,0.84,0.77,0.83,0.99,0.85,0.91,0.92,1.02,1.00,0.79,0.80,0.86,0.88,0.84,0.92,0.88,0.97,1.10,0.94,0.74,0.71,0.74,0.72,0.70,0.73,0.72,0.76,0.82,0.77,0.77,0.73,0.74,0.71,0.70,0.73,0.83,0.85,0.78,0.92,0.88,0.86,0.81,0.79,0.74,0.75,0.92,0.93,0.85,0.96,0.94,0.88,0.86,0.81,0.75,0.79,0.93,0.90,0.85,0.88,0.82,0.77,1.05,1.27,0.99,1.60,1.47,1.39,1.20,1.11,0.95,0.97,1.08,1.33,1.31,1.70,1.55,1.76,1.57,1.76,1.70,1.54,1.85,1.97,1.91,1.99,1.97,1.99,1.91,1.77,1.88,1.85,1.39,1.64,1.51,1.58,1.74,1.32,1.22,1.01,1.54,1.76,1.65,1.93,1.70,1.85,1.28,1.39,1.09,1.52,1.48,1.26,0.97,0.99,1.18,1.00,0.93,0.90,1.05,1.01,1.31,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.97,1.92,1.88,1.79,1.79,1.71,1.37,1.59,1.38,1.60,1.35,1.23,1.47,1.30,1.56,1.99,1.93,1.90,1.60,1.78,1.61,1.79,1.57,1.48,1.72,1.40,1.14,1.37,0.89,0.96,0.94,1.07,1.00,1.21,1.30,1.14,0.98,0.96,0.86,0.91,0.83,0.82,0.88,0.82,0.89,1.11,0.87,0.94,0.93,1.02,1.07,0.80,0.79,0.85,0.82,0.80,0.87,0.85,0.93,1.02,0.93,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.82,0.76,0.79,0.72,0.73,0.76,0.89,0.89,0.82,0.93,0.91,0.86,0.83,0.79,0.73,0.76,0.91,0.89,0.83,0.89,0.89,0.82,0.82,0.76,0.72,0.76,0.86,0.83,0.79,0.82,0.76,0.73,0.94,1.00,0.91,1.37,1.21,1.14,0.98,0.96,0.88,0.89,0.96,1.14,1.07,1.60,1.40,1.61,1.37,1.57,1.48,1.30,1.78,1.93,1.79,1.99,1.92,1.90,1.79,1.59,1.72,1.79,1.30,1.56,1.35,1.38,1.60,1.11,1.07,0.94,1.68,1.86,1.71,1.97,1.68,1.86,1.44,1.49,1.22,1.44,1.49,1.22,0.99,0.99,1.23,1.19,0.98,0.97,0.97,0.98,1.19,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.94,1.97,1.87,1.91,1.85,1.71,1.60,1.77,1.58,1.74,1.51,1.26,1.48,1.39,1.64,1.99,1.97,1.99,1.70,1.85,1.76,1.91,1.76,1.70,1.88,1.55,1.33,1.57,0.96,1.08,1.05,1.31,1.27,1.47,1.54,1.39,1.20,1.11,0.93,0.99,0.90,0.88,0.95,0.88,0.97,1.32,0.92,1.01,0.97,1.10,1.22,0.84,0.80,0.88,0.79,0.79,0.85,0.86,0.92,1.02,0.94,0.82,0.76,0.77,0.72,0.73,0.70,0.72,0.71,0.74,0.74,0.88,0.81,0.85,0.75,0.77,0.82,0.94,0.93,0.86,0.92,0.92,0.86,0.85,0.79,0.74,0.79,0.88,0.85,0.81,0.82,0.83,0.77,0.78,0.73,0.71,0.75,0.79,0.77,0.74,0.77,0.73,0.70,0.86,0.92,0.84,1.14,0.99,0.98,0.91,0.90,0.84,0.83,0.88,0.97,0.94,1.41,1.18,1.39,1.11,1.33,1.24,1.03,1.61,1.80,1.59,1.91,1.84,1.76,1.64,1.38,1.51,1.71,1.26,1.50,1.23,1.19,1.46,0.99,1.00,0.91,1.70,1.85,1.65,1.93,1.54,1.76,1.52,1.48,1.26,1.28,1.39,1.09,0.99,0.97,1.18,1.31,1.01,1.05,0.90,0.93,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.86,1.95,1.82,1.98,1.89,1.71,1.80,1.91,1.77,1.86,1.67,1.34,1.53,1.51,1.72,1.92,1.91,1.99,1.69,1.82,1.80,1.94,1.87,1.86,1.97,1.59,1.44,1.69,1.05,1.24,1.27,1.49,1.50,1.69,1.72,1.63,1.46,1.37,1.00,1.23,0.98,0.95,1.09,0.96,1.16,1.55,0.99,1.25,1.10,1.24,1.41,0.90,0.85,0.94,0.79,0.81,0.85,0.89,0.94,1.09,0.98,0.89,0.82,0.83,0.74,0.77,0.72,0.76,0.73,0.75,0.78,0.94,0.86,0.91,0.79,0.83,0.89,0.99,0.95,0.90,0.90,0.92,0.84,0.86,0.79,0.75,0.81,0.85,0.80,0.78,0.76,0.77,0.73,0.74,0.71,0.71,0.73,0.74,0.74,0.71,0.76,0.72,0.70,0.79,0.85,0.78,0.98,0.92,0.93,0.85,0.87,0.82,0.79,0.81,0.89,0.86,1.16,0.97,1.12,0.95,1.06,1.00,0.93,1.38,1.60,1.35,1.77,1.71,1.57,1.48,1.20,1.28,1.62,1.27,1.46,1.17,1.05,1.34,0.96,0.99,0.90,1.63,1.74,1.50,1.80,1.33,1.58,1.48,1.37,1.21,1.04,1.21,0.97,0.97,0.93,1.05,1.34,1.02,1.14,0.84,0.88,0.92,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.74,1.89,1.76,1.98,1.89,1.71,1.93,1.99,1.91,1.94,1.82,1.46,1.60,1.65,1.80,1.79,1.77,1.92,1.57,1.69,1.74,1.87,1.88,1.94,1.98,1.53,1.45,1.70,1.18,1.32,1.42,1.58,1.65,1.83,1.81,1.81,1.67,1.61,1.19,1.44,1.17,1.11,1.36,1.15,1.41,1.75,1.22,1.50,1.34,1.42,1.61,0.98,0.92,1.03,0.83,0.86,0.89,0.95,0.98,1.23,1.14,0.97,0.89,0.90,0.78,0.82,0.76,0.82,0.77,0.79,0.84,0.98,0.90,0.98,0.83,0.89,0.97,1.03,0.95,0.92,0.86,0.90,0.82,0.86,0.79,0.77,0.84,0.81,0.76,0.76,0.72,0.73,0.70,0.72,0.71,0.73,0.73,0.72,0.74,0.71,0.78,0.74,0.72,0.75,0.80,0.76,0.94,0.88,0.91,0.83,0.87,0.84,0.79,0.76,0.82,0.80,0.97,0.89,0.96,0.88,0.95,0.94,0.87,1.11,1.37,1.10,1.59,1.57,1.37,1.33,1.05,1.08,1.54,1.34,1.46,1.16,0.99,1.26,0.96,1.05,0.92,1.45,1.55,1.27,1.60,1.07,1.34,1.35,1.18,1.07,0.93,0.99,0.90,0.93,0.87,0.96,1.27,0.99,1.15,0.77,0.82,0.85,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.60,1.78,1.68,1.93,1.86,1.71,1.97,1.99,1.99,1.97,1.93,1.60,1.68,1.78,1.86,1.61,1.57,1.79,1.37,1.48,1.59,1.72,1.79,1.92,1.90,1.38,1.35,1.60,1.23,1.30,1.47,1.56,1.71,1.88,1.79,1.92,1.79,1.79,1.30,1.56,1.35,1.37,1.59,1.38,1.60,1.90,1.48,1.72,1.57,1.61,1.79,1.21,1.00,1.30,0.89,0.94,0.96,1.07,1.14,1.40,1.37,1.14,0.96,0.98,0.82,0.88,0.82,0.89,0.83,0.86,0.91,1.02,0.93,1.07,0.87,0.94,1.11,1.02,0.93,0.93,0.82,0.87,0.80,0.85,0.79,0.80,0.85,0.77,0.72,0.74,0.71,0.70,0.70,0.71,0.72,0.77,0.74,0.72,0.76,0.73,0.82,0.79,0.76,0.73,0.79,0.76,0.93,0.86,0.91,0.83,0.89,0.89,0.82,0.72,0.76,0.76,0.89,0.82,0.89,0.82,0.89,0.91,0.83,0.96,1.14,0.97,1.40,1.44,1.19,1.22,0.99,0.98,1.49,1.44,1.49,1.22,0.99,1.23,0.98,1.19,0.97,1.21,1.30,1.00,1.37,0.94,1.07,1.14,0.98,0.96,0.86,0.91,0.83,0.88,0.82,0.89,1.11,0.94,1.07,0.73,0.76,0.79,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.46,1.65,1.60,1.82,1.80,1.71,1.93,1.91,1.99,1.94,1.98,1.74,1.76,1.89,1.89,1.42,1.34,1.61,1.11,1.22,1.36,1.50,1.61,1.81,1.75,1.15,1.17,1.41,1.18,1.19,1.42,1.44,1.65,1.83,1.67,1.94,1.81,1.88,1.32,1.58,1.45,1.57,1.74,1.53,1.70,1.98,1.69,1.87,1.77,1.79,1.92,1.45,1.27,1.55,0.97,1.07,1.11,1.34,1.37,1.59,1.60,1.35,1.07,1.18,0.86,0.93,0.87,0.96,0.90,0.93,0.99,1.03,0.95,1.15,0.90,0.99,1.27,0.98,0.90,0.92,0.78,0.83,0.77,0.84,0.79,0.82,0.86,0.73,0.71,0.73,0.72,0.70,0.73,0.72,0.76,0.81,0.76,0.76,0.82,0.77,0.89,0.85,0.82,0.75,0.80,0.80,0.94,0.88,0.94,0.87,0.95,0.96,0.88,0.72,0.74,0.76,0.83,0.78,0.84,0.79,0.87,0.91,0.83,0.89,0.98,0.92,1.23,1.34,1.05,1.16,0.99,0.96,1.46,1.57,1.54,1.33,1.05,1.26,1.08,1.37,1.10,0.98,1.03,0.92,1.14,0.86,0.95,0.97,0.90,0.89,0.79,0.84,0.77,0.82,0.76,0.82,0.97,0.89,0.98,0.71,0.72,0.74,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.34,1.51,1.53,1.67,1.72,1.71,1.80,1.77,1.91,1.86,1.98,1.86,1.82,1.95,1.89,1.24,1.10,1.41,0.95,0.99,1.09,1.25,1.37,1.63,1.55,0.96,0.98,1.16,1.05,1.00,1.27,1.23,1.50,1.69,1.46,1.86,1.72,1.87,1.24,1.49,1.44,1.69,1.80,1.59,1.69,1.97,1.82,1.94,1.91,1.92,1.99,1.63,1.50,1.74,1.16,1.33,1.38,1.58,1.60,1.77,1.80,1.48,1.21,1.37,0.90,0.97,0.93,1.05,0.97,1.04,1.21,0.99,0.95,1.14,0.92,1.02,1.34,0.94,0.86,0.90,0.74,0.79,0.75,0.81,0.79,0.84,0.86,0.71,0.71,0.73,0.76,0.73,0.77,0.74,0.80,0.85,0.78,0.81,0.89,0.84,0.97,0.92,0.88,0.79,0.85,0.86,0.98,0.92,1.00,0.93,1.06,1.12,0.95,0.74,0.74,0.78,0.79,0.76,0.82,0.79,0.87,0.93,0.85,0.85,0.94,0.90,1.09,1.27,0.99,1.17,1.05,0.96,1.46,1.71,1.62,1.48,1.20,1.34,1.28,1.57,1.35,0.90,0.94,0.85,0.98,0.81,0.89,0.89,0.83,0.82,0.75,0.78,0.73,0.77,0.72,0.76,0.89,0.83,0.91,0.71,0.70,0.72,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00},
|
||||
{1.26,1.39,1.48,1.51,1.64,1.71,1.60,1.58,1.77,1.74,1.91,1.94,1.87,1.97,1.85,1.10,0.97,1.22,0.88,0.92,0.95,1.01,1.11,1.39,1.32,0.88,0.90,0.97,0.96,0.93,1.05,0.99,1.27,1.47,1.20,1.70,1.54,1.76,1.08,1.31,1.33,1.70,1.76,1.55,1.57,1.88,1.85,1.91,1.97,1.99,1.99,1.70,1.65,1.85,1.41,1.54,1.61,1.76,1.80,1.91,1.93,1.52,1.26,1.48,0.92,0.99,0.97,1.18,1.09,1.28,1.39,0.94,0.93,1.05,0.92,1.01,1.31,0.88,0.81,0.86,0.72,0.75,0.74,0.79,0.79,0.86,0.85,0.71,0.73,0.75,0.82,0.77,0.83,0.78,0.85,0.88,0.81,0.88,0.97,0.90,1.18,1.00,0.93,0.86,0.92,0.94,1.14,0.99,1.24,1.03,1.33,1.39,1.11,0.79,0.77,0.84,0.79,0.77,0.84,0.83,0.90,0.98,0.91,0.85,0.92,0.91,1.02,1.26,1.00,1.23,1.19,0.99,1.50,1.84,1.71,1.64,1.38,1.46,1.51,1.76,1.59,0.84,0.88,0.80,0.94,0.79,0.86,0.82,0.77,0.76,0.74,0.74,0.71,0.73,0.70,0.72,0.82,0.77,0.85,0.74,0.70,0.73,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00}
|
|
@ -511,7 +511,7 @@ static void SPR_DrawGeneric( int frame, float x, float y, float width, float hei
|
|||
|
||||
rc = *prc;
|
||||
|
||||
// Sigh! some stupid modmakers set wrong rectangels in hud.txt
|
||||
// Sigh! some stupid modmakers set wrong rectangles in hud.txt
|
||||
if( rc.left <= 0 || rc.left > width ) rc.left = 0;
|
||||
if( rc.top <= 0 || rc.top > height ) rc.top = 0;
|
||||
if( rc.right <= 0 || rc.right > width ) rc.right = width;
|
||||
|
@ -2078,7 +2078,6 @@ static int pfnCheckParm( char *parm, char **ppnext )
|
|||
=============
|
||||
pfnGetMousePosition
|
||||
|
||||
FIXME: apply ScreenToClient here ?
|
||||
=============
|
||||
*/
|
||||
static void pfnGetMousePosition( int *mx, int *my )
|
||||
|
@ -2086,6 +2085,8 @@ static void pfnGetMousePosition( int *mx, int *my )
|
|||
POINT curpos;
|
||||
|
||||
GetCursorPos( &curpos );
|
||||
ScreenToClient( host.hWnd, &curpos );
|
||||
|
||||
if( mx ) *mx = curpos.x;
|
||||
if( my ) *my = curpos.y;
|
||||
}
|
||||
|
@ -2564,6 +2565,9 @@ int CL_AddEntity( int entityType, cl_entity_t *pEnt )
|
|||
{
|
||||
if( !pEnt ) return false;
|
||||
|
||||
// clear effects for all temp entities
|
||||
if( !pEnt->index ) pEnt->curstate.effects = 0;
|
||||
|
||||
// let the render reject entity without model
|
||||
return CL_AddVisibleEntity( pEnt, entityType );
|
||||
}
|
||||
|
@ -3116,10 +3120,7 @@ convert world coordinates (x,y,z) into screen (x, y)
|
|||
*/
|
||||
int TriWorldToScreen( float *world, float *screen )
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
if( !world || !screen )
|
||||
return retval;
|
||||
int retval;
|
||||
|
||||
retval = R_WorldToScreen( world, screen );
|
||||
|
||||
|
@ -3171,18 +3172,6 @@ void TriFog( float flFogColor[3], float flStart, float flEnd, int bOn )
|
|||
pglHint( GL_FOG_HINT, GL_NICEST );
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
TriScreenToWorld
|
||||
|
||||
convert screen coordinates (x,y) into world (x, y, z)
|
||||
=============
|
||||
*/
|
||||
void TriScreenToWorld( float *screen, float *world )
|
||||
{
|
||||
R_ScreenToWorld( screen, world );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
DemoApi implementation
|
||||
|
@ -3429,7 +3418,7 @@ static triangleapi_t gTriApi =
|
|||
TriBrightness,
|
||||
TriCullFace,
|
||||
TriSpriteTexture,
|
||||
TriWorldToScreen,
|
||||
R_WorldToScreen, // NOTE: XPROJECT, YPROJECT should be done in client.dll
|
||||
TriFog,
|
||||
R_ScreenToWorld,
|
||||
};
|
||||
|
|
|
@ -237,6 +237,9 @@ usercmd_t CL_CreateCmd( void )
|
|||
|
||||
Q_memset( &cmd, 0, sizeof( cmd ));
|
||||
|
||||
// build list of all solid entities per next frame (exclude clients)
|
||||
CL_SetSolidEntities ();
|
||||
|
||||
VectorCopy( cl.refdef.cl_viewangles, angles );
|
||||
VectorCopy( cl.frame.local.client.origin, cl.data.origin );
|
||||
VectorCopy( cl.refdef.cl_viewangles, cl.data.viewangles );
|
||||
|
@ -1507,6 +1510,10 @@ void CL_InitLocal( void )
|
|||
Cvar_Get( "direct", "1", CVAR_ARCHIVE, "direct lighting level (legacy, unused)" );
|
||||
Cvar_Get( "voice_serverdebug", "0", 0, "debug voice (legacy, unused)" );
|
||||
|
||||
// interpolation cvars
|
||||
Cvar_Get( "ex_interp", "0", 0, "" );
|
||||
Cvar_Get( "ex_maxerrordistance", "0", 0, "" );
|
||||
|
||||
// server commands
|
||||
Cmd_AddCommand ("noclip", NULL, "enable or disable no clipping mode" );
|
||||
Cmd_AddCommand ("notarget", NULL, "notarget mode (monsters do not see you)" );
|
||||
|
|
|
@ -21,14 +21,6 @@ GNU General Public License for more details.
|
|||
#include "input.h"
|
||||
|
||||
static MENUAPI GetMenuAPI;
|
||||
|
||||
static dllfunc_t menu_funcs[] =
|
||||
{
|
||||
{ "GetMenuAPI", (void **) &GetMenuAPI },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
dll_info_t menu_dll = { "menu.dll", menu_funcs, false };
|
||||
static void UI_UpdateUserinfo( void );
|
||||
|
||||
menu_static_t menu;
|
||||
|
@ -936,7 +928,7 @@ void UI_UnloadProgs( void )
|
|||
// deinitialize game
|
||||
menu.dllFuncs.pfnShutdown();
|
||||
|
||||
Sys_FreeLibrary( &menu_dll );
|
||||
Com_FreeLibrary( menu.hInstance );
|
||||
Mem_FreePool( &menu.mempool );
|
||||
Q_memset( &menu, 0, sizeof( menu ));
|
||||
}
|
||||
|
@ -952,17 +944,37 @@ qboolean UI_LoadProgs( void )
|
|||
// setup globals
|
||||
menu.globals = &gpGlobals;
|
||||
|
||||
if( !Sys_LoadLibrary( &menu_dll )) return false;
|
||||
menu.mempool = Mem_AllocPool( "Menu Pool" );
|
||||
menu.hInstance = menu_dll.link;
|
||||
if(!( menu.hInstance = Com_LoadLibrary( va( "%s/menu.dll", GI->dll_path ), false )))
|
||||
{
|
||||
FS_AllowDirectPaths( true );
|
||||
|
||||
if(!( menu.hInstance = Com_LoadLibrary( "../menu.dll", false )))
|
||||
{
|
||||
FS_AllowDirectPaths( false );
|
||||
return false;
|
||||
}
|
||||
|
||||
FS_AllowDirectPaths( false );
|
||||
}
|
||||
|
||||
if(!( GetMenuAPI = (MENUAPI)Com_GetProcAddress( menu.hInstance, "GetMenuAPI" )))
|
||||
{
|
||||
Com_FreeLibrary( menu.hInstance );
|
||||
MsgDev( D_NOTE, "UI_LoadProgs: can't init menu API\n" );
|
||||
menu.hInstance = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
// make local copy of engfuncs to prevent overwrite it with user dll
|
||||
Q_memcpy( &gpEngfuncs, &gEngfuncs, sizeof( gpEngfuncs ));
|
||||
|
||||
menu.mempool = Mem_AllocPool( "Menu Pool" );
|
||||
|
||||
if( !GetMenuAPI( &menu.dllFuncs, &gpEngfuncs, menu.globals ))
|
||||
{
|
||||
Com_FreeLibrary( menu.hInstance );
|
||||
MsgDev( D_NOTE, "UI_LoadProgs: can't init menu API\n" );
|
||||
Mem_FreePool( &menu.mempool );
|
||||
menu.hInstance = NULL;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ void CL_ParseEvent( sizebuf_t *msg )
|
|||
|
||||
void CL_ParseCustomization( sizebuf_t *msg )
|
||||
{
|
||||
// FIXME: ???
|
||||
// TODO: ???
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -569,7 +569,7 @@ static void PM_CheckMovingGround( clientdata_t *cd, entity_state_t *state, float
|
|||
void CL_SetSolidEntities( void )
|
||||
{
|
||||
// world not initialized
|
||||
if( cls.state != ca_active || !cl.frame.valid )
|
||||
if( !clgame.entities )
|
||||
return;
|
||||
|
||||
// setup physents
|
||||
|
@ -582,7 +582,10 @@ void CL_SetSolidEntities( void )
|
|||
clgame.pmove->numphysent = 1; // always have world
|
||||
clgame.pmove->numvisent = 1;
|
||||
|
||||
CL_AddLinksToPmove();
|
||||
if( cls.state == ca_active && cl.frame.valid )
|
||||
{
|
||||
CL_AddLinksToPmove();
|
||||
}
|
||||
}
|
||||
|
||||
void CL_SetupPMove( playermove_t *pmove, clientdata_t *cd, entity_state_t *state, usercmd_t *ucmd )
|
||||
|
@ -677,9 +680,6 @@ void CL_PredictMovement( void )
|
|||
cl_entity_t *player, *viewent;
|
||||
clientdata_t *cd;
|
||||
|
||||
// build list of all solid entities per next frame (exclude clients)
|
||||
CL_SetSolidEntities ();
|
||||
|
||||
if( cls.state != ca_active ) return;
|
||||
if( cl.refdef.paused || cls.key_dest == key_menu ) return;
|
||||
|
||||
|
|
|
@ -151,7 +151,8 @@ void CL_DuplicateTexture( mstudiotexture_t *ptexture, int topcolor, int bottomco
|
|||
texture_t *tx = NULL;
|
||||
char texname[128];
|
||||
int i, size, index;
|
||||
byte *raw;
|
||||
byte paletteBackup[768];
|
||||
byte *raw, *pal;
|
||||
|
||||
// save of the real texture index
|
||||
index = ptexture->index;
|
||||
|
@ -168,9 +169,16 @@ void CL_DuplicateTexture( mstudiotexture_t *ptexture, int topcolor, int bottomco
|
|||
|
||||
ASSERT( tx != NULL );
|
||||
|
||||
// backup original palette
|
||||
pal = (byte *)(tx + 1) + (tx->width * tx->height);
|
||||
Q_memcpy( paletteBackup, pal, 768 );
|
||||
|
||||
raw = CL_CreateRawTextureFromPixels( tx, &size, topcolor, bottomcolor );
|
||||
ptexture->index = GL_LoadTexture( texname, raw, size, TF_FORCE_COLOR ); // do copy
|
||||
GL_SetTextureType( ptexture->index, TEX_REMAP );
|
||||
|
||||
// restore original palette
|
||||
Q_memcpy( pal, paletteBackup, 768 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -274,7 +282,7 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||
if( !phdr ) return; // missed header ???
|
||||
|
||||
// NOTE: we must copy all the structures 'mstudiotexture_t' for easy acces when model is rendering
|
||||
if( !clgame.remap_info[i] || clgame.remap_info[i]->model != RI.currentmodel )
|
||||
if( !clgame.remap_info[i] || clgame.remap_info[i]->modelindex != RI.currententity->curstate.modelindex || clgame.remap_info[i]->model != RI.currentmodel )
|
||||
{
|
||||
// this code catches studiomodel change with another studiomodel with remap textures
|
||||
// e.g. playermodel 'barney' with playermodel 'gordon'
|
||||
|
@ -290,6 +298,7 @@ void CL_AllocRemapInfo( int topcolor, int bottomcolor )
|
|||
}
|
||||
|
||||
info->numtextures = phdr->numtextures;
|
||||
info->modelindex = RI.currententity->curstate.modelindex;
|
||||
info->model = RI.currentmodel;
|
||||
info->topcolor = topcolor;
|
||||
info->bottomcolor = bottomcolor;
|
||||
|
|
|
@ -90,12 +90,19 @@ sets cl.refdef view values
|
|||
*/
|
||||
void V_CalcRefDef( void )
|
||||
{
|
||||
int passcount = 0;
|
||||
|
||||
// g-cont. keep actual frame for all viewpasses
|
||||
tr.framecount++;
|
||||
|
||||
do
|
||||
{
|
||||
clgame.dllFuncs.pfnCalcRefdef( &cl.refdef );
|
||||
R_RenderFrame( &cl.refdef, true );
|
||||
cl.refdef.onlyClientDraw = false;
|
||||
} while( cl.refdef.nextView );
|
||||
|
||||
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -281,6 +281,7 @@ typedef struct
|
|||
short topcolor; // cached value
|
||||
short bottomcolor; // cached value
|
||||
model_t *model; // for catch model changes
|
||||
int modelindex;
|
||||
} remap_info_t;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1050,7 +1050,7 @@ void R_DecalRemoveAll( int textureIndex )
|
|||
decal_t *pdecal;
|
||||
int i;
|
||||
|
||||
if( textureIndex <= 0 || textureIndex >= MAX_TEXTURES )
|
||||
if( textureIndex < 0 || textureIndex >= MAX_TEXTURES )
|
||||
{
|
||||
MsgDev( D_ERROR, "Decal has invalid texture!\n" );
|
||||
return;
|
||||
|
@ -1060,7 +1060,7 @@ void R_DecalRemoveAll( int textureIndex )
|
|||
{
|
||||
pdecal = &gDecalPool[i];
|
||||
|
||||
if( pdecal->texture == textureIndex )
|
||||
if( !textureIndex || pdecal->texture == textureIndex )
|
||||
R_DecalUnlink( pdecal );
|
||||
}
|
||||
}
|
|
@ -33,6 +33,9 @@ extern byte *r_temppool;
|
|||
#define MAX_LIGHTMAPS 128
|
||||
#define SUBDIVIDE_SIZE 64
|
||||
|
||||
#define NUMVERTEXNORMALS 162
|
||||
#define SHADEDOT_QUANT 16 // precalculated dot products for quantized angles
|
||||
|
||||
//#define MIRROR_TEST
|
||||
|
||||
// refparams
|
||||
|
@ -320,6 +323,7 @@ void R_AnimateLight( void );
|
|||
void R_MarkLights( dlight_t *light, int bit, mnode_t *node );
|
||||
void R_LightDir( const vec3_t origin, vec3_t lightDir, float radius );
|
||||
void R_LightForPoint( const vec3_t point, color24 *ambientLight, qboolean invLight, qboolean useAmbient, float radius );
|
||||
void R_GetLightSpot( vec3_t lightspot );
|
||||
|
||||
//
|
||||
// gl_rmain.c
|
||||
|
|
|
@ -156,8 +156,7 @@ void R_PushDlights( void )
|
|||
dlight_t *l;
|
||||
int i;
|
||||
|
||||
tr.dlightframecount = tr.framecount + 1; // because the count hasn't
|
||||
// advanced yet for this frame
|
||||
tr.dlightframecount = tr.framecount;
|
||||
l = cl_dlights;
|
||||
|
||||
RI.currententity = clgame.entities;
|
||||
|
@ -183,7 +182,7 @@ void R_PushDlights( void )
|
|||
=======================================================================
|
||||
*/
|
||||
static uint r_pointColor[3];
|
||||
static vec3_t r_lightColors[MAXSTUDIOVERTS];
|
||||
static vec3_t r_lightSpot;
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -222,6 +221,8 @@ static qboolean R_RecursiveLightPoint( model_t *model, mnode_t *node, const vec3
|
|||
if(( back < 0 ) == side )
|
||||
return false;// didn't hit anything
|
||||
|
||||
VectorCopy( mid, r_lightSpot );
|
||||
|
||||
// check for impact on this node
|
||||
surf = model->surfaces + node->firstsurface;
|
||||
|
||||
|
@ -419,6 +420,18 @@ void R_LightForPoint( const vec3_t point, color24 *ambientLight, qboolean invLig
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
R_GetLightSpot
|
||||
|
||||
NOTE: must call R_LightForPoint first
|
||||
=================
|
||||
*/
|
||||
void R_GetLightSpot( vec3_t lightspot )
|
||||
{
|
||||
if( lightspot ) VectorCopy( r_lightSpot, lightspot );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
R_LightDir
|
||||
|
@ -431,18 +444,6 @@ void R_LightDir( const vec3_t origin, vec3_t lightDir, float radius )
|
|||
float dist;
|
||||
int lnum;
|
||||
|
||||
if( RI.refdef.movevars )
|
||||
{
|
||||
// pre-defined light vector
|
||||
lightDir[0] = RI.refdef.movevars->skyvec_x;
|
||||
lightDir[1] = RI.refdef.movevars->skyvec_y;
|
||||
lightDir[2] = RI.refdef.movevars->skyvec_z;
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorSet( lightDir, 0.0f, 0.0f, -1.0f );
|
||||
}
|
||||
|
||||
// add dynamic lights
|
||||
if( radius > 0.0f && r_dynamic->integer )
|
||||
{
|
||||
|
@ -472,7 +473,4 @@ void R_LightDir( const vec3_t origin, vec3_t lightDir, float radius )
|
|||
VectorAdd( lightDir, dir, lightDir );
|
||||
}
|
||||
}
|
||||
|
||||
// normalize final direction
|
||||
VectorNormalize( lightDir );
|
||||
}
|
|
@ -115,6 +115,28 @@ static qboolean R_OpaqueEntity( cl_entity_t *ent )
|
|||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_SolidEntityCompare
|
||||
|
||||
Sorting opaque entities by model type
|
||||
===============
|
||||
*/
|
||||
static int R_SolidEntityCompare( const cl_entity_t **a, const cl_entity_t **b )
|
||||
{
|
||||
cl_entity_t *ent1, *ent2;
|
||||
|
||||
ent1 = (cl_entity_t *)*a;
|
||||
ent2 = (cl_entity_t *)*b;
|
||||
|
||||
if( ent1->model->type > ent2->model->type )
|
||||
return 1;
|
||||
if( ent1->model->type < ent2->model->type )
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_TransEntityCompare
|
||||
|
@ -167,8 +189,11 @@ static int R_TransEntityCompare( const cl_entity_t **a, const cl_entity_t **b )
|
|||
qboolean R_WorldToScreen( const vec3_t point, vec3_t screen )
|
||||
{
|
||||
matrix4x4 worldToScreen;
|
||||
qboolean behind;
|
||||
float w;
|
||||
qboolean behind;
|
||||
float w;
|
||||
|
||||
if( !point || !screen )
|
||||
return false;
|
||||
|
||||
Matrix4x4_Copy( worldToScreen, RI.worldviewProjectionMatrix );
|
||||
screen[0] = worldToScreen[0][0] * point[0] + worldToScreen[0][1] * point[1] + worldToScreen[0][2] * point[2] + worldToScreen[0][3];
|
||||
|
@ -426,9 +451,6 @@ static void R_Clear( int bitMask )
|
|||
|
||||
bits &= bitMask;
|
||||
|
||||
if( bits & GL_STENCIL_BUFFER_BIT )
|
||||
pglClearStencil( 128 );
|
||||
|
||||
pglClear( bits );
|
||||
|
||||
gldepthmin = 0.0f;
|
||||
|
@ -611,8 +633,8 @@ static void R_SetupFrame( void )
|
|||
R_AnimateLight();
|
||||
R_RunViewmodelEvents();
|
||||
|
||||
// g-cont. keep actual frame for all viewpasses
|
||||
if( !RI.refdef.nextView ) tr.framecount++;
|
||||
// sort opaque entities by model type to avoid drawing model shadows under alpha-surfaces
|
||||
qsort( tr.solid_entities, tr.num_solid_entities, sizeof( cl_entity_t* ), R_SolidEntityCompare );
|
||||
|
||||
// sort translucents entities by rendermode and distance
|
||||
qsort( tr.trans_entities, tr.num_trans_entities, sizeof( cl_entity_t* ), R_TransEntityCompare );
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef struct
|
|||
} dmaterial_t;
|
||||
|
||||
// default rules for apply detail textures.
|
||||
// move this to external script ?
|
||||
// maybe move this to external script?
|
||||
static const dmaterial_t detail_table[] =
|
||||
{
|
||||
{ "crt", "dt_conc", 'C', 0, 0 }, // concrete
|
||||
|
@ -54,7 +54,7 @@ static const dmaterial_t detail_table[] =
|
|||
{ "drt", "dt_ground%i", 'D', 1, 5 },
|
||||
{ "out", "dt_ground%i", 'D', 1, 5 },
|
||||
{ "grass", "dt_grass1", 'D', 0, 0 },
|
||||
{ "mud", "dt_carpet1", 'D', 0, 0 }, // FIXME
|
||||
{ "mud", "dt_carpet1", 'D', 0, 0 },
|
||||
{ "vent", "dt_ssteel1", 'V', 1, 4 }, // vent
|
||||
{ "duct", "dt_ssteel1", 'V', 1, 4 },
|
||||
{ "tile", "dt_smooth%i", 'T', 1, 2 },
|
||||
|
@ -134,7 +134,7 @@ static const char *R_DetailTextureForName( const char *name )
|
|||
return NULL;
|
||||
if( !Q_strnicmp( name, "translucent", 11 ))
|
||||
return NULL;
|
||||
if( !Q_strnicmp( name, "3dsky", 5 ))
|
||||
if( !Q_strnicmp( name, "3dsky", 5 )) // xash-mod support :-)
|
||||
return NULL;
|
||||
if( name[0] == '@' )
|
||||
return NULL;
|
||||
|
@ -152,7 +152,8 @@ static const char *R_DetailTextureForName( const char *name )
|
|||
return table->detail;
|
||||
}
|
||||
}
|
||||
return "dt_smooth1"; // default
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void R_CreateDetailTexturesList( const char *filename )
|
||||
|
@ -272,13 +273,7 @@ void R_NewMap( void )
|
|||
|
||||
// clear out efrags in case the level hasn't been reloaded
|
||||
for( i = 0; i < cl.worldmodel->numleafs; i++ )
|
||||
{
|
||||
cl.worldmodel->leafs[i].efrags = NULL;
|
||||
cl.worldmodel->leafs[i].visframe = 0;
|
||||
}
|
||||
|
||||
for( i = 0; i < cl.worldmodel->numnodes; i++ )
|
||||
cl.worldmodel->nodes[i].visframe = 0;
|
||||
|
||||
tr.skytexturenum = -1;
|
||||
r_viewleaf = r_oldviewleaf = NULL;
|
||||
|
|
|
@ -30,8 +30,6 @@ PARTICLES MANAGEMENT
|
|||
|
||||
==============================================================
|
||||
*/
|
||||
|
||||
#define NUMVERTEXNORMALS 162
|
||||
#define SPARK_COLORCOUNT 9
|
||||
#define TRACER_WIDTH 0.5f
|
||||
#define SIMSHIFT 10
|
||||
|
|
|
@ -730,6 +730,9 @@ void R_BlendLightmaps( void )
|
|||
case kRenderGlow:
|
||||
return; // no lightmaps
|
||||
}
|
||||
|
||||
if( RI.currententity->curstate.effects & EF_FULLBRIGHT )
|
||||
return; // disabled by user
|
||||
}
|
||||
|
||||
if( !r_lightmap->integer )
|
||||
|
@ -1575,7 +1578,7 @@ void R_DrawMirrors( void )
|
|||
|
||||
RI = oldRI; // restore ref instance
|
||||
|
||||
// FIXME: draw mirror surface here
|
||||
// TODO: draw mirror surface here
|
||||
}
|
||||
|
||||
tr.mirror_entities[i].chain = NULL; // done
|
||||
|
@ -1751,12 +1754,14 @@ R_DrawWorld
|
|||
*/
|
||||
void R_DrawWorld( void )
|
||||
{
|
||||
if( !RI.drawWorld || RI.refdef.onlyClientDraw )
|
||||
return;
|
||||
|
||||
// paranoia issues: when gl_renderer is "0" we need have something valid for currententity
|
||||
// to prevent crashing until HeadShield drawing.
|
||||
RI.currententity = clgame.entities;
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
|
||||
if( !RI.drawWorld || RI.refdef.onlyClientDraw )
|
||||
return;
|
||||
|
||||
VectorCopy( RI.cullorigin, modelorg );
|
||||
Q_memset( gl_lms.lightmap_surfaces, 0, sizeof( gl_lms.lightmap_surfaces ));
|
||||
Q_memset( fullbright_polys, 0, sizeof( fullbright_polys ));
|
||||
|
|
|
@ -825,6 +825,9 @@ static _inline qboolean R_SpriteHasLightmap( cl_entity_t *e, int texFormat )
|
|||
if( texFormat != SPR_ALPHTEST )
|
||||
return false;
|
||||
|
||||
if( e->curstate.effects & EF_FULLBRIGHT )
|
||||
return false;
|
||||
|
||||
if( e->curstate.renderamt != 255 )
|
||||
return false;
|
||||
|
||||
|
|
|
@ -22,12 +22,14 @@ GNU General Public License for more details.
|
|||
#include "pm_local.h"
|
||||
#include "gl_local.h"
|
||||
#include "cl_tent.h"
|
||||
#include "cl_tent.h"
|
||||
|
||||
// NOTE: enable this if you want merge both 'model' and 'modelT' files into one model slot.
|
||||
// otherwise it's uses two slots in models[] array for models with external textures
|
||||
#define STUDIO_MERGE_TEXTURES
|
||||
|
||||
#define EVENT_CLIENT 5000 // less than this value it's a server-side studio events
|
||||
#define MAXARRAYVERTS 6144 // used for draw shadows
|
||||
|
||||
static vec3_t hullcolor[8] =
|
||||
{
|
||||
|
@ -45,6 +47,7 @@ typedef struct studiolight_s
|
|||
{
|
||||
vec3_t lightvec; // light vector
|
||||
vec3_t lightcolor; // ambient light color
|
||||
vec3_t lightspot; // potential coords where placed lightsource
|
||||
|
||||
vec3_t blightvec[MAXSTUDIOBONES]; // ambient lightvectors per bone
|
||||
vec3_t dlightvec[MAX_DLIGHTS][MAXSTUDIOBONES];
|
||||
|
@ -61,8 +64,8 @@ convar_t *r_studio_lighting;
|
|||
convar_t *r_drawviewmodel;
|
||||
convar_t *r_customdraw_playermodel;
|
||||
convar_t *cl_himodels;
|
||||
cvar_t r_shadows = { "r_shadows", "0", 0, 1 }; // dead cvar. especially disabled
|
||||
cvar_t r_shadowalpha = { "r_shadowalpha", "0.5", 0, 0 };
|
||||
cvar_t r_shadows = { "r_shadows", "0", 0, 0 }; // dead cvar. especially disabled
|
||||
cvar_t r_shadowalpha = { "r_shadowalpha", "0.5", 0, 0.8f };
|
||||
static r_studio_interface_t *pStudioDraw;
|
||||
static float aliasXscale, aliasYscale; // software renderer scale
|
||||
static matrix3x4 g_aliastransform; // software renderer transform
|
||||
|
@ -77,9 +80,8 @@ static vec3_t g_chromeup[MAXSTUDIOBONES]; // chrome vector "up" in bone referen
|
|||
static int g_chromeage[MAXSTUDIOBONES]; // last time chrome vectors were updated
|
||||
static vec3_t g_xformverts[MAXSTUDIOVERTS];
|
||||
static vec3_t g_xformnorms[MAXSTUDIOVERTS];
|
||||
static vec3_t g_xarrayverts[MAXSTUDIOVERTS];
|
||||
static vec3_t g_xarraynorms[MAXSTUDIOVERTS];
|
||||
static uint g_xarrayelems[MAXSTUDIOVERTS*6];
|
||||
static vec3_t g_xarrayverts[MAXARRAYVERTS];
|
||||
static uint g_xarrayelems[MAXARRAYVERTS*6];
|
||||
static uint g_nNumArrayVerts;
|
||||
static uint g_nNumArrayElems;
|
||||
static vec3_t g_lightvalues[MAXSTUDIOVERTS];
|
||||
|
@ -100,8 +102,10 @@ player_info_t *m_pPlayerInfo;
|
|||
studiohdr_t *m_pStudioHeader;
|
||||
studiohdr_t *m_pTextureHeader;
|
||||
float m_flGaitMovement;
|
||||
pmtrace_t g_shadowTrace;
|
||||
vec3_t g_mvShadowVec;
|
||||
int g_nTopColor, g_nBottomColor; // remap colors
|
||||
int g_nFaceFlags;
|
||||
int g_nFaceFlags, g_nForceFaceFlags;
|
||||
|
||||
/*
|
||||
====================
|
||||
|
@ -1250,7 +1254,7 @@ void R_StudioSetupChrome( float *pchrome, int bone, vec3_t normal )
|
|||
VectorNormalize( tmp );
|
||||
VectorNegate( RI.vright, v_left );
|
||||
|
||||
if( g_nFaceFlags & STUDIO_NF_CHROME )
|
||||
if( g_nForceFaceFlags & STUDIO_NF_CHROME )
|
||||
{
|
||||
float angle = anglemod( RI.refdef.time * 40 );
|
||||
RotatePointAroundVector( chromeupvec, tmp, v_left, angle - 180 );
|
||||
|
@ -1355,6 +1359,36 @@ static int R_StudioCheckBBox( void )
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_StudioGetShadowImpactAndDir
|
||||
===============
|
||||
*/
|
||||
void R_StudioGetShadowImpactAndDir( void )
|
||||
{
|
||||
float angle;
|
||||
vec3_t skyAngles, origin, end;
|
||||
|
||||
if( !RI.refdef.movevars ) return; // e.g. in menu
|
||||
|
||||
// convert skyvec into angles then back into vector to avoid 0 0 0 direction
|
||||
VectorAngles( (float *)&RI.refdef.movevars->skyvec_x, skyAngles );
|
||||
angle = skyAngles[YAW] / 180 * M_PI;
|
||||
|
||||
Matrix3x4_OriginFromMatrix( g_bonestransform[0], origin );
|
||||
SinCos( angle, &g_mvShadowVec[1], &g_mvShadowVec[0] );
|
||||
|
||||
// g-cont. looks ugly. disabled
|
||||
// R_LightDir( origin, g_mvShadowVec, 256.0f );
|
||||
|
||||
VectorSet( g_mvShadowVec, -g_mvShadowVec[0], -g_mvShadowVec[1], -1.0f );
|
||||
VectorNormalizeFast( g_mvShadowVec );
|
||||
|
||||
VectorMA( origin, 256.0f, g_mvShadowVec, end );
|
||||
|
||||
g_shadowTrace = PM_PlayerTrace( clgame.pmove, origin, end, PM_STUDIO_IGNORE, 2, -1, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_StudioDynamicLight
|
||||
|
@ -1381,20 +1415,30 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *lightinfo )
|
|||
else Matrix3x4_OriginFromMatrix( g_rotationmatrix, origin );
|
||||
|
||||
// setup light dir
|
||||
R_LightDir( origin, plight->lightvec, ent->model->radius );
|
||||
if( RI.refdef.movevars )
|
||||
{
|
||||
// pre-defined light vector
|
||||
plight->lightvec[0] = RI.refdef.movevars->skyvec_x;
|
||||
plight->lightvec[1] = RI.refdef.movevars->skyvec_y;
|
||||
plight->lightvec[2] = RI.refdef.movevars->skyvec_z;
|
||||
}
|
||||
else VectorSet( plight->lightvec, 0.0f, 0.0f, -1.0f );
|
||||
|
||||
VectorCopy( plight->lightvec, lightinfo->plightvec );
|
||||
|
||||
// setup ambient lighting
|
||||
invLight = (ent->curstate.effects & EF_INVLIGHT) ? true : false;
|
||||
R_LightForPoint( origin, &ambient, invLight, true, 0.0f ); // ignore dlights
|
||||
|
||||
R_GetLightSpot( plight->lightspot ); // shadow stuff
|
||||
|
||||
plight->lightcolor[0] = ambient.r * (1.0f / 255.0f);
|
||||
plight->lightcolor[1] = ambient.g * (1.0f / 255.0f);
|
||||
plight->lightcolor[2] = ambient.b * (1.0f / 255.0f);
|
||||
|
||||
VectorCopy( plight->lightcolor, lightinfo->color );
|
||||
lightinfo->shadelight = (ambient.r + ambient.g + ambient.b) / 3;
|
||||
lightinfo->ambientlight = lightinfo->shadelight * 0.1f;
|
||||
lightinfo->ambientlight = lightinfo->shadelight;
|
||||
|
||||
if( !ent || !ent->model || !r_dynamic->integer )
|
||||
return;
|
||||
|
@ -1429,6 +1473,8 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *lightinfo )
|
|||
{
|
||||
dist = 1.0f / dist;
|
||||
VectorScale( vec, dist, vec );
|
||||
lightinfo->ambientlight += atten;
|
||||
lightinfo->shadelight += atten;
|
||||
}
|
||||
|
||||
Matrix3x4_VectorIRotate( g_lighttransform[i], vec, plight->dlightvec[plight->numdlights][i] );
|
||||
|
@ -1440,6 +1486,13 @@ void R_StudioDynamicLight( cl_entity_t *ent, alight_t *lightinfo )
|
|||
plight->dlightcolor[plight->numdlights][2] = dl->color.b * (1.0f / 255.0f);
|
||||
plight->numdlights++;
|
||||
}
|
||||
|
||||
// clamp lighting so it doesn't overbright as much
|
||||
if( lightinfo->ambientlight > 128 )
|
||||
lightinfo->ambientlight = 128;
|
||||
|
||||
if( lightinfo->ambientlight + lightinfo->shadelight > 192 )
|
||||
lightinfo->shadelight = 192 - lightinfo->ambientlight;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1499,6 +1552,8 @@ void R_StudioEntityLight( alight_t *lightinfo )
|
|||
{
|
||||
dist = 1.0f / dist;
|
||||
VectorScale( vec, dist, vec );
|
||||
lightinfo->ambientlight += atten;
|
||||
lightinfo->shadelight += atten;
|
||||
}
|
||||
|
||||
Matrix3x4_VectorIRotate( g_lighttransform[i], vec, plight->elightvec[plight->numelights][i] );
|
||||
|
@ -1510,6 +1565,13 @@ void R_StudioEntityLight( alight_t *lightinfo )
|
|||
plight->elightcolor[plight->numelights][2] = el->color.b * (1.0f / 255.0f);
|
||||
plight->numelights++;
|
||||
}
|
||||
|
||||
// clamp lighting so it doesn't overbright as much
|
||||
if( lightinfo->ambientlight > 128 )
|
||||
lightinfo->ambientlight = 128;
|
||||
|
||||
if( lightinfo->ambientlight + lightinfo->shadelight > 192 )
|
||||
lightinfo->shadelight = 192 - lightinfo->ambientlight;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1527,6 +1589,8 @@ void R_StudioSetupLighting( alight_t *lightinfo )
|
|||
|
||||
for( i = 0; i < m_pStudioHeader->numbones; i++ )
|
||||
Matrix3x4_VectorIRotate( g_lighttransform[i], lightinfo->plightvec, plight->blightvec[i] );
|
||||
|
||||
R_StudioGetShadowImpactAndDir();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1666,7 +1730,7 @@ R_StudioDrawPoints
|
|||
*/
|
||||
static void R_StudioDrawPoints( void )
|
||||
{
|
||||
int i, j, flags, m_skinnum;
|
||||
int i, j, m_skinnum;
|
||||
byte *pvertbone;
|
||||
byte *pnormbone;
|
||||
vec3_t *pstudioverts;
|
||||
|
@ -1711,13 +1775,13 @@ static void R_StudioDrawPoints( void )
|
|||
lv = (float *)g_lightvalues;
|
||||
for( j = 0; j < m_pSubModel->nummesh; j++ )
|
||||
{
|
||||
flags = ptexture[pskinref[pmesh[j].skinref]].flags;
|
||||
g_nFaceFlags = ptexture[pskinref[pmesh[j].skinref]].flags;
|
||||
|
||||
for( i = 0; i < pmesh[j].numnorms; i++, lv += 3, pstudionorms++, pnormbone++ )
|
||||
{
|
||||
R_StudioLighting( lv, *pnormbone, flags, (float *)pstudionorms );
|
||||
R_StudioLighting( lv, *pnormbone, g_nFaceFlags, (float *)pstudionorms );
|
||||
|
||||
if(( flags & STUDIO_NF_CHROME ) || ( g_nFaceFlags & STUDIO_NF_CHROME ))
|
||||
if(( g_nFaceFlags & STUDIO_NF_CHROME ) || ( g_nForceFaceFlags & STUDIO_NF_CHROME ))
|
||||
R_StudioSetupChrome( g_chrome[(float (*)[3])lv - g_lightvalues], *pnormbone, (float *)pstudionorms );
|
||||
}
|
||||
}
|
||||
|
@ -1730,7 +1794,7 @@ static void R_StudioDrawPoints( void )
|
|||
pmesh = (mstudiomesh_t *)((byte *)m_pStudioHeader + m_pSubModel->meshindex) + j;
|
||||
ptricmds = (short *)((byte *)m_pStudioHeader + pmesh->triindex);
|
||||
|
||||
flags = ptexture[pskinref[pmesh->skinref]].flags;
|
||||
g_nFaceFlags = ptexture[pskinref[pmesh->skinref]].flags;
|
||||
s = 1.0f / (float)ptexture[pskinref[pmesh->skinref]].width;
|
||||
t = 1.0f / (float)ptexture[pskinref[pmesh->skinref]].height;
|
||||
|
||||
|
@ -1738,17 +1802,17 @@ static void R_StudioDrawPoints( void )
|
|||
if( ptexture[pskinref[pmesh->skinref]].index < 0 || ptexture[pskinref[pmesh->skinref]].index > MAX_TEXTURES )
|
||||
ptexture[pskinref[pmesh->skinref]].index = tr.defaultTexture;
|
||||
|
||||
if( flags & STUDIO_NF_TRANSPARENT )
|
||||
if( g_nFaceFlags & STUDIO_NF_TRANSPARENT )
|
||||
{
|
||||
GL_SetRenderMode( kRenderTransAlpha );
|
||||
alpha = 1.0f;
|
||||
}
|
||||
else if(( flags & STUDIO_NF_ADDITIVE ) || ( g_nFaceFlags & STUDIO_NF_CHROME ))
|
||||
else if(( g_nFaceFlags & STUDIO_NF_ADDITIVE ) || ( g_nForceFaceFlags & STUDIO_NF_CHROME ))
|
||||
{
|
||||
GL_SetRenderMode( kRenderTransAdd );
|
||||
alpha = RI.currententity->curstate.renderamt * (1.0f / 255.0f);
|
||||
|
||||
if( g_nFaceFlags & STUDIO_NF_CHROME )
|
||||
if( g_nForceFaceFlags & STUDIO_NF_CHROME )
|
||||
{
|
||||
color24 *clr;
|
||||
float scale;
|
||||
|
@ -1761,17 +1825,16 @@ static void R_StudioDrawPoints( void )
|
|||
else
|
||||
{
|
||||
GL_SetRenderMode( g_iRenderMode );
|
||||
alpha = RI.currententity->curstate.renderamt * (1.0f / 255.0f);
|
||||
|
||||
if( g_iRenderMode == kRenderNormal )
|
||||
{
|
||||
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
|
||||
alpha = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
else alpha = RI.currententity->curstate.renderamt * (1.0f / 255.0f);
|
||||
}
|
||||
|
||||
if(!( g_nFaceFlags & STUDIO_NF_CHROME ))
|
||||
if(!( g_nForceFaceFlags & STUDIO_NF_CHROME ))
|
||||
{
|
||||
GL_Bind( GL_TEXTURE0, ptexture[pskinref[pmesh->skinref]].index );
|
||||
}
|
||||
|
@ -1828,11 +1891,11 @@ static void R_StudioDrawPoints( void )
|
|||
g_xarrayelems[g_nNumArrayElems++] = g_nNumArrayVerts;
|
||||
}
|
||||
|
||||
if( flags & STUDIO_NF_CHROME || ( g_nFaceFlags & STUDIO_NF_CHROME ))
|
||||
if( g_nFaceFlags & STUDIO_NF_CHROME || ( g_nForceFaceFlags & STUDIO_NF_CHROME ))
|
||||
pglTexCoord2f( g_chrome[ptricmds[1]][0] * s, g_chrome[ptricmds[1]][1] * t );
|
||||
else pglTexCoord2f( ptricmds[2] * s, ptricmds[3] * t );
|
||||
|
||||
if(!( g_nFaceFlags & STUDIO_NF_CHROME ))
|
||||
if(!( g_nForceFaceFlags & STUDIO_NF_CHROME ))
|
||||
{
|
||||
if( g_iRenderMode == kRenderTransAdd )
|
||||
{
|
||||
|
@ -1853,6 +1916,8 @@ static void R_StudioDrawPoints( void )
|
|||
|
||||
av = g_xformverts[ptricmds[0]];
|
||||
pglVertex3f( av[0], av[1], av[2] );
|
||||
|
||||
ASSERT( g_nNumArrayVerts < MAXARRAYVERTS );
|
||||
VectorCopy( av, g_xarrayverts[g_nNumArrayVerts] ); // store off vertex
|
||||
g_nNumArrayVerts++;
|
||||
}
|
||||
|
@ -2247,7 +2312,7 @@ R_StudioGetForceFaceFlags
|
|||
*/
|
||||
int R_StudioGetForceFaceFlags( void )
|
||||
{
|
||||
return g_nFaceFlags;
|
||||
return g_nForceFaceFlags;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2258,7 +2323,7 @@ R_StudioSetForceFaceFlags
|
|||
*/
|
||||
void R_StudioSetForceFaceFlags( int flags )
|
||||
{
|
||||
g_nFaceFlags = flags;
|
||||
g_nForceFaceFlags = flags;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2340,27 +2405,6 @@ static int pfnIsHardware( void )
|
|||
return 1; // 0 is Software, 1 is OpenGL, 2 is Direct3D
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_StudioGetShadowImpactAndDir
|
||||
===============
|
||||
*/
|
||||
void R_StudioGetShadowImpactAndDir( pmtrace_t *ptr, vec3_t lightdir )
|
||||
{
|
||||
vec3_t start, end;
|
||||
studiolight_t *plight;
|
||||
|
||||
plight = &g_studiolight;
|
||||
|
||||
VectorSet( lightdir, -0.5, -0.2, -1.0f );
|
||||
VectorNormalizeFast( lightdir );
|
||||
VectorCopy( RI.currententity->origin, start );
|
||||
start[2] += 78;
|
||||
VectorMA( start, 1024.0f, lightdir, end );
|
||||
|
||||
*ptr = PM_PlayerTrace( clgame.pmove, start, end, PM_STUDIO_IGNORE, 2, -1, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
R_StudioDeformShadow
|
||||
|
@ -2370,50 +2414,42 @@ Deform vertices by specified lightdir
|
|||
*/
|
||||
void R_StudioDeformShadow( void )
|
||||
{
|
||||
float *verts, planedist, dist;
|
||||
vec3_t planenormal, lightdir, lightdir2, point;
|
||||
float *verts, dist, dist2;
|
||||
int numVerts;
|
||||
pmtrace_t tr;
|
||||
|
||||
R_StudioGetShadowImpactAndDir( &tr, lightdir );
|
||||
|
||||
Matrix3x4_VectorIRotate( g_rotationmatrix, lightdir, lightdir2 );
|
||||
Matrix3x4_VectorIRotate( g_rotationmatrix, tr.plane.normal, planenormal );
|
||||
// VectorScale( planenormal, RI.currententity->curstate.scale, planenormal );
|
||||
|
||||
VectorSubtract( tr.endpos, RI.currententity->origin, point );
|
||||
planedist = DotProduct( point, tr.plane.normal ) + 1;
|
||||
dist = -1.0f / DotProduct( lightdir2, planenormal );
|
||||
VectorScale( lightdir2, dist, lightdir2 );
|
||||
dist = g_shadowTrace.plane.dist + 1.0f;
|
||||
dist2 = -1.0f / DotProduct( g_mvShadowVec, g_shadowTrace.plane.normal );
|
||||
VectorScale( g_mvShadowVec, dist2, g_mvShadowVec );
|
||||
|
||||
verts = g_xarrayverts[0];
|
||||
numVerts = g_nNumArrayVerts;
|
||||
|
||||
for( ; numVerts > 0; numVerts--, verts += 3 )
|
||||
for( numVerts = 0; numVerts < g_nNumArrayVerts; numVerts++, verts += 3 )
|
||||
{
|
||||
dist = DotProduct( verts, tr.plane.normal ) - planedist;
|
||||
if( dist > 0 ) VectorMA( verts, dist, lightdir, verts );
|
||||
dist2 = DotProduct( verts, g_shadowTrace.plane.normal ) - dist;
|
||||
if( dist2 > 0 ) VectorMA( verts, dist2, g_mvShadowVec, verts );
|
||||
}
|
||||
}
|
||||
|
||||
static void R_StudioDrawPlanarShadow( void )
|
||||
{
|
||||
if( RI.currententity->curstate.effects & EF_NOSHADOW )
|
||||
return;
|
||||
|
||||
R_StudioDeformShadow ();
|
||||
|
||||
// if( glState.stencilEnabled )
|
||||
// pglEnable( GL_STENCIL_TEST );
|
||||
if( glState.stencilEnabled )
|
||||
pglEnable( GL_STENCIL_TEST );
|
||||
|
||||
pglEnableClientState( GL_VERTEX_ARRAY );
|
||||
pglVertexPointer( 3, GL_FLOAT, 12, g_xarrayverts );
|
||||
|
||||
Msg( "DrawShadow( %i %i )\n", g_nNumArrayVerts, g_nNumArrayElems );
|
||||
|
||||
if( GL_Support( GL_DRAW_RANGEELEMENTS_EXT ))
|
||||
pglDrawRangeElementsEXT( GL_TRIANGLES, 0, g_nNumArrayVerts, g_nNumArrayElems, GL_UNSIGNED_INT, g_xarrayelems );
|
||||
else pglDrawElements( GL_TRIANGLES, g_nNumArrayElems, GL_UNSIGNED_INT, g_xarrayelems );
|
||||
|
||||
// if( glState.stencilEnabled )
|
||||
// pglDisable( GL_STENCIL_TEST );
|
||||
if( glState.stencilEnabled )
|
||||
pglDisable( GL_STENCIL_TEST );
|
||||
|
||||
pglDisableClientState( GL_VERTEX_ARRAY );
|
||||
}
|
||||
|
@ -2422,9 +2458,10 @@ static void R_StudioDrawPlanarShadow( void )
|
|||
===============
|
||||
GL_StudioDrawShadow
|
||||
|
||||
NOTE: this code sucessfully working with ShadowHack only in Release build
|
||||
===============
|
||||
*/
|
||||
void _cdecl GL_StudioDrawShadow( void )
|
||||
static void GL_StudioDrawShadow( void )
|
||||
{
|
||||
int rendermode;
|
||||
float shadow_alpha;
|
||||
|
@ -2436,41 +2473,34 @@ void _cdecl GL_StudioDrawShadow( void )
|
|||
|
||||
if( r_shadows.value != 0.0f )
|
||||
{
|
||||
if( RI.currententity->curstate.movetype != MOVETYPE_FLY )
|
||||
if( RI.currententity->baseline.movetype != MOVETYPE_FLY )
|
||||
{
|
||||
rendermode = RI.currententity->baseline.rendermode;
|
||||
|
||||
if( rendermode == kRenderNormal )
|
||||
if( rendermode == kRenderNormal && RI.currententity != &clgame.viewent )
|
||||
{
|
||||
shadow_alpha = 1.0 - r_shadowalpha.value * 0.5f;
|
||||
shadow_alpha = 1.0f - r_shadowalpha.value * 0.5f;
|
||||
pglDisable( GL_TEXTURE_2D );
|
||||
// pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
pglEnable( GL_BLEND );
|
||||
pglShadeModel( GL_FLAT );
|
||||
shadow_alpha2 = 1.0 - shadow_alpha;
|
||||
|
||||
pglColor4f( 0.0f, 0.0f, 0.0f, shadow_alpha2 );
|
||||
|
||||
// if( flt_100DB994 == 0.0 || flt_107BA8A8 < 0.5 )
|
||||
// depthmode = GL_LESS;
|
||||
// else
|
||||
depthmode = GL_GREATER;
|
||||
// pglDepthFunc( depthmode );
|
||||
depthmode = GL_LESS;
|
||||
pglDepthFunc( depthmode );
|
||||
|
||||
R_StudioDrawPlanarShadow();
|
||||
|
||||
// if( flt_100DB994 == 0.0 || flt_107BA8A8 < 0.5 )
|
||||
depthmode2 = GL_LEQUAL;
|
||||
// else
|
||||
// depthmode2 = GL_GEQUAL;
|
||||
depthmode2 = GL_LEQUAL;
|
||||
pglDepthFunc( depthmode2 );
|
||||
|
||||
// pglDepthFunc( depthmode2 );
|
||||
pglEnable( GL_TEXTURE_2D );
|
||||
pglDisable( GL_BLEND );
|
||||
|
||||
pglColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
// if( flt_100DAF14 != 0.0 )
|
||||
pglShadeModel( GL_SMOOTH );
|
||||
pglShadeModel( GL_SMOOTH );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2986,7 +3016,6 @@ void R_DrawStudioModelInternal( cl_entity_t *e, qboolean follow_entity )
|
|||
if( CL_GetEntityByIndex( tr.child_entities[i]->curstate.aiment ) == e )
|
||||
{
|
||||
// copy the parent origin for right frustum culling
|
||||
// FIXME: we really need to cull follow entities?
|
||||
VectorCopy( e->origin, tr.child_entities[i]->origin );
|
||||
|
||||
RI.currententity = tr.child_entities[i];
|
||||
|
|
|
@ -1327,8 +1327,8 @@ static void GL_SetDefaults( void )
|
|||
{
|
||||
pglDisable( GL_STENCIL_TEST );
|
||||
pglStencilMask( ( GLuint ) ~0 );
|
||||
pglStencilFunc( GL_EQUAL, 128, 0xFF );
|
||||
pglStencilOp( GL_KEEP, GL_KEEP, GL_INCR );
|
||||
pglStencilFunc( GL_EQUAL, 0, ~0 );
|
||||
pglStencilOp( GL_KEEP, GL_INCR, GL_INCR );
|
||||
}
|
||||
|
||||
pglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
|
|
|
@ -59,6 +59,11 @@ void Cbuf_Init( void )
|
|||
cmd_text.cursize = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
Cbuf_GetSpace
|
||||
============
|
||||
*/
|
||||
void *Cbuf_GetSpace( cmdbuf_t *buf, int length )
|
||||
{
|
||||
void *data;
|
||||
|
@ -103,7 +108,6 @@ Cbuf_InsertText
|
|||
|
||||
Adds command text immediately after the current command
|
||||
Adds a \n to the text
|
||||
FIXME: actually change the command buffer to do less copying
|
||||
============
|
||||
*/
|
||||
void Cbuf_InsertText( const char *text )
|
||||
|
@ -205,8 +209,8 @@ Cmd_StuffCmds_f
|
|||
|
||||
Adds command line parameters as script statements
|
||||
Commands lead with a +, and continue until a - or another +
|
||||
xash +prog jctest.qp +cmd amlev1
|
||||
xash -nosound +cmd amlev1
|
||||
xash -dev 3 +map c1a0d
|
||||
xash -nosound -game bshift
|
||||
===============
|
||||
*/
|
||||
void Cmd_StuffCmds_f( void )
|
||||
|
|
|
@ -1146,6 +1146,7 @@ static qboolean FS_ParseLiblistGam( const char *filename, const char *gamedir, g
|
|||
else if( !Q_stricmp( token, "gamedll" ))
|
||||
{
|
||||
pfile = COM_ParseFile( pfile, GameInfo->game_dll );
|
||||
COM_FixSlashes( GameInfo->game_dll );
|
||||
}
|
||||
else if( !Q_stricmp( token, "type" ))
|
||||
{
|
||||
|
|
|
@ -1504,7 +1504,8 @@ void Mod_UnloadBrushModel( model_t *mod )
|
|||
for( i = 0; i < mod->numtextures; i++ )
|
||||
{
|
||||
tx = mod->textures[i];
|
||||
if( !tx ) continue; // free slot
|
||||
if( !tx || tx->gl_texturenum == tr.defaultTexture )
|
||||
continue; // free slot
|
||||
|
||||
GL_FreeTexture( tx->gl_texturenum ); // main texture
|
||||
GL_FreeTexture( tx->fb_texturenum ); // luma texture
|
||||
|
|
|
@ -510,7 +510,6 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pfnIgnore pmFilter )
|
|||
|
||||
for( i = 0; i < pmove->numphysent; i++ )
|
||||
{
|
||||
|
||||
pe = &pmove->physents[i];
|
||||
|
||||
if( pmFilter != NULL && pmFilter( pe ))
|
||||
|
@ -519,8 +518,7 @@ int PM_TestPlayerPosition( playermove_t *pmove, vec3_t pos, pfnIgnore pmFilter )
|
|||
if( pe->model && pe->solid == SOLID_NOT && pe->skin != 0 )
|
||||
continue;
|
||||
|
||||
// FIXME: check studiomodels with flag 512 by each hitbox ?
|
||||
// we ignore it for now
|
||||
// ignore hitboxes because they hasn't contents
|
||||
if( pe->studiomodel && pe->studiomodel->flags & STUDIO_TRACE_HITBOX )
|
||||
continue;
|
||||
|
||||
|
|
|
@ -261,6 +261,7 @@ typedef struct
|
|||
edict_t *ent;
|
||||
vec3_t origin;
|
||||
vec3_t angles;
|
||||
int fixangle;
|
||||
} sv_pushed_t;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1343,7 +1343,6 @@ edict_t* pfnFindClientInPVS( edict_t *pEdict )
|
|||
=================
|
||||
pfnEntitiesInPVS
|
||||
|
||||
FIXME: rewrite this code. get rid of hack
|
||||
=================
|
||||
*/
|
||||
edict_t *pfnEntitiesInPVS( edict_t *pplayer )
|
||||
|
@ -1367,7 +1366,7 @@ edict_t *pfnEntitiesInPVS( edict_t *pplayer )
|
|||
|
||||
if( pEdict->v.movetype == MOVETYPE_FOLLOW && SV_IsValidEdict( pEdict->v.aiment ))
|
||||
{
|
||||
// HACKHACK to transfer weapons across the levels (Retribution issues)
|
||||
// force all items across level even it is not visible
|
||||
if( pEdict->v.aiment == EDICT_NUM( 1 ))
|
||||
{
|
||||
pEdict->v.chain = chain;
|
||||
|
@ -1525,6 +1524,10 @@ int pfnDropToFloor( edict_t* e )
|
|||
|
||||
trace = SV_Move( e->v.origin, e->v.mins, e->v.maxs, end, MOVE_NORMAL, e );
|
||||
|
||||
// HACKHACK: to prevent falling stiiting_scientist from 'c1a0'
|
||||
if( trace.startsolid && SV_IsValidEdict( trace.ent ) && trace.ent->v.movetype == MOVETYPE_PUSHSTEP )
|
||||
return -1;
|
||||
|
||||
if( trace.allsolid )
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ convar_t *sv_clienttrace;
|
|||
convar_t *sv_send_resources;
|
||||
convar_t *sv_send_logos;
|
||||
convar_t *sv_sendvelocity;
|
||||
convar_t *sv_airmove;
|
||||
convar_t *mp_consistency;
|
||||
convar_t *serverinfo;
|
||||
convar_t *physinfo;
|
||||
|
@ -635,6 +636,7 @@ void SV_Init( void )
|
|||
Cvar_Get ("sv_background", "0", CVAR_READ_ONLY, "indicate what background map is running" );
|
||||
Cvar_Get( "gamedir", GI->gamefolder, CVAR_SERVERINFO|CVAR_SERVERNOTIFY|CVAR_INIT, "game folder" );
|
||||
Cvar_Get( "sv_alltalk", "1", 0, "allow to talking for all players (legacy, unused)" );
|
||||
Cvar_Get( "sv_airmove", "1", CVAR_SERVERNOTIFY, "enable airmovement (legacy, unused)" );
|
||||
Cvar_Get( "mp_autocrosshair", "0", 0, "allow auto crosshair in multiplayer (legacy, unused)" );
|
||||
|
||||
// half-life shared variables
|
||||
|
|
|
@ -994,6 +994,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
|
|||
pushed_p->ent = check;
|
||||
VectorCopy( check->v.origin, pushed_p->origin );
|
||||
VectorCopy( check->v.angles, pushed_p->angles );
|
||||
pushed_p->fixangle = check->v.fixangle;
|
||||
pushed_p++;
|
||||
|
||||
// calculate destination position
|
||||
|
@ -1026,7 +1027,7 @@ static edict_t *SV_PushRotate( edict_t *pusher, float movetime )
|
|||
VectorCopy( p->origin, p->ent->v.origin );
|
||||
VectorCopy( p->angles, p->ent->v.angles );
|
||||
SV_LinkEdict( p->ent, (p->ent == check) ? true : false );
|
||||
p->ent->v.fixangle = 0; // FIXME: save old fixangle state into pushed array ?
|
||||
p->ent->v.fixangle = pushed_p->fixangle;
|
||||
}
|
||||
return check;
|
||||
}
|
||||
|
|
|
@ -431,7 +431,7 @@ void ReapplyDecal( SAVERESTOREDATA *pSaveData, decallist_t *entry, qboolean adja
|
|||
|
||||
tr = SV_Move( testspot, vec3_origin, vec3_origin, testend, MOVE_NOMONSTERS, NULL );
|
||||
|
||||
// FIXME: this code may does wrong result on moving brushes e.g. func_tracktrain
|
||||
// NOTE: this code may does wrong result on moving brushes e.g. func_tracktrain
|
||||
if( tr.fraction != 1.0f && !tr.allsolid )
|
||||
{
|
||||
// check impact plane normal
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
makefont.exe -font "Arial" fonts.wad
|
||||
makefont.exe -font "Terminal" fonts.wad
|
||||
pause
|
Reference in New Issue