Merge pull request #460 from OpenMW/master

Add 0.7.0 commits up to 20 Jul 2018
pull/471/head
David Cernat 7 years ago committed by GitHub
commit 21d5bb4d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,6 +67,8 @@
Bug #4496: SpellTurnLeft and SpellTurnRight animation groups are unused
Bug #4497: File names starting with x or X are not classified as animation
Bug #4503: Cast and ExplodeSpell commands increase alteration skill
Bug #4510: Division by zero in MWMechanics::CreatureStats::setAttribute
Bug #4519: Knockdown does not discard movement in the 1st-person mode
Feature #2606: Editor: Implemented (optional) case sensitive global search
Feature #3083: Play animation when NPC is casting spell via script
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
@ -78,7 +80,10 @@
Feature #4404: Editor: All EnumDelegate fields should have their items sorted alphabetically
Feature #4444: Per-group KF-animation files support
Feature #4466: Editor: Add option to ignore "Base" records when running verifier
Feature #4488: Make water shader rougher during rain
Feature #4012: Editor: Write a log file if OpenCS crashes
Feature #4509: Show count of enchanted items in stack in the spells list
Feature #4512: Editor: Use markers for lights and creatures levelled lists
Task #2490: Don't open command prompt window on Release-mode builds automatically
0.44.0

@ -102,6 +102,14 @@ void CSVRender::Object::update()
if (recordType == CSMWorld::UniversalId::Type_Light)
{
light = &dynamic_cast<const CSMWorld::Record<ESM::Light>& >(referenceables.getRecord(index)).get();
if (model.empty())
model = "marker_light.nif";
}
if (recordType == CSMWorld::UniversalId::Type_CreatureLevelledList)
{
if (model.empty())
model = "marker_creature.nif";
}
if (model.empty())

@ -32,7 +32,7 @@ void CSVWorld::DataDisplayDelegate::buildPixmaps ()
while (it != mIcons.end())
{
mPixmaps.push_back (std::make_pair (it->first, it->second.pixmap (mIconSize) ) );
mPixmaps.push_back (std::make_pair (it->mValue, it->mIcon.pixmap (mIconSize) ) );
++it;
}
}
@ -142,9 +142,23 @@ void CSVWorld::DataDisplayDelegate::settingChanged (const CSMPrefs::Setting *set
void CSVWorld::DataDisplayDelegateFactory::add (int enumValue, const QString& enumName, const QString& iconFilename)
{
mIcons.push_back (std::make_pair(enumValue, QIcon(iconFilename)));
EnumDelegateFactory::add(enumValue, enumName);
Icon icon;
icon.mValue = enumValue;
icon.mName = enumName;
icon.mIcon = QIcon(iconFilename);
for (auto it=mIcons.begin(); it!=mIcons.end(); ++it)
{
if (it->mName > enumName)
{
mIcons.insert(it, icon);
return;
}
}
mIcons.push_back(icon);
}
CSVWorld::CommandDelegate *CSVWorld::DataDisplayDelegateFactory::makeDelegate (

@ -11,11 +11,18 @@ namespace CSMPrefs
namespace CSVWorld
{
struct Icon
{
int mValue;
QIcon mIcon;
QString mName;
};
class DataDisplayDelegate : public EnumDelegate
{
public:
typedef std::vector < std::pair < int, QIcon > > IconList;
typedef std::vector<Icon> IconList;
typedef std::vector<std::pair<int, QString> > ValueList;
protected:

@ -652,6 +652,9 @@ namespace MWClass
float Creature::getSpeed(const MWWorld::Ptr &ptr) const
{
MWMechanics::CreatureStats& stats = getCreatureStats(ptr);
if (stats.isParalyzed() || stats.getKnockedDown() || stats.isDead())
return 0.f;
const GMST& gmst = getGmst();
float walkSpeed = gmst.fMinWalkSpeedCreature->getFloat() + 0.01f * stats.getAttribute(ESM::Attribute::Speed).getModified()

@ -1096,6 +1096,10 @@ namespace MWClass
float Npc::getSpeed(const MWWorld::Ptr& ptr) const
{
const MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats(ptr);
if (stats.isParalyzed() || stats.getKnockedDown() || stats.isDead())
return 0.f;
const MWBase::World *world = MWBase::Environment::get().getWorld();
const GMST& gmst = getGmst();
@ -1104,8 +1108,8 @@ namespace MWClass
const float normalizedEncumbrance = getNormalizedEncumbrance(ptr);
bool sneaking = ptr.getClass().getCreatureStats(ptr).getStance(MWMechanics::CreatureStats::Stance_Sneak);
bool running = ptr.getClass().getCreatureStats(ptr).getStance(MWMechanics::CreatureStats::Stance_Run);
bool sneaking = stats.getStance(MWMechanics::CreatureStats::Stance_Sneak);
bool running = stats.getStance(MWMechanics::CreatureStats::Stance_Run);
float walkSpeed = gmst.fMinWalkSpeed->getFloat() + 0.01f*npcdata->mNpcStats.getAttribute(ESM::Attribute::Speed).getModified()*
(gmst.fMaxWalkSpeed->getFloat() - gmst.fMinWalkSpeed->getFloat());

@ -80,6 +80,7 @@ namespace MWGui
newSpell.mSelected = (MWBase::Environment::get().getWindowManager()->getSelectedSpell() == spell->mId);
newSpell.mActive = true;
newSpell.mCount = 1;
mSpells.push_back(newSpell);
}
@ -109,6 +110,7 @@ namespace MWGui
newSpell.mItem = item;
newSpell.mId = item.getCellRef().getRefId();
newSpell.mName = item.getClass().getName(item);
newSpell.mCount = item.getRefData().getCount();
newSpell.mType = Spell::Type_EnchantedItem;
newSpell.mSelected = invStore.getSelectedEnchantItem() == it;

@ -20,6 +20,7 @@ namespace MWGui
std::string mCostColumn; // Cost/chance or Cost/charge
std::string mId; // Item ID or spell ID
MWWorld::Ptr mItem; // Only for Type_EnchantedItem
int mCount; // Only for Type_EnchantedItem
bool mSelected; // Is this the currently selected spell/item (only one can be selected at a time)
bool mActive; // (Items only) is the item equipped?

@ -7,6 +7,8 @@
#include <components/widgets/sharedstatebutton.hpp>
#include "tooltips.hpp"
namespace MWGui
{
@ -103,11 +105,12 @@ namespace MWGui
}
const std::string skin = spell.mActive ? "SandTextButton" : "SpellTextUnequipped";
const std::string captionSuffix = MWGui::ToolTips::getCountString(spell.mCount);
Gui::SharedStateButton* t = mScrollView->createWidget<Gui::SharedStateButton>(skin,
MyGUI::IntCoord(0, 0, 0, spellHeight), MyGUI::Align::Left | MyGUI::Align::Top);
t->setNeedKeyFocus(true);
t->setCaption(spell.mName);
t->setCaption(spell.mName + captionSuffix);
t->setTextAlign(MyGUI::Align::Left);
adjustSpellWidget(spell, i, t);
@ -163,7 +166,8 @@ namespace MWGui
// more checking for major change.
const Spell& spell = mModel->getItem(spellIndex);
if (nameButton->getCaption() != spell.mName)
const std::string captionSuffix = MWGui::ToolTips::getCountString(spell.mCount);
if (nameButton->getCaption() != (spell.mName + captionSuffix))
{
fullUpdateRequired = true;
break;

@ -1289,12 +1289,17 @@ bool CharacterController::updateWeaponState()
&& mUpperBodyState != UpperCharState_UnEquipingWeap
&& !isStillWeapon)
{
// Note: we do not disable unequipping animation automatically to avoid body desync
getWeaponGroup(mWeaponType, weapgroup);
mAnimation->play(weapgroup, priorityWeapon,
MWRender::Animation::BlendMask_All, false,
1.0f, "unequip start", "unequip stop", 0.0f, 0);
mUpperBodyState = UpperCharState_UnEquipingWeap;
// We can not play un-equip animation when we switch to HtH
// because we already un-equipped weapon
if (weaptype != WeapType_HandToHand || mWeaponType == WeapType_Spell)
{
// Note: we do not disable unequipping animation automatically to avoid body desync
getWeaponGroup(mWeaponType, weapgroup);
mAnimation->play(weapgroup, priorityWeapon,
MWRender::Animation::BlendMask_All, false,
1.0f, "unequip start", "unequip stop", 0.0f, 0);
mUpperBodyState = UpperCharState_UnEquipingWeap;
}
if(!downSoundId.empty())
{

@ -168,7 +168,7 @@ namespace MWMechanics
int endurance = getAttribute(ESM::Attribute::Endurance).getModified();
DynamicStat<float> fatigue = getFatigue();
float diff = (strength+willpower+agility+endurance) - fatigue.getBase();
float currentToBaseRatio = (fatigue.getCurrent() / fatigue.getBase());
float currentToBaseRatio = fatigue.getBase() > 0 ? (fatigue.getCurrent() / fatigue.getBase()) : 0;
fatigue.setModified(fatigue.getModified() + diff, 0);
fatigue.setCurrent(fatigue.getBase() * currentToBaseRatio);
setFatigue(fatigue);

@ -32,6 +32,10 @@ namespace bfs = boost::filesystem;
#include <signal.h>
#endif
#if defined(__APPLE__)
#include <sys/sysctl.h>
#endif
#define UNUSED(x) (void)(x)
static const char crash_switch[] = "--cc-handle-crash";
@ -460,6 +464,7 @@ int crashCatcherInstallHandlers(int argc, char **argv, int num_signals, int *sig
static bool is_debugger_present()
{
#if !defined (__APPLE__)
bfs::ifstream file((bfs::path("/proc/self/status")));
while (!file.eof())
{
@ -472,6 +477,35 @@ static bool is_debugger_present()
}
}
return false;
#else
int junk;
int mib[4];
struct kinfo_proc info;
size_t size;
// Initialize the flags so that, if sysctl fails for some bizarre
// reason, we get a predictable result.
info.kp_proc.p_flag = 0;
// Initialize mib, which tells sysctl the info we want, in this case
// we're looking for information about a specific process ID.
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PID;
mib[3] = getpid();
// Call sysctl.
size = sizeof(info);
junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
assert(junk == 0);
// We're being debugged if the P_TRACED flag is set.
return (info.kp_proc.p_flag & P_TRACED) != 0;
#endif
}
void crashCatcherInstall(int argc, char **argv, const std::string &crashLogPath)

@ -13,14 +13,19 @@ const float BIG_WAVES_Y = 0.1;
const float MID_WAVES_X = 0.1; // strength of middle sized waves
const float MID_WAVES_Y = 0.1;
const float MID_WAVES_RAIN_X = 0.2;
const float MID_WAVES_RAIN_Y = 0.2;
const float SMALL_WAVES_X = 0.1; // strength of small waves
const float SMALL_WAVES_Y = 0.1;
const float SMALL_WAVES_RAIN_X = 0.3;
const float SMALL_WAVES_RAIN_Y = 0.3;
const float WAVE_CHOPPYNESS = 0.05; // wave choppyness
const float WAVE_SCALE = 75.0; // overall wave scale
const float BUMP = 0.5; // overall water surface bumpiness
const float BUMP_RAIN = 2.5;
const float REFL_BUMP = 0.10; // reflection distortion amount
const float REFR_BUMP = 0.07; // refraction distortion amount
@ -183,22 +188,27 @@ void main(void)
vec3 rippleAdd = rainRipple.xyz * rainRipple.w * 10.0;
vec3 normal = (normal0 * BIG_WAVES_X + normal1 * BIG_WAVES_Y +
normal2 * MID_WAVES_X + normal3 * MID_WAVES_Y +
normal4 * SMALL_WAVES_X + normal5 * SMALL_WAVES_Y +
vec2 bigWaves = vec2(BIG_WAVES_X,BIG_WAVES_Y);
vec2 midWaves = mix(vec2(MID_WAVES_X,MID_WAVES_Y),vec2(MID_WAVES_RAIN_X,MID_WAVES_RAIN_Y),rainIntensity);
vec2 smallWaves = mix(vec2(SMALL_WAVES_X,SMALL_WAVES_Y),vec2(SMALL_WAVES_RAIN_X,SMALL_WAVES_RAIN_Y),rainIntensity);
float bump = mix(BUMP,BUMP_RAIN,rainIntensity);
vec3 normal = (normal0 * bigWaves.x + normal1 * bigWaves.y +
normal2 * midWaves.x + normal3 * midWaves.y +
normal4 * smallWaves.x + normal5 * smallWaves.y +
rippleAdd);
normal = normalize(vec3(normal.x * BUMP, normal.y * BUMP, normal.z));
normal = normalize(vec3(normal.x * bump, normal.y * bump, normal.z));
normal = vec3(-normal.x, -normal.y, normal.z);
// normal for sunlight scattering
vec3 lNormal = (normal0 * BIG_WAVES_X*0.5 + normal1 * BIG_WAVES_Y*0.5 +
normal2 * MID_WAVES_X*0.2 + normal3 * MID_WAVES_Y*0.2 +
normal4 * SMALL_WAVES_X*0.1 + normal5 * SMALL_WAVES_Y*0.1 +
vec3 lNormal = (normal0 * bigWaves.x * 0.5 + normal1 * bigWaves.y * 0.5 +
normal2 * midWaves.x * 0.2 + normal3 * midWaves.y * 0.2 +
normal4 * smallWaves.x * 0.1 + normal5 * smallWaves.y * 0.1 +
rippleAdd).xyz;
lNormal = normalize(vec3(lNormal.x * BUMP, lNormal.y * BUMP, lNormal.z));
lNormal = normalize(vec3(lNormal.x * bump, lNormal.y * bump, lNormal.z));
lNormal = vec3(-lNormal.x, -lNormal.y, lNormal.z);
vec3 lVec = normalize((gl_ModelViewMatrixInverse * vec4(gl_LightSource[0].position.xyz, 0.0)).xyz);

@ -0,0 +1,2 @@
# Don't build any extra formats
formats: []
Loading…
Cancel
Save