127 |
|
|
128 |
switch (it->activate(ac, p)) { |
switch (it->activate(ac, p)) { |
129 |
case world::ITEM_DROP: |
case world::ITEM_DROP: |
130 |
// only drop if no item underneath and floor allows it ### |
// only drop if no item underneath and actor allows it ### |
131 |
if (world::GetItem(p) == 0) { |
if (world::GetItem(p) == 0 && ac->can_drop_items()) { |
132 |
items.erase(items.begin()); |
items.erase(items.begin()); |
133 |
redraw(); |
redraw(); |
134 |
world::SetItem(p, it); |
world::SetItem(p, it); |
197 |
SetCurrentPlayer(0); |
SetCurrentPlayer(0); |
198 |
} |
} |
199 |
|
|
200 |
|
void |
201 |
|
player::LevelFinished() |
202 |
|
{ |
203 |
|
for (unsigned i=0; i<players.size(); ++i) |
204 |
|
{ |
205 |
|
if (Actor *a = players[i].main_actor) { |
206 |
|
world::GrabActor(a); |
207 |
|
display::ReplaceSprite(a->get_spriteid(), "ring-anim"); |
208 |
|
} |
209 |
|
} |
210 |
|
} |
211 |
|
|
212 |
|
|
213 |
Inventory * |
Inventory * |
214 |
player::GetInventory(int iplayer) |
player::GetInventory(int iplayer) |
215 |
{ |
{ |