diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 11:49:31 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:23 +0000 |
commit | 25c786294107d95d278936e5b262c09e910359c5 (patch) | |
tree | 0f0c289f7ab2652848937a95bdb35245f4d48aa1 | |
parent | 0b913bba474a108931c1308922fa3d3e8f0d75d4 (diff) |
* Adjust the error text for no BP based on markdeconstruct
* Re-order some buy messages to be more useful
-rw-r--r-- | src/cgame/cg_servercmds.c | 8 | ||||
-rw-r--r-- | src/game/g_cmds.c | 30 |
2 files changed, 21 insertions, 17 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 43caae33..115c4ccf 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -639,8 +639,12 @@ void CG_Menu( int menu, int arg ) //=============================== case MN_H_NOBP: - longMsg = "There is no power remaining. Free up power by deconstructing " - "existing buildable objects."; + if( cgs.markDeconstruct ) + longMsg = "There is no power remaining. Free up power by marking " + "existing buildable objects."; + else + longMsg = "There is no power remaining. Free up power by deconstructing " + "existing buildable objects."; shortMsg = "There is no power remaining"; type = DT_BUILD; break; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 61f39b76..5c1d1356 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2095,20 +2095,6 @@ void Cmd_Buy_f( gentity_t *ent ) return; } - //can afford this? - if( BG_Weapon( weapon )->price > (short)ent->client->ps.persistant[ PERS_CREDIT ] ) - { - G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS ); - return; - } - - //have space to carry this? - if( BG_Weapon( weapon )->slots & ent->client->ps.stats[ STAT_SLOTS ] ) - { - G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOSLOTS ); - return; - } - // Only humans can buy stuff if( BG_Weapon( weapon )->team != TEAM_HUMANS ) { @@ -2129,7 +2115,21 @@ void Cmd_Buy_f( gentity_t *ent ) trap_SendServerCommand( ent-g_entities, "print \"You can't buy this item\n\"" ); return; } - + + //can afford this? + if( BG_Weapon( weapon )->price > (short)ent->client->ps.persistant[ PERS_CREDIT ] ) + { + G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS ); + return; + } + + //have space to carry this? + if( BG_Weapon( weapon )->slots & ent->client->ps.stats[ STAT_SLOTS ] ) + { + G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOSLOTS ); + return; + } + // In some instances, weapons can't be changed if( !BG_PlayerCanChangeWeapon( &ent->client->ps ) ) return; |