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

Diff of /enigma/src/stones_simple.cc

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

revision 1.23 by reallysoft, Wed Jun 25 19:35:53 2003 UTC revision 1.24 by dheck, Thu Jun 26 17:25:20 2003 UTC
# Line 994  namespace Line 994  namespace
994          SwitchStone() : OnOffStone("st-switch") {}          SwitchStone() : OnOffStone("st-switch") {}
995      private:      private:
996          void init_model() {          void init_model() {
997              set_model(is_on() ? "st-switch1" : "st-switch0");              set_model(is_on() ? "st-switch1" : "st-switch2");
998          }          }
999    
1000          void actor_hit(const StoneContact &/*sc*/) {          void actor_hit(const StoneContact &/*sc*/) {
# Line 1025  namespace Line 1025  namespace
1025          Switch_black() : OnOffStone("st-switch_black") {}          Switch_black() : OnOffStone("st-switch_black") {}
1026      private:      private:
1027          void init_model() {          void init_model() {
1028              set_model(is_on() ? "st-switch_black1" : "st-switch_black0");              set_model(is_on() ? "st-switch_black1" : "st-switch_black2");
1029          }          }
1030    
1031          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
# Line 1059  namespace Line 1059  namespace
1059          Switch_white() : OnOffStone("st-switch_white") {}          Switch_white() : OnOffStone("st-switch_white") {}
1060      private:      private:
1061          void init_model() {          void init_model() {
1062              set_model(is_on() ? "st-switch_white1" : "st-switch_white0");              set_model(is_on() ? "st-switch_white1" : "st-switch_white2");
1063          }          }
1064    
1065          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
# Line 1389  namespace Line 1389  namespace
1389                  set_anim("st-thief-anim");                  set_anim("st-thief-anim");
1390                  if (player::Inventory *inv = get_inventory(sc.actor))                  if (player::Inventory *inv = get_inventory(sc.actor))
1391                  {                  {
1392                      int i = int(inv->size() * (rand()/(RAND_MAX+1.0)));                      int i = IntegerRand (0, inv->size()-1);
1393                      delete inv->yield_item(i);                      delete inv->yield_item(i);
1394    
1395                      play_sound("thief");                      play_sound("thief");

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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