summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-04-06 21:08:11 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-04-06 22:20:59 +0200
commit744b62bc248a5cdf9608de2f350bd2b490f11d67 (patch)
tree608bdd70d5153da98b7af0aa99f7f9e745521c03
parentd7a68bbf35c9a5308a7541522e539af164088295 (diff)
Minor /share and /donate fixes.
-rw-r--r--src/game/g_cmds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index d19bb02..34185b2 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -4962,7 +4962,7 @@ void Cmd_Share_f( gentity_t *ent )
//check arg2 is a number
for( i = 0; arg2[ i ]; i++ )
{
- if( arg2[ i ] < '0' || arg2[ i ] > '9' )
+ if( ( arg2[ i ] < '0' || arg2[ i ] > '9' ) && arg2[ i ] != '.' )
{
trap_SendServerCommand( ent-g_entities,
"print \"usage: share [name|slot#] [amount]\n\"" );
@@ -5171,7 +5171,7 @@ void Cmd_Donate_f( gentity_t *ent ) {
ent->client->pers.netname, totals[ i ] / EVO_TO_CREDS_RATE ) );
trap_SendServerCommand( ent-g_entities,
va( "print \"Donated %.3f evo(s) to the cause.\n\"",
- total-value / EVO_TO_CREDS_RATE ) );
+ ( total - value ) / EVO_TO_CREDS_RATE ) );
}
else
{