diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 48bc3a0a..82d3828d 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -844,14 +844,14 @@ void G_Say( gentity_t *ent, gentity_t *target, int mode, const char *chatText ) { default: case SAY_ALL: - G_LogPrintf( "say: %s: %s\n", ent->client->pers.netname, chatText ); + G_LogPrintf( "say: %s^7: %s\n", ent->client->pers.netname, chatText ); Com_sprintf( name, sizeof( name ), "%s%s%c%c"EC": ", prefix, ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE ); color = COLOR_GREEN; break; case SAY_TEAM: - G_LogPrintf( "sayteam: %s: %s\n", ent->client->pers.netname, chatText ); + G_LogPrintf( "sayteam: %s^7: %s\n", ent->client->pers.netname, chatText ); if( Team_GetLocationMsg( ent, location, sizeof( location ) ) ) Com_sprintf( name, sizeof( name ), EC"(%s%c%c"EC") (%s)"EC": ", ent->client->pers.netname, Q_COLOR_ESCAPE, COLOR_WHITE, location ); @@ -956,7 +956,7 @@ static void Cmd_Tell_f( gentity_t *ent ) p = ConcatArgs( 2 ); - G_LogPrintf( "tell: %s to %s: %s\n", ent->client->pers.netname, target->client->pers.netname, p ); + G_LogPrintf( "tell: %s^7 to %s^7: %s\n", ent->client->pers.netname, target->client->pers.netname, p ); G_Say( ent, target, SAY_TELL, p ); // don't tell to the player self if it was already directed to this player // also don't send the chat back to a bot @@ -1156,7 +1156,7 @@ void Cmd_CallVote_f( gentity_t *ent ) !Q_stricmp( arg1, "mute" ) || !Q_stricmp( arg1, "unmute" ) ) { - int clientNums[ MAX_CLIENTS ] = { -1 }; + int clientNums[ MAX_CLIENTS ]; if( !arg2[ 0 ] ) { @@ -1176,12 +1176,6 @@ void Cmd_CallVote_f( gentity_t *ent ) clientNum = G_ClientNumberFromString( arg2 ); } - if( clientNum != -1 && - level.clients[ clientNum ].pers.connected == CON_DISCONNECTED ) - { - clientNum = -1; - } - if( clientNum != -1 ) { Q_strncpyz( name, level.clients[ clientNum ].pers.netname, @@ -1207,7 +1201,7 @@ void Cmd_CallVote_f( gentity_t *ent ) if( level.clients[ clientNum ].pers.localClient ) { trap_SendServerCommand( ent-g_entities, - "print \"callvote: host is immute from vote kick\n\"" ); + "print \"callvote: host is immune from vote kick\n\"" ); return; } @@ -1394,7 +1388,7 @@ void Cmd_CallTeamVote_f( gentity_t *ent ) !Q_stricmp( arg1, "denybuild" ) || !Q_stricmp( arg1, "allowbuild" ) ) { - int clientNums[ MAX_CLIENTS ] = { -1 }; + int clientNums[ MAX_CLIENTS ]; if( !arg2[ 0 ] ) { @@ -1421,12 +1415,6 @@ void Cmd_CallTeamVote_f( gentity_t *ent ) clientNum = -1; } - if( clientNum != -1 && - level.clients[ clientNum ].pers.connected == CON_DISCONNECTED ) - { - clientNum = -1; - } - if( clientNum != -1 ) { Q_strncpyz( name, level.clients[ clientNum ].pers.netname, @@ -1654,7 +1642,7 @@ static qboolean G_RoomForClassChange( gentity_t *ent, class_t class, vec3_t newO } // find what the new origin would be on a level surface - newOrigin[ 2 ] += fabs( toMins[ 2 ] ) - fabs( fromMins[ 2 ] ); + newOrigin[ 2 ] -= toMins[ 2 ] - fromMins[ 2 ]; //compute a place up in the air to start the real trace VectorCopy( newOrigin, temp ); @@ -1966,18 +1954,7 @@ void Cmd_Destroy_f( gentity_t *ent ) } else { - G_TeamCommand( ent->client->pers.teamSelection, - va( "print \"%s ^3DECONSTRUCTED^7 by %s^7\n\"", - BG_Buildable( traceEnt->s.modelindex )->humanName, - ent->client->pers.netname ) ); - - G_LogPrintf( "Decon: %i %i 0: %s deconstructed %s\n", - ent->client->ps.clientNum, - traceEnt->s.modelindex, - ent->client->pers.netname, - BG_Buildable( traceEnt->s.modelindex )->humanName ); - - G_Damage( traceEnt, ent, ent, forward, tr.endpos, ent->health, 0, MOD_SUICIDE ); + G_LogDestruction( traceEnt, ent, MOD_UNKNOWN ); G_FreeEntity( traceEnt ); } @@ -2251,7 +2228,7 @@ void Cmd_Buy_f( gentity_t *ent ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOROOMBSUITON ); return; } - VectorCopy( newOrigin, ent->s.pos.trBase ); + VectorCopy( newOrigin, ent->client->ps.origin ); ent->client->ps.stats[ STAT_CLASS ] = PCL_HUMAN_BSUIT; ent->client->pers.classSelection = PCL_HUMAN_BSUIT; ent->client->ps.eFlags ^= EF_TELEPORT_BIT; @@ -2354,7 +2331,7 @@ void Cmd_Sell_f( gentity_t *ent ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOROOMBSUITOFF ); return; } - VectorCopy( newOrigin, ent->s.pos.trBase ); + VectorCopy( newOrigin, ent->client->ps.origin ); ent->client->ps.stats[ STAT_CLASS ] = PCL_HUMAN; ent->client->pers.classSelection = PCL_HUMAN; ent->client->ps.eFlags ^= EF_TELEPORT_BIT; @@ -2419,7 +2396,7 @@ void Cmd_Sell_f( gentity_t *ent ) G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOROOMBSUITOFF ); continue; } - VectorCopy( newOrigin, ent->s.pos.trBase ); + VectorCopy( newOrigin, ent->client->ps.origin ); ent->client->ps.stats[ STAT_CLASS ] = PCL_HUMAN; ent->client->pers.classSelection = PCL_HUMAN; ent->client->ps.eFlags ^= EF_TELEPORT_BIT; @@ -3385,7 +3362,7 @@ void G_PrivateMessage( gentity_t *ent ) ADMP( va( "^%cPrivate message: ^7%s\n", color, msg ) ); ADMP( va( "%s\n", str ) ); - G_LogPrintf( "%s: %s: %s: %s\n", + G_LogPrintf( "%s: %s^7: %s^7: %s\n", ( teamonly ) ? "tprivmsg" : "privmsg", ( ent ) ? ent->client->pers.netname : "console", name, msg ); |