GetPCRunning behavior different from vanilla?

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
ImpendingDoom
Posts: 1
Joined: 08 Aug 2017, 04:36

GetPCRunning behavior different from vanilla?

Post by ImpendingDoom »

While trying to fix some of the issues with the various sailable ship mods (Fishing Academy, Stormrider, etc.) I ran into an issue with how OpenMW appears to handle the 'GetPCRunning' function. It appears that while vanilla Morrowind takes this as a command to check if the player is actually running, OpenMW just checks if run mode is active (ie. shift/capslock is pressed). This manifests itself in the script governing plyer control over the ship - when pressing W while in run mode, boats and ships immediately shoot up to maximum speed instead of gradually incrementing up with each keypress.

The offending segment of code is here:
Spoiler: Show
User avatar
akortunov
Posts: 900
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: GetPCRunning behavior different from vanilla?

Post by akortunov »

GetPCRunning indeed checks only run mode in OpenMW:

Code: Select all

MWWorld::Ptr ptr = MWBase::Environment::get().getWorld ()->getPlayerPtr();
runtime.push (ptr.getClass().getCreatureStats(ptr).getStance(MWMechanics::CreatureStats::Stance_Run));
GetPCSneaking behaves in the same way.
Can you investigate how these functions behave in vanilla Morrowind?

If there is a difference between OpenMW and Morrowind, feel free to create a bugreport.
Post Reply