mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-06-17 10:49:58 +00:00
fived bugs with moving the key with boats
This commit is contained in:
parent
8da22c4ba9
commit
d04416dae8
|
@ -390,14 +390,15 @@ EX void moveItem1(cell *from, cell *to, bool activateYendor) {
|
||||||
if(xnew && activateYendor) yendor::check(from);
|
if(xnew && activateYendor) yendor::check(from);
|
||||||
for(int i=0; i<isize(yendor::yi); i++)
|
for(int i=0; i<isize(yendor::yi); i++)
|
||||||
if(yendor::yi[i].path[0] == from)
|
if(yendor::yi[i].path[0] == from)
|
||||||
yendor::yi[i].path[0] = to;
|
changes.value_set(yendor::yi[i].path[0], to);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(from->item == itKey) {
|
if(from->item == itKey) {
|
||||||
for(int i=0; i<isize(yendor::yi); i++) if(yendor::yi[i].path[YDIST-1] == from)
|
for(int i=0; i<isize(yendor::yi); i++) if(yendor::yi[i].path[YDIST-1] == from) {
|
||||||
yendor::yi[i].path[YDIST-1] = to;
|
changes.value_set(yendor::yi[i].path[YDIST-1], to);
|
||||||
|
}
|
||||||
for(int i=0; i<isize(yendor::yi); i++) if(yendor::yi[i].actualKey == from)
|
for(int i=0; i<isize(yendor::yi); i++) if(yendor::yi[i].actualKey == from)
|
||||||
yendor::yi[i].actualKey = to;
|
changes.value_set(yendor::yi[i].actualKey, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(from->item == itBabyTortoise || to->item == itBabyTortoise) {
|
if(from->item == itBabyTortoise || to->item == itBabyTortoise) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user