Improved how powerbitfields are stored allowing a quicker searches of powers to be...
authornveid <nveid@cobramush.org>
Thu, 5 Apr 2007 05:51:13 +0000 (05:51 +0000)
committerAri Johnson <ari@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +0000)
(cherry picked from commit 2b0b4ec9739d23d1d1d52f9e85762eabfa5ba249)

game/txt/changes/0.73
src/division.c

index 1fc8e5a49fc55ff29247a0b2a82dc2287fdefff6..53eefba2dbca745b3caf331b8ca5dc2f69e79c9f 100644 (file)
@@ -4,6 +4,8 @@ CobraMUSH Version 0.73
   interest to the user.
   (See 'changes entries' for a list of all versions.)
 
+ Minor:
+   * Improved how power bitfields are stored. [RLB]
  Flags:
    * LEAVE_BEHIND - When a player leaves the location of 
      someone they're flowing with this flag it unfollows
index cfb761dc089a231ad7a4ed914a2a235287fd6e17..d0db9091466b19c401df6dac3bfd7013932134c9 100644 (file)
@@ -650,10 +650,8 @@ powergroup_db_set(dbref executor, dbref player, const char *powergroup,
             switch (ycode) {
             case YES:
               GIVE_DPBIT(player, power->flag_yes);
-              break;
             case YESLTE:
               GIVE_DPBIT(player, power->flag_lte);
-              break;
             case YESLT:
               GIVE_DPBIT(player, power->flag_lt);
               break;
@@ -1040,10 +1038,8 @@ rem_pg_from_player(dbref player, POWERGROUP * powergroup)
         switch (ycode) {
         case YES:
           GIVE_DPBIT(player, power->flag_yes);
-          break;
         case YESLTE:
           GIVE_DPBIT(player, power->flag_lte);
-          break;
         case YESLT:
           GIVE_DPBIT(player, power->flag_lt);
           break;
@@ -1790,10 +1786,8 @@ division_empower(dbref exec, dbref target, const char *arg2)
     switch (flag) {
     case YES:
       GIVE_DPBIT(target, power->flag_yes);
-      break;
     case YESLTE:
       GIVE_DPBIT(target, power->flag_lte);
-      break;
     case YESLT:
       GIVE_DPBIT(target, power->flag_lt);
       break;
@@ -2016,7 +2010,6 @@ adjust_powers(dbref obj, dbref to)
         switch (plev) {
         case YESLTE:
           GIVE_DPBIT(obj, power->flag_lte);
-          break;
         case YESLT:
           GIVE_DPBIT(obj, power->flag_lt);
           break;
@@ -2257,6 +2250,8 @@ convert_object_powers(dbref dbnum, int opbts)
     if (opbts & pconv_ptab[i].Op) {     /* give them the power in its new 'full yes' form */
       power = find_power(pconv_ptab[i].Name);
       GIVE_DPBIT(dbnum, power->flag_yes);
+      GIVE_DPBIT(dbnum, power->flag_lte);
+      GIVE_DPBIT(dbnum, power->flag_lt);
     }
 
   if (opbts & IS_GUEST) {