267 |
{ |
{ |
268 |
} |
} |
269 |
|
|
270 |
|
px::V2 Floor::process_mouseforce (Actor *a, px::V2 force) |
271 |
|
{ |
272 |
|
int iplayer = 0; |
273 |
|
if (a->int_attrib("player", &iplayer) && iplayer==player::CurrentPlayer()) |
274 |
|
return mousefactor() * force; |
275 |
|
else |
276 |
|
return V2(); |
277 |
|
} |
278 |
|
|
279 |
|
|
280 |
//---------------------------------------- |
//---------------------------------------- |
281 |
// Abyss |
// Abyss |
282 |
//---------------------------------------- |
//---------------------------------------- |
551 |
change_state(CLOSED); |
change_state(CLOSED); |
552 |
} |
} |
553 |
|
|
|
#if 0 |
|
554 |
|
|
555 |
class WhiteTile : public Floor { |
//---------------------------------------- |
556 |
public: |
// Black and white tiles |
557 |
V2 get_force(Actor *a, V2 mouseforce) { |
//---------------------------------------- |
558 |
if (a->get_attrib("blackball")) |
namespace |
559 |
return Floor::get_force(a, 0); |
{ |
|
else |
|
|
return Floor::get_force(a, mouseforce); |
|
|
} |
|
|
}; |
|
560 |
|
|
561 |
class BlackTile : public Floor { |
class BlackTile : public Floor { |
562 |
public: |
public: |
563 |
V2 get_force(Actor *a, V2 mouseforce) { |
BlackTile() : Floor ("fl-black", 5.0, 2.0) {} |
564 |
if (a->get_attrib("whiteball")) |
|
565 |
return Floor::get_force(a, 0); |
px::V2 process_mouseforce (Actor *a, px::V2 force) |
566 |
else |
{ |
567 |
return Floor::get_force(a, mouseforce); |
if (a->get_attrib("player") && player::CurrentPlayer() == 0) |
568 |
} |
return mousefactor() * force; |
569 |
}; |
else |
570 |
|
return V2(); |
571 |
|
} |
572 |
|
}; |
573 |
|
|
574 |
#endif |
class WhiteTile : public Floor { |
575 |
|
public: |
576 |
|
WhiteTile() : Floor ("fl-white", 5.0, 2.0) {} |
577 |
|
|
578 |
|
px::V2 process_mouseforce (Actor *a, px::V2 force) |
579 |
|
{ |
580 |
|
if (a->get_attrib("player") && player::CurrentPlayer() == 1) |
581 |
|
return mousefactor() * force; |
582 |
|
else |
583 |
|
return V2(); |
584 |
|
} |
585 |
|
}; |
586 |
|
} |
587 |
|
|
588 |
//====================================================================== |
//====================================================================== |
589 |
// STONES |
// STONES |
747 |
add_templ(new Bridge); |
add_templ(new Bridge); |
748 |
add_templ("fl-bridge-open", new Bridge(true)); |
add_templ("fl-bridge-open", new Bridge(true)); |
749 |
add_templ("fl-bridge-closed", new Bridge(false)); |
add_templ("fl-bridge-closed", new Bridge(false)); |
750 |
|
add_templ(new WhiteTile); |
751 |
|
add_templ(new BlackTile); |
752 |
|
|
753 |
add_templ(new Gradient); |
add_templ(new Gradient); |
754 |
add_templ("fl-gradient1", new Gradient(1)); |
add_templ("fl-gradient1", new Gradient(1)); |