mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
GetWeaponType returns -2 for picks and -3 for probes (feature #5031)
This commit is contained in:
parent
0cea76c684
commit
62482657fc
2 changed files with 18 additions and 1 deletions
|
@ -113,6 +113,7 @@
|
||||||
Feature #4994: Persistent pinnable windows hiding
|
Feature #4994: Persistent pinnable windows hiding
|
||||||
Feature #5000: Compressed BSA format support
|
Feature #5000: Compressed BSA format support
|
||||||
Feature #5010: Native graphics herbalism support
|
Feature #5010: Native graphics herbalism support
|
||||||
|
Feature #5031: Make GetWeaponType function return different values for tools
|
||||||
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
Task #4686: Upgrade media decoder to a more current FFmpeg API
|
||||||
Task #4695: Optimize Distant Terrain memory consumption
|
Task #4695: Optimize Distant Terrain memory consumption
|
||||||
Task #4721: Add NMake support to the Windows prebuild script
|
Task #4721: Add NMake support to the Windows prebuild script
|
||||||
|
|
|
@ -354,11 +354,27 @@ namespace MWScript
|
||||||
|
|
||||||
const MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore (ptr);
|
const MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore (ptr);
|
||||||
MWWorld::ConstContainerStoreIterator it = invStore.getSlot (MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::ConstContainerStoreIterator it = invStore.getSlot (MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
if (it == invStore.end() || it->getTypeName () != typeid(ESM::Weapon).name())
|
if (it == invStore.end())
|
||||||
{
|
{
|
||||||
runtime.push(-1);
|
runtime.push(-1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (it->getTypeName() != typeid(ESM::Weapon).name())
|
||||||
|
{
|
||||||
|
if (it->getTypeName() == typeid(ESM::Lockpick).name())
|
||||||
|
{
|
||||||
|
runtime.push(-2);
|
||||||
|
}
|
||||||
|
else if (it->getTypeName() == typeid(ESM::Probe).name())
|
||||||
|
{
|
||||||
|
runtime.push(-3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
runtime.push(-1);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
runtime.push(it->get<ESM::Weapon>()->mBase->mData.mType);
|
runtime.push(it->get<ESM::Weapon>()->mBase->mData.mType);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue