Don't delete saves from other architectures on death
This commit is contained in:
parent
417e7d3cc8
commit
e636ec1e53
10
src/save.c
10
src/save.c
|
@ -40,7 +40,15 @@ DbQuery MIGRATE_COMMAND = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static
|
static
|
||||||
DbQuery CLEAR_SAVE = { "DELETE FROM saves", NULL, NULL };
|
DbQuery CLEAR_SAVE = {
|
||||||
|
"DELETE FROM saves "
|
||||||
|
#ifdef _WIN32
|
||||||
|
"WHERE arch = 1",
|
||||||
|
#else // _WIN32
|
||||||
|
"WHERE arch = 2",
|
||||||
|
#endif // _WIN32
|
||||||
|
NULL,
|
||||||
|
NULL };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_table(void)
|
create_table(void)
|
||||||
|
|
|
@ -888,10 +888,11 @@ skill_blink(Skill *skill, SkillData *data)
|
||||||
// Find collider
|
// Find collider
|
||||||
destination.x += (int) data->direction.x;
|
destination.x += (int) data->direction.x;
|
||||||
destination.y += (int) data->direction.y;
|
destination.y += (int) data->direction.y;
|
||||||
RoomSpace *space = &matrix->spaces[destination.x][destination.y];
|
|
||||||
Position lastAvailableDest = playerStartPos;
|
Position lastAvailableDest = playerStartPos;
|
||||||
while (position_in_roommatrix(&destination))
|
while (position_in_roommatrix(&destination))
|
||||||
{
|
{
|
||||||
|
RoomSpace *space = &matrix->spaces[destination.x][destination.y];
|
||||||
|
|
||||||
if (space->occupied) {
|
if (space->occupied) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -900,10 +901,9 @@ skill_blink(Skill *skill, SkillData *data)
|
||||||
lastAvailableDest = destination;
|
lastAvailableDest = destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
perform_pickups_for_space(space, player);
|
||||||
destination.x += (int) data->direction.x;
|
destination.x += (int) data->direction.x;
|
||||||
destination.y += (int) data->direction.y;
|
destination.y += (int) data->direction.y;
|
||||||
space = &matrix->spaces[destination.x][destination.y];
|
|
||||||
perform_pickups_for_space(space, player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
destination = lastAvailableDest;
|
destination = lastAvailableDest;
|
||||||
|
|
Loading…
Reference in New Issue