forked from teamnwah/openmw-tes3coop
Various fixes
This commit is contained in:
parent
f83ffecae5
commit
a711a3ebe1
5 changed files with 31 additions and 12 deletions
|
@ -147,5 +147,7 @@ op 0x2000150: ForceGreeting, explicit reference
|
|||
op 0x2000151: ToggleFullHelp
|
||||
op 0x2000152: Goodbye
|
||||
op 0x2000153: SetScale
|
||||
op 0x2000154: SetAngle
|
||||
op 0x2000154: SetScale, explicit reference
|
||||
op 0x2000155: SetAngle
|
||||
op 0x2000156: SetAngle, explicit reference
|
||||
opcodes 0x2000155-0x3ffffff unused
|
||||
|
|
|
@ -592,7 +592,9 @@ namespace MWScript
|
|||
const int opcodeModDispositionExplicit = 0x200014e;
|
||||
|
||||
const int opcodeSetScale = 0x2000153;
|
||||
const int opcodeSetAngle = 0x2000154;
|
||||
const int opcodeSetScaleExplicit = 0x2000154;
|
||||
const int opcodeSetAngle = 0x2000155;
|
||||
const int opcodeSetAngleExplicit = 0x2000156;
|
||||
|
||||
void registerExtensions (Compiler::Extensions& extensions)
|
||||
{
|
||||
|
@ -677,8 +679,8 @@ namespace MWScript
|
|||
opcodeModDispositionExplicit);
|
||||
extensions.registerFunction("getpcrank",'l',"/S",opcodeGetPCRank,opcodeGetPCRankExplicit);
|
||||
|
||||
extensions.registerInstruction("setscale","/l",opcodeSetScale);
|
||||
extensions.registerInstruction("setangle","/Sl",opcodeSetAngle);
|
||||
extensions.registerInstruction("setscale","l",opcodeSetScale,opcodeSetScaleExplicit);
|
||||
extensions.registerInstruction("setangle","Sl",opcodeSetAngle,opcodeSetAngleExplicit);
|
||||
}
|
||||
|
||||
void installOpcodes (Interpreter::Interpreter& interpreter)
|
||||
|
@ -752,7 +754,9 @@ namespace MWScript
|
|||
interpreter.installSegment3(opcodeGetPCRankExplicit,new OpGetPCRank<ExplicitRef>);
|
||||
|
||||
interpreter.installSegment5(opcodeSetScale,new OpSetScale<ImplicitRef>);
|
||||
interpreter.installSegment5(opcodeSetScaleExplicit,new OpSetScale<ExplicitRef>);
|
||||
interpreter.installSegment5(opcodeSetAngle,new OpSetAngle<ImplicitRef>);
|
||||
interpreter.installSegment5(opcodeSetAngleExplicit,new OpSetAngle<ExplicitRef>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,8 +290,6 @@ namespace MWWorld
|
|||
{
|
||||
if (OEngine::Physic::PhysicActor* act = mEngine->getCharacter(handle))
|
||||
{
|
||||
// TODO very dirty hack to avoid crash during setup -> needs cleaning up to allow
|
||||
// start positions others than 0, 0, 0
|
||||
act->setRotation(btQuaternion(rotation.x, rotation.y, rotation.z, rotation.w));
|
||||
}
|
||||
if (OEngine::Physic::RigidBody* body = mEngine->getRigidBody(handle))
|
||||
|
@ -304,8 +302,6 @@ namespace MWWorld
|
|||
{
|
||||
if (OEngine::Physic::RigidBody* body = mEngine->getRigidBody(handle))
|
||||
{
|
||||
// TODO very dirty hack to avoid crash during setup -> needs cleaning up to allow
|
||||
// start positions others than 0, 0, 0
|
||||
//body->setWorldTransform(btTransform().se
|
||||
}
|
||||
}
|
||||
|
|
|
@ -668,6 +668,7 @@ namespace MWWorld
|
|||
Ogre::Quaternion rotz(Ogre::Degree(z),Ogre::Vector3::UNIT_Z);
|
||||
ptr.getRefData().getBaseNode()->setOrientation(rotx*roty*rotz);
|
||||
mPhysics->rotateObject(Class::get(ptr).getId(ptr),ptr.getRefData().getBaseNode()->getOrientation());
|
||||
std::cout << Class::get(ptr).getId(ptr);
|
||||
}
|
||||
|
||||
void World::indexToPosition (int cellX, int cellY, float &x, float &y, bool centre) const
|
||||
|
|
|
@ -392,8 +392,16 @@ namespace Physic
|
|||
|
||||
RigidBody* PhysicEngine::getRigidBody(std::string name)
|
||||
{
|
||||
RigidBody* body = RigidBodyMap[name];
|
||||
return body;
|
||||
RigidBodyContainer::iterator it = RigidBodyMap.find(name);
|
||||
if (it != RigidBodyMap.end() )
|
||||
{
|
||||
RigidBody* body = RigidBodyMap[name];
|
||||
return body;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void PhysicEngine::stepSimulation(double deltaT)
|
||||
|
@ -450,8 +458,16 @@ namespace Physic
|
|||
|
||||
PhysicActor* PhysicEngine::getCharacter(std::string name)
|
||||
{
|
||||
PhysicActor* act = PhysicActorMap[name];
|
||||
return act;
|
||||
PhysicActorContainer::iterator it = PhysicActorMap.find(name);
|
||||
if (it != PhysicActorMap.end() )
|
||||
{
|
||||
PhysicActor* act = PhysicActorMap[name];
|
||||
return act;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void PhysicEngine::emptyEventLists(void)
|
||||
|
|
Loading…
Reference in a new issue