mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 02:16:40 +02:00
- ported bugfixes for 3.6.0.3 release:
- CMake build system fixes applied during debian testing (like checking for compiler SSE support etc) - Windows client fix for headless server operation - Crash for some systems when trying to use VBO's - Fixed AZERTY keyboard support - Enhanced support for screenshots in g3d viewer - Updated particle code from titi - Bugfix for custom data path override causing compiler error - Bugfix for fontconfig to properly find fonts on systems that support and have fontconfig installed (fixes numerous non debian based systems that reported null font errors) - Minor UI fix on battle end screen when playing 8 players (last player was sometimes chopped off)
This commit is contained in:
@@ -74,6 +74,7 @@ ParticleSystem::ParticleSystem(int particleCount) {
|
||||
teamcolorNoEnergy= false;
|
||||
teamcolorEnergy= false;
|
||||
alternations= 0;
|
||||
particleSystemStartDelay= 0;
|
||||
}
|
||||
|
||||
ParticleSystem::~ParticleSystem(){
|
||||
@@ -97,8 +98,10 @@ void ParticleSystem::update(){
|
||||
if(aliveParticleCount > (int) particles.size()){
|
||||
throw runtime_error("aliveParticleCount >= particles.size()");
|
||||
}
|
||||
|
||||
if(state != sPause){
|
||||
if(particleSystemStartDelay>0){
|
||||
particleSystemStartDelay--;
|
||||
}
|
||||
else if(state != sPause){
|
||||
for(int i= 0; i < aliveParticleCount; ++i){
|
||||
updateParticle(&particles[i]);
|
||||
|
||||
@@ -527,6 +530,7 @@ void GameParticleSystem::setTween(float relative,float absolute) {
|
||||
// UnitParticleSystem
|
||||
// ===========================================================================
|
||||
bool UnitParticleSystem::isNight= false;
|
||||
Vec3f UnitParticleSystem::lightColor=Vec3f(1.0f,1.0f,1.0f);
|
||||
|
||||
UnitParticleSystem::UnitParticleSystem(int particleCount):
|
||||
GameParticleSystem(particleCount),
|
||||
@@ -537,11 +541,14 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
||||
|
||||
setParticleSize(0.6f);
|
||||
setColorNoEnergy(Vec4f(1.0f, 0.5f, 0.0f, 1.0f));
|
||||
sizeNoEnergy=1.0f;
|
||||
|
||||
primitive= pQuad;
|
||||
gravity= 0.0f;
|
||||
|
||||
fixed= false;
|
||||
shape = UnitParticleSystem::sLinear;
|
||||
angle= 0.0f;
|
||||
rotation= 0.0f;
|
||||
relativeDirection= true;
|
||||
relative= false;
|
||||
@@ -549,6 +556,7 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
||||
|
||||
isVisibleAtNight= true;
|
||||
isVisibleAtDay= true;
|
||||
isDaylightAffected= false;
|
||||
|
||||
cRotation= Vec3f(1.0f, 1.0f, 1.0f);
|
||||
fixedAddition= Vec3f(0.0f, 0.0f, 0.0f);
|
||||
@@ -560,6 +568,7 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
||||
|
||||
delay = 0; // none
|
||||
lifetime = -1; // forever
|
||||
emissionRateFade=0.0f;
|
||||
|
||||
startTime = 0;
|
||||
endTime = 1;
|
||||
@@ -736,6 +745,12 @@ void UnitParticleSystem::updateParticle(Particle *p){
|
||||
}
|
||||
p->speed+= p->accel;
|
||||
p->color= color * energyRatio + colorNoEnergy * (1.0f - energyRatio);
|
||||
if(isDaylightAffected==true)
|
||||
{
|
||||
p->color.x=p->color.x*lightColor.x;
|
||||
p->color.y=p->color.y*lightColor.y;
|
||||
p->color.z=p->color.z*lightColor.z;
|
||||
}
|
||||
p->size= particleSize * energyRatio + sizeNoEnergy * (1.0f - energyRatio);
|
||||
if(state == ParticleSystem::sFade || staticParticleCount < 1){
|
||||
p->energy--;
|
||||
|
Reference in New Issue
Block a user