Changeset 71:1c5d40e597d9
- Timestamp:
- 11/22/07 01:25:01 (3 years ago)
- Author:
- mdoison
- Branch:
- madcat
- convert_revision:
- svn:7c786126-522e-0410-a822-d6d8feae56ca/branches/madcat@93
- Message:
-
- Applied rank.patch (tjw 1.2)
- Applied buildfire_opt.patch (tjw 1.2)
- Applied nova_in_sendserver.patch (tjw 1.2)
- Location:
- src/game
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r68
|
r71
|
|
| 1740 | 1740 | ( ent->client->ps.stats[ STAT_STATE ] & SS_WALLCLIMBINGCEILING ) ) |
| 1741 | 1741 | { |
| 1742 | | trap_SendServerCommand( ent-g_entities, va( "print \"You cannot evolve while wallwalking\n\"" ) ); |
| | 1742 | trap_SendServerCommand( ent-g_entities, "print \"You cannot evolve while wallwalking\n\"" ); |
| 1743 | 1743 | return; |
| 1744 | 1744 | } |
| … |
… |
|
| 1813 | 1813 | { |
| 1814 | 1814 | trap_SendServerCommand( ent-g_entities, |
| 1815 | | va( "print \"You cannot evolve from your current class\n\"" ) ); |
| | 1815 | "print \"You cannot evolve from your current class\n\"" ); |
| 1816 | 1816 | return; |
| 1817 | 1817 | } |
-
|
r68
|
r71
|
|
| 1430 | 1430 | { |
| 1431 | 1431 | int i; |
| 1432 | | int rank; |
| 1433 | | int score; |
| 1434 | | int newScore; |
| 1435 | | gclient_t *cl; |
| 1436 | 1432 | char P[ MAX_CLIENTS + 1 ] = {""}; |
| 1437 | 1433 | int ff = 0; |
| … |
… |
|
| 1497 | 1493 | qsort( level.sortedClients, level.numConnectedClients, |
| 1498 | 1494 | sizeof( level.sortedClients[ 0 ] ), SortRanks ); |
| 1499 | | |
| 1500 | | // set the rank value for all clients that are connected and not spectators |
| 1501 | | rank = -1; |
| 1502 | | score = 0; |
| 1503 | | for( i = 0; i < level.numPlayingClients; i++ ) |
| 1504 | | { |
| 1505 | | cl = &level.clients[ level.sortedClients[ i ] ]; |
| 1506 | | newScore = cl->ps.persistant[ PERS_SCORE ]; |
| 1507 | | |
| 1508 | | if( i == 0 || newScore != score ) |
| 1509 | | { |
| 1510 | | rank = i; |
| 1511 | | // assume we aren't tied until the next client is checked |
| 1512 | | level.clients[ level.sortedClients[ i ] ].ps.persistant[ PERS_RANK ] = rank; |
| 1513 | | } |
| 1514 | | else |
| 1515 | | { |
| 1516 | | // we are tied with the previous client |
| 1517 | | level.clients[ level.sortedClients[ i - 1 ] ].ps.persistant[ PERS_RANK ] = rank; |
| 1518 | | level.clients[ level.sortedClients[ i ] ].ps.persistant[ PERS_RANK ] = rank; |
| 1519 | | } |
| 1520 | | |
| 1521 | | score = newScore; |
| 1522 | | } |
| 1523 | 1495 | |
| 1524 | 1496 | // see if it is time to end the level |
-
|
r1
|
r71
|
|
| 750 | 750 | void buildFire( gentity_t *ent, dynMenu_t menu ) |
| 751 | 751 | { |
| 752 | | if( ( ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) > BA_NONE ) |
| | 752 | buildable_t buildable = ( ent->client->ps.stats[ STAT_BUILDABLE ] |
| | 753 | & ~SB_VALID_TOGGLEBIT ); |
| | 754 | |
| | 755 | if( buildable > BA_NONE ) |
| 753 | 756 | { |
| 754 | 757 | if( ent->client->ps.stats[ STAT_MISC ] > 0 ) |
| … |
… |
|
| 758 | 761 | } |
| 759 | 762 | |
| 760 | | if( G_BuildIfValid( ent, ent->client->ps.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) ) |
| | 763 | if( G_BuildIfValid( ent, buildable ) ) |
| 761 | 764 | { |
| 762 | 765 | if( g_cheats.integer || g_fastBuild.integer) |
| … |
… |
|
| 764 | 767 | ent->client->ps.stats[ STAT_MISC ] = 0; |
| 765 | 768 | } |
| | 769 | /* |
| 766 | 770 | else if( ent->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS && !G_IsOvermindBuilt( ) ) |
| 767 | 771 | { |
| … |
… |
|
| 775 | 779 | BG_FindBuildDelayForWeapon( ent->s.weapon ) * 2; |
| 776 | 780 | } |
| | 781 | */ |
| 777 | 782 | else |
| 778 | 783 | ent->client->ps.stats[ STAT_MISC ] += |
| 779 | | BG_FindBuildDelayForWeapon( ent->s.weapon ); |
| | 784 | BG_FindBuildTimeForBuildable( buildable ); |
| 780 | 785 | |
| 781 | 786 | ent->client->ps.stats[ STAT_BUILDABLE ] = BA_NONE; |