/[enigma]/enigma/src/objects.cc
ViewVC logotype

Diff of /enigma/src/objects.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.117 by dheck, Tue Sep 9 19:20:23 2003 UTC revision 1.117.2.1 by dheck, Fri Sep 19 17:45:18 2003 UTC
# Line 1130  world::SendExplosionEffect(GridPos cente Line 1130  world::SendExplosionEffect(GridPos cente
1130      int       yoff[AFFECTED_FIELDS] = { 1,-1, 0, 0, 1, 1,-1,-1 };      int       yoff[AFFECTED_FIELDS] = { 1,-1, 0, 0, 1, 1,-1,-1 };
1131    
1132      for (int a = 0; a<AFFECTED_FIELDS; ++a) {      for (int a = 0; a<AFFECTED_FIELDS; ++a) {
1133          GridPos  dest(center.x+xoff[a], center.y+yoff[a]);          GridPos  dest(center.x+xoff[a], center.y+yoff[a]);
1134          Item    *item            = GetItem(dest);          Item    *item            = GetItem(dest);
1135          Stone   *stone           = GetStone(dest);          Stone   *stone           = GetStone(dest);
1136          bool     direct_neighbor = a<4;          bool     direct_neighbor = a<4;
1137    
1138          switch (type) {          switch (type) {
1139              case DYNAMITE:          case DYNAMITE:
1140                  if (stone) SendMessage(stone, "ignite");              if (stone) SendMessage(stone, "ignite");
1141                  if (item) SendMessage(item, "ignite");              if (item) SendMessage(item, "ignite");
1142                  break;              break;
1143    
1144              case BLACKBOMB:          case BLACKBOMB:
1145              case WHITEBOMB:          case WHITEBOMB:
1146                  if (direct_neighbor) {              if (direct_neighbor) {
1147                      if (stone) SendMessage(stone, "expl");                  if (stone) SendMessage(stone, "expl");
1148                      if (item) {                  if (item) {
1149                          SendMessage(item, "expl");                      SendMessage(item, "expl");
1150                      }                  }
1151                      else {                  else {
1152                          SetItem(dest, MakeItem(type == BLACKBOMB                      SetItem(dest, MakeItem(type == BLACKBOMB
1153                                                 ? "it-explosion1"                                             ? "it-explosion1"
1154                                                 : "it-explosion3"));                                             : "it-explosion3"));
1155                      }                  }
1156                  }              }
1157                  break;              break;
1158    
1159              case BOMBSTONE:          case BOMBSTONE:
1160                  if (direct_neighbor) {              if (direct_neighbor) {
1161                      if (stone) SendMessage(stone, "bombstone");                  if (stone) SendMessage(stone, "bombstone");
1162                      if (item) SendMessage(item, "bombstone");                  if (item) SendMessage(item, "bombstone");
1163                  }              }
1164                  break;              break;
1165          }          }
1166      }      }
1167  }  }
1168    

Legend:
Removed from v.1.117  
changed lines
  Added in v.1.117.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26