Skip to content

Commit

Permalink
Add N64 electric sparks effect.
Browse files Browse the repository at this point in the history
Partially based on:
Paril@fd255ef
  • Loading branch information
skullernet committed Nov 13, 2024
1 parent 28163e3 commit b57e6e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions inc/shared/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ enum {
SPLASH_SLIME,
SPLASH_LAVA,
SPLASH_BLOOD,
SPLASH_ELECTRIC_N64, // KEX
};

// sound channels
Expand Down
16 changes: 11 additions & 5 deletions src/client/tent.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,11 +1285,17 @@ void CL_ParseTEnt(void)
break;

case TE_SPLASH: // bullet hitting water
if (te.color < 0 || te.color > 6)
r = 0x00;
else
r = splash_color[te.color];
CL_ParticleEffect(te.pos1, te.dir, r, te.count);
if (cl.csr.extended && te.color == SPLASH_ELECTRIC_N64) {
CL_ParticleEffect(te.pos1, te.dir, 0x6c, te.count / 2);
CL_ParticleEffect(te.pos1, te.dir, 0xb0, (te.count + 1) / 2);
te.color = SPLASH_SPARKS;
} else {
if (te.color >= q_countof(splash_color))
r = 0x00;
else
r = splash_color[te.color];
CL_ParticleEffect(te.pos1, te.dir, r, te.count);
}

if (te.color == SPLASH_SPARKS) {
r = Q_rand() & 3;
Expand Down

0 comments on commit b57e6e3

Please sign in to comment.