forked from mirror/openmw-tes3mp
Make player markers work in interiors and make them easier to test
This commit is contained in:
parent
2e81034e53
commit
07acd7a721
1 changed files with 16 additions and 2 deletions
|
@ -150,14 +150,17 @@ bool mwmp::GUIController::pressedKey(int key)
|
||||||
printf("mwmp::GUIController::pressedKey.newFocus: %s.\n", newFocus ? newFocus->getName().c_str() : "nil");*/
|
printf("mwmp::GUIController::pressedKey.newFocus: %s.\n", newFocus ? newFocus->getName().c_str() : "nil");*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(key == SDLK_RETURN)
|
else if(key == SDLK_BACKSPACE)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
static bool test = true;
|
static bool test = true;
|
||||||
if(test)
|
if(test)
|
||||||
{
|
{
|
||||||
test = false;
|
test = false;
|
||||||
SetMapVisibility(0, true);
|
SetMapVisibility(0, true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
SetMapVisibility(0, true);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +245,18 @@ void mwmp::GUIController::SetMapVisibility(int pid, bool state)
|
||||||
|
|
||||||
mEditingMarker.mWorldX = world->getPlayerPtr().getRefData().getPosition().pos[0];
|
mEditingMarker.mWorldX = world->getPlayerPtr().getRefData().getPosition().pos[0];
|
||||||
mEditingMarker.mWorldY = world->getPlayerPtr().getRefData().getPosition().pos[1];
|
mEditingMarker.mWorldY = world->getPlayerPtr().getRefData().getPosition().pos[1];
|
||||||
|
|
||||||
|
mEditingMarker.mCell.mPaged = ptrCell->isExterior();
|
||||||
|
|
||||||
|
if (!ptrCell->isExterior())
|
||||||
|
mEditingMarker.mCell.mWorldspace = ptrCell->mName;
|
||||||
|
else
|
||||||
|
{
|
||||||
mEditingMarker.mCell.mWorldspace = ESM::CellId::sDefaultWorldspace;
|
mEditingMarker.mCell.mWorldspace = ESM::CellId::sDefaultWorldspace;
|
||||||
|
mEditingMarker.mCell.mIndex.mX = ptrCell->getGridX();
|
||||||
|
mEditingMarker.mCell.mIndex.mY = ptrCell->getGridY();
|
||||||
|
}
|
||||||
|
|
||||||
mPlayerMarkers.addMarker(mEditingMarker, true);
|
mPlayerMarkers.addMarker(mEditingMarker, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue