diff -up userpoints/userpoints.install userpoints.new/userpoints.install
--- userpoints/userpoints.install	2009-03-29 15:13:04.000000000 -0400
+++ userpoints/userpoints.install	2009-03-30 10:27:05.000000000 -0400
@@ -1,5 +1,5 @@
 <?php
-// $Id: userpoints.install,v 1.15.2.3 2009/03/29 19:13:04 kbahey Exp $
+// $Id: userpoints.install,v 1.15.2.2 2009/01/09 08:41:49 jredding Exp $
 
 /**
  * Implementation of hook_schema().
@@ -243,3 +243,16 @@ function userpoints_update_6010() {
   $ret[] = update_sql("UPDATE {permission} SET perm = REPLACE(perm, 'admin userpoints', 'administer userpoints') WHERE perm LIKE '%admin userpoints%'");
   return $ret;
 }
+
+function userpoints_update_6011() {
+  $ret = array();
+  db_change_field($ret, 'userpoints_txn', 'points', 'points', array('type' => 'float', 'not null' => true, 'default' => 0));
+  db_change_field($ret, 'userpoints', 'points', 'points', array('type' => 'float', 'not null' => true, 'default' => 0));
+  db_change_field($ret, 'userpoints', 'max_points', 'max_points', array('type' => 'float', 'not null' => true, 'default' => 0));
+  return $ret;
+}
+
+
+
+
+
diff -up userpoints/userpoints.module userpoints.new/userpoints.module
--- userpoints/userpoints.module	2009-02-17 10:21:23.000000000 -0500
+++ userpoints/userpoints.module	2009-03-29 22:07:27.000000000 -0400
@@ -440,9 +440,9 @@ function userpoints_get_current_points($
     $tid = userpoints_get_default_tid();
   }
   elseif ($tid == 'all') {
-    return (int)db_result(db_query('SELECT SUM(points) FROM {userpoints} WHERE uid = %d', $uid));
+    return (float)db_result(db_query('SELECT SUM(points) FROM {userpoints} WHERE uid = %d', $uid));
   }
-  return (int)db_result(db_query('SELECT points FROM {userpoints} WHERE uid = %d AND tid = %d', $uid, $tid));
+  return (float)db_result(db_query('SELECT SUM(points) FROM {userpoints} WHERE uid = %d AND tid = %d', $uid, $tid));
 }
 
 /**
@@ -459,9 +459,9 @@ function userpoints_get_max_points($uid 
     $tid = userpoints_get_default_tid();
   }
   elseif ($tid == 'all') {
-    return (int)db_result(db_query('SELECT SUM(max_points) FROM {userpoints} WHERE uid = %d',  $uid));
+    return (float)db_result(db_query('SELECT SUM(max_points) FROM {userpoints} WHERE uid = %d',  $uid));
   }
-  return (int)db_result(db_query('SELECT max_points FROM {userpoints} WHERE uid = %d AND tid = %d', $uid, $tid));
+  return (float)db_result(db_query('SELECT max_points FROM {userpoints} WHERE uid = %d AND tid = %d', $uid, $tid));
 }
 
 /**
@@ -709,7 +709,7 @@ function _userpoints_transaction(&$param
     $ret = db_query("INSERT INTO {userpoints_txn}
       (uid, points, time_stamp, status, operation, description, 
       reference, expirydate, expired, parent_txn_id, tid, entity_id, entity_type)
-      VALUES (%d, %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, %d, %d, '%s')",
+      VALUES (%d, %f, %d, %d, '%s', '%s', '%s', %d, %d, %d, %d, %d, '%s')",
       $params['uid'],
       $params['points'],
       time(),
@@ -744,19 +744,19 @@ function _userpoints_update_cache(&$para
   }
 
   // Calculate the current points based upon the tid
-  $current_points = (int)$params['points'] + userpoints_get_current_points($params['uid'], $params['tid']);
+  $current_points = (float)$params['points'] + userpoints_get_current_points($params['uid'], $params['tid']);
   //Grab the user's maximum points to preserve it
   $max_points = db_result(db_query('SELECT max_points FROM {userpoints} WHERE uid = %d AND tid = %d',
     $params['uid'], $params['tid']));
   if ($params['points'] > 0) {
     //points are greater than zero, update their max_points
-    $max_points = (int)$params['points'] + (int)$max_points;
+    $max_points = (float)$params['points'] + (float)$max_points;
   }
 
   // insert or update the userpoints caching table with the user's current points
   if (_userpoints_user_exists($params['uid'], $params['tid'])) {
     db_query("UPDATE {userpoints}
-              SET points = %d, max_points = %d, last_update = %d 
+              SET points = %f, max_points = %f, last_update = %d 
               WHERE uid = %d AND tid = %d",
               $current_points,
               $max_points,
@@ -768,7 +768,7 @@ function _userpoints_update_cache(&$para
   else {
     $result = db_query("INSERT INTO {userpoints}
      (uid, points, max_points, last_update, tid)
-      VALUES (%d, %d, %d, %d, %d )",
+      VALUES (%d, %f, %f, %d, %d )",
       $params['uid'],
       $current_points,
       $max_points,
@@ -1474,7 +1474,7 @@ function userpoints_block($op = 'list', 
         if ($delta == -1) {
           $title = t('@user\'s !points', array_merge(array('@user' => $user->name), userpoints_translation()));;
           if ($user->uid) {
-            $points = (int) db_result(db_query('SELECT points FROM {userpoints} WHERE uid = %d', $user->uid));
+            $points = (float) db_result(db_query('SELECT points FROM {userpoints} WHERE uid = %d', $user->uid));
             $show_points = format_plural($points, '!point', '!points', userpoints_translation());
             $content = t('You have %p %c', array('%p' => $points, '%c' => $show_points));
           }
