mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 13:40:56 +00:00
Patch and description by ensiform (#5043):
This patch moves cg_particles.c out of cg_marks.c to the actual file that was already there but not used. By default WOLF_PARTICLES definition is commented out if someone wants to use the old cg_particles.c changes. cg_particles.c has been added to the makefile and msvc projects.
This commit is contained in:
parent
16d2ab5f8b
commit
77d764c457
6 changed files with 99 additions and 1983 deletions
2
Makefile
2
Makefile
|
@ -1885,6 +1885,7 @@ Q3CGOBJ_ = \
|
||||||
$(B)/baseq3/cgame/cg_info.o \
|
$(B)/baseq3/cgame/cg_info.o \
|
||||||
$(B)/baseq3/cgame/cg_localents.o \
|
$(B)/baseq3/cgame/cg_localents.o \
|
||||||
$(B)/baseq3/cgame/cg_marks.o \
|
$(B)/baseq3/cgame/cg_marks.o \
|
||||||
|
$(B)/baseq3/cgame/cg_particles.o \
|
||||||
$(B)/baseq3/cgame/cg_players.o \
|
$(B)/baseq3/cgame/cg_players.o \
|
||||||
$(B)/baseq3/cgame/cg_playerstate.o \
|
$(B)/baseq3/cgame/cg_playerstate.o \
|
||||||
$(B)/baseq3/cgame/cg_predict.o \
|
$(B)/baseq3/cgame/cg_predict.o \
|
||||||
|
@ -1928,6 +1929,7 @@ MPCGOBJ_ = \
|
||||||
$(B)/missionpack/cgame/cg_info.o \
|
$(B)/missionpack/cgame/cg_info.o \
|
||||||
$(B)/missionpack/cgame/cg_localents.o \
|
$(B)/missionpack/cgame/cg_localents.o \
|
||||||
$(B)/missionpack/cgame/cg_marks.o \
|
$(B)/missionpack/cgame/cg_marks.o \
|
||||||
|
$(B)/missionpack/cgame/cg_particles.o \
|
||||||
$(B)/missionpack/cgame/cg_players.o \
|
$(B)/missionpack/cgame/cg_players.o \
|
||||||
$(B)/missionpack/cgame/cg_playerstate.o \
|
$(B)/missionpack/cgame/cg_playerstate.o \
|
||||||
$(B)/missionpack/cgame/cg_predict.o \
|
$(B)/missionpack/cgame/cg_predict.o \
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -24,6 +24,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
#include "cg_local.h"
|
#include "cg_local.h"
|
||||||
|
|
||||||
|
//#define WOLF_PARTICLES
|
||||||
|
|
||||||
#define BLOODRED 2
|
#define BLOODRED 2
|
||||||
#define EMISIVEFADE 3
|
#define EMISIVEFADE 3
|
||||||
#define GREY75 4
|
#define GREY75 4
|
||||||
|
@ -91,6 +93,21 @@ typedef enum
|
||||||
#define MAX_SHADER_ANIMS 32
|
#define MAX_SHADER_ANIMS 32
|
||||||
#define MAX_SHADER_ANIM_FRAMES 64
|
#define MAX_SHADER_ANIM_FRAMES 64
|
||||||
|
|
||||||
|
#ifndef WOLF_PARTICLES
|
||||||
|
static char *shaderAnimNames[MAX_SHADER_ANIMS] = {
|
||||||
|
"explode1",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static qhandle_t shaderAnims[MAX_SHADER_ANIMS][MAX_SHADER_ANIM_FRAMES];
|
||||||
|
static int shaderAnimCounts[MAX_SHADER_ANIMS] = {
|
||||||
|
23
|
||||||
|
};
|
||||||
|
static float shaderAnimSTRatio[MAX_SHADER_ANIMS] = {
|
||||||
|
1.0f
|
||||||
|
};
|
||||||
|
static int numShaderAnims;
|
||||||
|
// done.
|
||||||
|
#else
|
||||||
static char *shaderAnimNames[MAX_SHADER_ANIMS] = {
|
static char *shaderAnimNames[MAX_SHADER_ANIMS] = {
|
||||||
"explode1",
|
"explode1",
|
||||||
"blacksmokeanim",
|
"blacksmokeanim",
|
||||||
|
@ -117,11 +134,14 @@ static float shaderAnimSTRatio[MAX_SHADER_ANIMS] = {
|
||||||
1.0f,
|
1.0f,
|
||||||
1.0f,
|
1.0f,
|
||||||
};
|
};
|
||||||
static int numShaderAnims;
|
#endif
|
||||||
// done.
|
|
||||||
|
|
||||||
#define PARTICLE_GRAVITY 40
|
#define PARTICLE_GRAVITY 40
|
||||||
|
|
||||||
|
#ifdef WOLF_PARTICLES
|
||||||
#define MAX_PARTICLES 1024 * 8
|
#define MAX_PARTICLES 1024 * 8
|
||||||
|
#else
|
||||||
|
#define WOLF_PARTICLES 1024
|
||||||
|
|
||||||
cparticle_t *active_particles, *free_particles;
|
cparticle_t *active_particles, *free_particles;
|
||||||
cparticle_t particles[MAX_PARTICLES];
|
cparticle_t particles[MAX_PARTICLES];
|
||||||
|
@ -331,7 +351,11 @@ void CG_AddParticleToScene (cparticle_t *p, vec3_t org, float alpha)
|
||||||
vec3_t rr, ru;
|
vec3_t rr, ru;
|
||||||
vec3_t rotate_ang;
|
vec3_t rotate_ang;
|
||||||
|
|
||||||
|
#ifdef WOLF_PARTICLES
|
||||||
VectorSet (color, 1.0, 1.0, 1.0);
|
VectorSet (color, 1.0, 1.0, 1.0);
|
||||||
|
#else
|
||||||
|
VectorSet (color, 1.0, 1.0, 0.5);
|
||||||
|
#endif
|
||||||
time = cg.time - p->time;
|
time = cg.time - p->time;
|
||||||
time2 = p->endtime - p->time;
|
time2 = p->endtime - p->time;
|
||||||
ratio = time / time2;
|
ratio = time / time2;
|
||||||
|
@ -1267,7 +1291,11 @@ void CG_ParticleExplosion (char *animStr, vec3_t origin, vec3_t vel, int duratio
|
||||||
p->next = active_particles;
|
p->next = active_particles;
|
||||||
active_particles = p;
|
active_particles = p;
|
||||||
p->time = cg.time;
|
p->time = cg.time;
|
||||||
|
#ifdef WOLF_PARTICLES
|
||||||
p->alpha = 1.0;
|
p->alpha = 1.0;
|
||||||
|
#lese
|
||||||
|
p->alpha = 0.5;
|
||||||
|
#endif
|
||||||
p->alphavel = 0;
|
p->alphavel = 0;
|
||||||
|
|
||||||
if (duration < 0) {
|
if (duration < 0) {
|
||||||
|
|
|
@ -1043,6 +1043,48 @@
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\code\cgame\cg_particles.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release TA|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MISSIONPACK;"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;"
|
||||||
|
BrowseInformation="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug TA|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MISSIONPACK;"
|
||||||
|
BrowseInformation="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\code\cgame\cg_players.c"
|
RelativePath="..\..\code\cgame\cg_players.c"
|
||||||
>
|
>
|
||||||
|
|
|
@ -861,6 +861,28 @@
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\code\cgame\cg_particles.c">
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|Win32'">Disabled</Optimization>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|x64'">Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug TA|Win32'">WIN32;_DEBUG;_WINDOWS;MISSIONPACK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug TA|x64'">WIN32;_DEBUG;_WINDOWS;MISSIONPACK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug TA|Win32'">true</BrowseInformation>
|
||||||
|
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug TA|x64'">true</BrowseInformation>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||||
|
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release TA|Win32'">MaxSpeed</Optimization>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release TA|x64'">MaxSpeed</Optimization>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release TA|Win32'">WIN32;NDEBUG;_WINDOWS;MISSIONPACK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release TA|x64'">WIN32;NDEBUG;_WINDOWS;MISSIONPACK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||||
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\code\cgame\cg_players.c">
|
<ClCompile Include="..\..\code\cgame\cg_players.c">
|
||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|Win32'">Disabled</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|Win32'">Disabled</Optimization>
|
||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|x64'">Disabled</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug TA|x64'">Disabled</Optimization>
|
||||||
|
|
|
@ -59,6 +59,9 @@
|
||||||
<ClCompile Include="..\..\code\cgame\cg_newDraw.c">
|
<ClCompile Include="..\..\code\cgame\cg_newDraw.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\code\cgame\cg_particles.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\code\cgame\cg_players.c">
|
<ClCompile Include="..\..\code\cgame\cg_players.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
Loading…
Reference in a new issue