summaryrefslogtreecommitdiff
path: root/src/game/bg_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r--src/game/bg_misc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index cac8f17b..8e925581 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -2815,6 +2815,19 @@ char *eventnames[ ] =
/*
===============
+BG_EventName
+===============
+*/
+const char *BG_EventName( int num )
+{
+ if( num < 0 || num >= sizeof( eventnames ) / sizeof( char * ) )
+ return "UNKNOWN";
+
+ return eventnames[ num ];
+}
+
+/*
+===============
BG_AddPredictableEventToPlayerstate
Handles the sequence numbers
@@ -2834,10 +2847,12 @@ void BG_AddPredictableEventToPlayerstate( int newEvent, int eventParm, playerSta
{
#ifdef GAME
Com_Printf( " game event svt %5d -> %5d: num = %20s parm %d\n",
- ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[ newEvent ], eventParm);
+ ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence,
+ BG_EventName( newEvent ), eventParm );
#else
Com_Printf( "Cgame event svt %5d -> %5d: num = %20s parm %d\n",
- ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence, eventnames[ newEvent ], eventParm);
+ ps->pmove_framecount/*ps->commandTime*/, ps->eventSequence,
+ BG_EventName( newEvent ), eventParm );
#endif
}
}