mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-01 01:51:34 +00:00
[Client] Fix declarations hiding class members
This commit is contained in:
parent
56c3ef71ae
commit
c702eab93c
8 changed files with 25 additions and 24 deletions
|
@ -333,22 +333,22 @@ void DedicatedActor::playSound()
|
|||
}
|
||||
}
|
||||
|
||||
bool DedicatedActor::hasItem(std::string refId, int charge)
|
||||
bool DedicatedActor::hasItem(std::string itemId, int charge)
|
||||
{
|
||||
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
||||
{
|
||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), refId) && itemPtr.getCellRef().getCharge() == charge)
|
||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), itemId) && itemPtr.getCellRef().getCharge() == charge)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void DedicatedActor::equipItem(std::string refId, int charge)
|
||||
void DedicatedActor::equipItem(std::string itemId, int charge)
|
||||
{
|
||||
for (const auto &itemPtr : ptr.getClass().getInventoryStore(ptr))
|
||||
{
|
||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), refId) && itemPtr.getCellRef().getCharge() == charge)
|
||||
if (::Misc::StringUtils::ciEqual(itemPtr.getCellRef().getRefId(), itemId) && itemPtr.getCellRef().getCharge() == charge)
|
||||
{
|
||||
std::shared_ptr<MWWorld::Action> action = itemPtr.getClass().use(itemPtr);
|
||||
action->execute(ptr);
|
||||
|
|
|
@ -26,8 +26,8 @@ namespace mwmp
|
|||
void playAnimation();
|
||||
void playSound();
|
||||
|
||||
bool hasItem(std::string refId, int charge);
|
||||
void equipItem(std::string refId, int charge);
|
||||
bool hasItem(std::string itemId, int charge);
|
||||
void equipItem(std::string itemId, int charge);
|
||||
|
||||
MWWorld::Ptr getPtr();
|
||||
void setPtr(const MWWorld::Ptr& newPtr);
|
||||
|
|
|
@ -255,10 +255,10 @@ void DedicatedPlayer::setAnimFlags()
|
|||
ptr.getClass().getCreatureStats(ptr).getActiveSpells().purgeEffect(ESM::MagicEffect::Levitate);
|
||||
else if (isFlying && !world->isFlying(ptr))
|
||||
{
|
||||
MWMechanics::CastSpell cast(ptr, ptr);
|
||||
cast.mHitPosition = ptr.getRefData().getPosition().asVec3();
|
||||
cast.mAlwaysSucceed = true;
|
||||
cast.cast("Levitate");
|
||||
MWMechanics::CastSpell levitationCast(ptr, ptr);
|
||||
levitationCast.mHitPosition = ptr.getRefData().getPosition().asVec3();
|
||||
levitationCast.mAlwaysSucceed = true;
|
||||
levitationCast.cast("Levitate");
|
||||
}
|
||||
|
||||
MWMechanics::CreatureStats *ptrCreatureStats = &ptr.getClass().getCreatureStats(ptr);
|
||||
|
|
|
@ -250,8 +250,8 @@ namespace mwmp
|
|||
}
|
||||
}
|
||||
|
||||
void GUIChat::setDelay(float delay)
|
||||
void GUIChat::setDelay(float newDelay)
|
||||
{
|
||||
this->delay = delay;
|
||||
this->delay = newDelay;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace mwmp
|
|||
|
||||
void pressedChatMode(); //switch chat mode
|
||||
void pressedSay(); // switch chat focus (if chat mode != CHAT_DISABLED)
|
||||
void setDelay(float delay);
|
||||
void setDelay(float newDelay);
|
||||
|
||||
void update(float dt);
|
||||
|
||||
|
|
|
@ -329,9 +329,9 @@ ESM::CustomMarker mwmp::GUIController::createMarker(const RakNet::RakNetGUID &gu
|
|||
|
||||
void mwmp::GUIController::updatePlayersMarkers(MWGui::LocalMapBase *localMapBase)
|
||||
{
|
||||
std::vector<MyGUI::Widget*>::iterator it = localMapBase->mPlayerMarkerWidgets.begin();
|
||||
for (; it != localMapBase->mPlayerMarkerWidgets.end(); ++it)
|
||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||
std::vector<MyGUI::Widget*>::iterator markerWidgetIterator = localMapBase->mPlayerMarkerWidgets.begin();
|
||||
for (; markerWidgetIterator != localMapBase->mPlayerMarkerWidgets.end(); ++markerWidgetIterator)
|
||||
MyGUI::Gui::getInstance().destroyWidget(*markerWidgetIterator);
|
||||
localMapBase->mPlayerMarkerWidgets.clear();
|
||||
|
||||
for (int dX = -localMapBase->mCellDistance; dX <= localMapBase->mCellDistance; ++dX)
|
||||
|
@ -345,9 +345,10 @@ void mwmp::GUIController::updatePlayersMarkers(MWGui::LocalMapBase *localMapBase
|
|||
cellId.mIndex.mY = localMapBase->mCurY+dY;
|
||||
|
||||
PlayerMarkerCollection::RangeType markers = mPlayerMarkers.getMarkers(cellId);
|
||||
for (PlayerMarkerCollection::ContainerType::const_iterator it = markers.first; it != markers.second; ++it)
|
||||
for (PlayerMarkerCollection::ContainerType::const_iterator markerIterator = markers.first;
|
||||
markerIterator != markers.second; ++markerIterator)
|
||||
{
|
||||
const ESM::CustomMarker &marker = it->second;
|
||||
const ESM::CustomMarker &marker = markerIterator->second;
|
||||
|
||||
MWGui::LocalMapBase::MarkerUserData markerPos (localMapBase->mLocalMapRender);
|
||||
MyGUI::IntPoint widgetPos = localMapBase->getMarkerPosition(marker.mWorldX, marker.mWorldY, markerPos);
|
||||
|
|
|
@ -1345,12 +1345,12 @@ void LocalPlayer::setSelectedSpell()
|
|||
int(MWMechanics::getSpellSuccessChance(selectedSpellId, ptrPlayer)));
|
||||
}
|
||||
|
||||
void LocalPlayer::sendDeath(char deathState)
|
||||
void LocalPlayer::sendDeath(char newDeathState)
|
||||
{
|
||||
if (MechanicsHelper::isEmptyTarget(killer))
|
||||
killer = MechanicsHelper::getTarget(getPlayerPtr());
|
||||
|
||||
this->deathState = deathState;
|
||||
deathState = newDeathState;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_DEATH about myself to server\n- deathState: %d", deathState);
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_DEATH)->setPlayer(this);
|
||||
|
@ -1683,7 +1683,7 @@ void LocalPlayer::clearCurrentContainer()
|
|||
currentContainer.mpNum = 0;
|
||||
}
|
||||
|
||||
void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType)
|
||||
void LocalPlayer::storeCellState(const ESM::Cell& storedCell, int stateType)
|
||||
{
|
||||
std::vector<CellState>::iterator iter;
|
||||
|
||||
|
@ -1691,14 +1691,14 @@ void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType)
|
|||
{
|
||||
// If there's already a cell state recorded for this particular cell,
|
||||
// remove it
|
||||
if (cell.getDescription() == (*iter).cell.getDescription())
|
||||
if (storedCell.getDescription() == (*iter).cell.getDescription())
|
||||
iter = cellStateChanges.erase(iter);
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
|
||||
CellState cellState;
|
||||
cellState.cell = cell;
|
||||
cellState.cell = storedCell;
|
||||
cellState.type = stateType;
|
||||
|
||||
cellStateChanges.push_back(cellState);
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace mwmp
|
|||
void setMarkLocation();
|
||||
void setSelectedSpell();
|
||||
|
||||
void sendDeath(char deathState);
|
||||
void sendDeath(char newDeathState);
|
||||
void sendClass();
|
||||
void sendInventory();
|
||||
void sendItemChange(const mwmp::Item& item, unsigned int action);
|
||||
|
|
Loading…
Reference in a new issue