Skip to content

Commit

Permalink
mod: construction sound no longer loops, fixes etlegacy#2429
Browse files Browse the repository at this point in the history
  • Loading branch information
nanocirs committed Feb 20, 2024
1 parent e74802a commit e54f4cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/game/g_weapon.c
Expand Up @@ -1006,8 +1006,12 @@ static qboolean TryConstructing(gentity_t *ent, gentity_t *trigger)

if (!ent->client->constructSoundTime || level.time > ent->client->constructSoundTime)
{
// construction sound sent as event (was temp entity)
G_AddEvent(ent, EV_GENERAL_SOUND, GAMESOUND_WORLD_BUILD);
if (constructible->s.angles2[0] == 0.f)
{
// construction sound sent as event (was temp entity)
G_AddEvent(ent, EV_GENERAL_SOUND, GAMESOUND_WORLD_BUILD);
}

ent->client->constructSoundTime = level.time + 4000; // duration of sound
}

Expand Down

0 comments on commit e54f4cd

Please sign in to comment.