diff options
author | Tim Angus <tim@ngus.net> | 2001-02-15 03:05:07 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-02-15 03:05:07 +0000 |
commit | f88246392e865202dd2b7029c0f3b62c7eb4c0f8 (patch) | |
tree | 01557e2e113d0521225c6e27ec5c98d7f458b968 /src/cgame/cg_event.c | |
parent | 31f1bb33ab5d7d3e6ebbc7eee88452e6efc8b011 (diff) |
Infesting getting fairly polished. Usual random bugfixes.
Diffstat (limited to 'src/cgame/cg_event.c')
-rw-r--r-- | src/cgame/cg_event.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index c8a3fab2..a2be137c 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -421,6 +421,9 @@ CG_Menu */ void CG_Menu( int eventParm ) { + char menuDef[ MAX_STRING_CHARS ]; + int i; + switch( eventParm ) { case MN_TEAM: @@ -447,6 +450,20 @@ void CG_Menu( int eventParm ) trap_SendConsoleCommand( "menu hmcumenu\n" ); break; + case MN_INFEST: + strcpy( menuDef, "5,5|Infest|0.8,0,0.8,1|0.6,0,0.6,0.8|1,0,1,1|1|16|" ); + for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) + { + if( BG_ClassCanEvolveFromTo( cg.snap->ps.stats[ STAT_PCLASS ], i ) ) + strcat( menuDef, va( "%s, class %s|", BG_FindNameForClassNum( i ), BG_FindNameForClassNum( i ) ) ); + } + strcat( menuDef, "|Choose a class|to evolve to" ); + + trap_SendConsoleCommand( va( "defmenu infest \"%s\"\n", menuDef ) ); + trap_SendConsoleCommand( "menu infest\n" ); + trap_SendConsoleCommand( "undefmenu infest\n" ); + break; + default: Com_Printf( "cgame: debug: no such menu %d\n", eventParm ); @@ -985,6 +1002,12 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { CG_Menu( es->eventParm ); break; + case EV_PLAYER_RESPAWN: + DEBUGNAME("EV_PLAYER_RESPAWN"); + if( es->number == cg.clientNum ) + cg.spawnTime = cg.time; + break; + default: DEBUGNAME("UNKNOWN"); CG_Error( "Unknown event: %i", event ); |