Fixed a few segmentation faults caused by assertion failures.
This commit is contained in:
parent
e7bfbc3966
commit
389eac4ee7
@ -81,7 +81,7 @@ void Player::SetCamera(void) {
|
|||||||
|
|
||||||
void Player::Move() {
|
void Player::Move() {
|
||||||
Character::Move();
|
Character::Move();
|
||||||
if(map->GetMapTransitionName(tileX, tileY) != "n") {
|
if(map->GetMapTransitionName(tileX, tileY) != "null") {
|
||||||
SetXY(map->GetMapTransitionX(tileX, tileY), map->GetMapTransitionY(tileX, tileY));
|
SetXY(map->GetMapTransitionX(tileX, tileY), map->GetMapTransitionY(tileX, tileY));
|
||||||
map->Load(map->GetMapTransitionName(tileX, tileY));
|
map->Load(map->GetMapTransitionName(tileX, tileY));
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ void Map::Load(const string filename) {
|
|||||||
// </solidEntity>
|
// </solidEntity>
|
||||||
|
|
||||||
// <zlevel>
|
// <zlevel>
|
||||||
dataElem = dataElem->NextSiblingElement("zlevel");
|
dataElem = dataElem->NextSiblingElement("zLevel");
|
||||||
assert(dataElem != NULL);
|
assert(dataElem != NULL);
|
||||||
m_tile[x][y].SetZLevel(atoi(dataElem->GetText()));
|
m_tile[x][y].SetZLevel(atoi(dataElem->GetText()));
|
||||||
// </zlevel>
|
// </zlevel>
|
||||||
|
Loading…
Reference in New Issue
Block a user