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*/) { |
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) |
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) |
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"); |