summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-05-01 02:03:55 +0000
committerTim Angus <tim@ngus.net>2004-05-01 02:03:55 +0000
commit127ade46d41e599b55d4359eae5eebf69f638aee (patch)
tree6e154fde3fc1dae0c167aa1cfc96181f5e3862f8 /src/game/g_cmds.c
parent36ceed63fed29968e418ac4d4bd60d1c1a14bec8 (diff)
* A plethora of assorted fiddles
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 6327ece5..1a631389 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1051,7 +1051,7 @@ void Cmd_SetViewpos_f( gentity_t *ent )
}
#define EVOLVE_TRACE_HEIGHT 128.0f
-#define AS_OVER_RT3 (ALIENSENSE_RANGE/M_ROOT3)
+#define AS_OVER_RT3 ((ALIENSENSE_RANGE*0.5f)/M_ROOT3)
/*
=================
@@ -1622,20 +1622,20 @@ void Cmd_Sell_f( gentity_t *ent )
//remove weapon if carried
if( BG_gotWeapon( weapon, ent->client->ps.stats ) )
{
+ //guard against selling the HBUILD weapons exploit
+ if( ( weapon == WP_HBUILD || weapon == WP_HBUILD2 ) &&
+ ent->client->ps.stats[ STAT_MISC ] > 0 )
+ {
+ trap_SendServerCommand( ent-g_entities, va( "print \"Cannot sell until build timer expires.\n\"" ) );
+ return;
+ }
+
BG_removeWeapon( weapon, ent->client->ps.stats );
//add to funds
ent->client->ps.persistant[ PERS_CREDIT ] += (short)BG_FindPriceForWeapon( weapon );
}
- //guard against selling the HBUILD weapons exploit
- if( weapon == WP_HBUILD || weapon == WP_HBUILD2 &&
- ent->client->ps.stats[ STAT_MISC ] != 0 )
- {
- trap_SendServerCommand( ent-g_entities, va( "print \"Cannot sell until build timer expires.\n\"" ) );
- return;
- }
-
//if we have this weapon selected, force a new selection
if( weapon == ent->client->ps.weapon )
{