diff options
-rw-r--r-- | src/cgame/cg_event.c | 5 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 2 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_buildable.c | 1 | ||||
-rw-r--r-- | src/game/tremulous.h | 2 |
6 files changed, 13 insertions, 2 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 10e1dcd1..93dcca1d 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -609,6 +609,11 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) cent->buildableAnim = es->eventParm; break; + case EV_RPTUSE_SOUND: + DEBUGNAME( "EV_RPTUSE_SOUND" ); + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.repeaterUseSound ); + break; + case EV_GRENADE_BOUNCE: DEBUGNAME( "EV_GRENADE_BOUNCE" ); if( rand( ) & 1 ) diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index f4663f80..c37d5f60 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -943,6 +943,8 @@ typedef struct qhandle_t jetpackModel; qhandle_t jetpackFlashModel; + + sfxHandle_t repeaterUseSound; } cgMedia_t; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 28d7120e..f070b4a3 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -643,6 +643,8 @@ static void CG_RegisterSounds( void ) cgs.media.hgrenb1aSound = trap_S_RegisterSound( "sound/weapons/grenade/hgrenb1a.wav", qfalse ); cgs.media.hgrenb2aSound = trap_S_RegisterSound( "sound/weapons/grenade/hgrenb2a.wav", qfalse ); + + cgs.media.repeaterUseSound = trap_S_RegisterSound( "sound/buildables/repeater/use.wav", qfalse ); } diff --git a/src/game/bg_public.h b/src/game/bg_public.h index c914643a..20fced4b 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -532,7 +532,8 @@ typedef enum EV_BUILD_DELAY, //TA: can't build yet EV_POISONCLOUD, //TA: client poisoned EV_KNOCKOVER, //TA: client knocked over - EV_GETUP //TA: client getting up + EV_GETUP, //TA: client getting up + EV_RPTUSE_SOUND //TA: trigger a sound } entity_event_t; typedef enum diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 0f6a84d2..640fa752 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1144,6 +1144,7 @@ void HRpt_Use( gentity_t *self, gentity_t *other, gentity_t *activator ) BG_packAmmoArray( ps->weapon, ps->ammo, ps->powerups, ammo, clips, maxClips ); + G_AddEvent( activator, EV_RPTUSE_SOUND, 0 ); activator->client->lastRefilTime = level.time; } diff --git a/src/game/tremulous.h b/src/game/tremulous.h index b2da4117..884e6526 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -454,7 +454,7 @@ #define REPEATER_SPLASHDAMAGE 50 #define REPEATER_SPLASHRADIUS 100 -#define ENERGY_REFIL_TIME 500 //1/2 second between every clip refil +#define ENERGY_REFIL_TIME 1000 //1/2 second between every clip refil #define FLOATMINE_BP 50 #define FLOATMINE_HEALTH HBHM(10) |