summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_servercmds.c8
-rw-r--r--src/game/g_cmds.c30
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;