diff options
author | Tim Angus <tim@ngus.net> | 2006-07-31 21:57:09 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-07-31 21:57:09 +0000 |
commit | bd235d1ed7984e4f7625174cc7bcdd3ae7b25c92 (patch) | |
tree | 218a71c1a5800bcd2bc5af390c4045582253c1fd /src | |
parent | 68da0ee4bead3a36b5057471a30414f11cc01577 (diff) |
* Wallwalking warning when attempting to evolve (bug #2802 Martin Doucha)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_cmds.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index d3701bea..6cef9201 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1459,9 +1459,7 @@ void Cmd_Class_f( gentity_t *ent ) if( ent->client->pers.teamSelection == PTE_ALIENS && !( ent->client->ps.stats[ STAT_STATE ] & SS_INFESTING ) && - !( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) && - !( ent->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBING ) && - !( ent->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBINGCEILING ) ) + !( ent->client->ps.stats[ STAT_STATE ] & SS_HOVELING ) ) { newClass = BG_FindClassNumForName( s ); if( newClass == PCL_NONE ) @@ -1473,6 +1471,13 @@ void Cmd_Class_f( gentity_t *ent ) //if we are not currently spectating, we are attempting evolution if( currentClass != PCL_NONE ) { + if( ( ent->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBING ) || + ( ent->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBINGCEILING ) ) + { + trap_SendServerCommand( ent-g_entities, va( "print \"You cannot evolve while wallwalking\n\"" ) ); + return; + } + //check there are no humans nearby VectorAdd( ent->client->ps.origin, range, maxs ); VectorSubtract( ent->client->ps.origin, range, mins ); @@ -1501,7 +1506,8 @@ void Cmd_Class_f( gentity_t *ent ) currentClass == PCL_ALIEN_BUILDER0_UPG ) && ent->client->ps.stats[ STAT_MISC ] > 0 ) { - trap_SendServerCommand( ent-g_entities, va( "print \"Cannot evolve until build timer expires\n\"" ) ); + trap_SendServerCommand( ent-g_entities, + va( "print \"You cannot evolve until build timer expires\n\"" ) ); return; } @@ -1537,7 +1543,7 @@ void Cmd_Class_f( gentity_t *ent ) { //...check we can evolve to that class if( numLevels >= 0 && - BG_FindStagesForClass( newClass, g_alienStage.integer ) && + BG_FindStagesForClass( newClass, g_alienStage.integer ) && BG_ClassIsAllowed( newClass ) ) { ent->client->pers.evolveHealthFraction = (float)ent->client->ps.stats[ STAT_HEALTH ] / |