1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 14:26:01 +00:00

more fixes to multiplayer

This commit is contained in:
Zeno Rogue
2021-03-06 11:46:13 +01:00
parent 032a6b6df2
commit 40d450676e
15 changed files with 97 additions and 92 deletions

View File

@@ -442,14 +442,12 @@ EX namespace inv {
void evokeOrb(eItem it) {
if(it == itOrbFreedom)
for(int i=0; i<numplayers(); i++)
if(multi::playerActive(i))
checkFreedom(playerpos(i));
for(cell *pc: player_positions())
checkFreedom(pc);
if(it == itOrbBeauty) {
for(int i=0; i<numplayers(); i++)
if(multi::playerActive(i))
evokeBeautyAt(playerpos(i));
for(cell *pc: player_positions())
evokeBeautyAt(pc);
if(items[itOrbEmpathy])
for(cell *c: dcal) if(isFriendly(c->monst))
evokeBeautyAt(c);
@@ -464,12 +462,11 @@ EX namespace inv {
}
if(it == itOrbSword || it == itOrbSword2) {
for(int i=0; i<numplayers(); i++)
if(multi::playerActive(i)) {
cwt.at = playerpos(i);
multi::cpid = i;
swordAttackStatic(it == itOrbSword2);
}
for(int i: player_indices()) {
cwt.at = playerpos(i);
multi::cpid = i;
swordAttackStatic(it == itOrbSword2);
}
}
}