Skip to content

Commit

Permalink
Merge pull request #870 from WALLOFJUSTICE/dev23-q4
Browse files Browse the repository at this point in the history
* new candle sprites
  • Loading branch information
WALLOFJUSTICE authored Dec 12, 2024
2 parents 7f49b08 + 79ce097 commit ce0579f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/actmagictrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,12 +951,14 @@ void Entity::actAssistShrine()
static ConsoleVariable<float> cvar_assist_flame_z2("/assist_flame_z2", 9.f);
static ConsoleVariable<float> cvar_assist_flame_z3("/assist_flame_z3", 6.5);
static ConsoleVariable<float> cvar_assist_flame_z4("/assist_flame_z4", 10.f);
if ( numFlames > 0 )
const int spriteCandle = 202;
const int spriteCandleBlue = 203;
if ( numFlames > 0 && ( flickerLights || this->ticks % TICKS_PER_SECOND == 1 ) )
{
Entity* entity = nullptr;
if ( numFlames & (1 << 3) )
{
if ( entity = spawnFlame(this, redFlames & (1 << 3) ? SPRITE_FLAME : SPRITE_CRYSTALFLAME) )
if ( entity = spawnFlame(this, redFlames & (1 << 3) ? spriteCandle : spriteCandleBlue) )
{
entity->x += *cvar_assist_flame_x4 * cos(this->yaw);
entity->y += *cvar_assist_flame_x4 * sin(this->yaw);
Expand All @@ -969,7 +971,7 @@ void Entity::actAssistShrine()
}
if ( numFlames & (1 << 2) )
{
if ( entity = spawnFlame(this, redFlames & (1 << 2) ? SPRITE_FLAME : SPRITE_CRYSTALFLAME) )
if ( entity = spawnFlame(this, redFlames & (1 << 2) ? spriteCandle : spriteCandleBlue) )
{
entity->x += *cvar_assist_flame_x3 * cos(this->yaw);
entity->y += *cvar_assist_flame_x3 * sin(this->yaw);
Expand All @@ -982,7 +984,7 @@ void Entity::actAssistShrine()
}
if ( numFlames & (1 << 1) )
{
if ( entity = spawnFlame(this, redFlames & (1 << 1) ? SPRITE_FLAME : SPRITE_CRYSTALFLAME) )
if ( entity = spawnFlame(this, redFlames & (1 << 1) ? spriteCandle : spriteCandleBlue) )
{
entity->x += *cvar_assist_flame_x2 * cos(this->yaw);
entity->y += *cvar_assist_flame_x2 * sin(this->yaw);
Expand All @@ -995,7 +997,7 @@ void Entity::actAssistShrine()
}
if ( numFlames & (1 << 0) )
{
if ( entity = spawnFlame(this, redFlames & (1 << 0) ? SPRITE_FLAME : SPRITE_CRYSTALFLAME) )
if ( entity = spawnFlame(this, redFlames & (1 << 0) ? spriteCandle : spriteCandleBlue) )
{
entity->x += *cvar_assist_flame_x1 * cos(this->yaw);
entity->y += *cvar_assist_flame_x1 * sin(this->yaw);
Expand Down

0 comments on commit ce0579f

Please sign in to comment.