mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Replaced the Avatar in Agent by a scriptable avatar.
This commit is contained in:
parent
4b867de864
commit
95c98203a9
2 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,8 @@
|
||||||
#include <ParticlesScriptingInterface.h> // TODO: consider moving to scriptengine.h
|
#include <ParticlesScriptingInterface.h> // TODO: consider moving to scriptengine.h
|
||||||
#include <ModelsScriptingInterface.h> // TODO: consider moving to scriptengine.h
|
#include <ModelsScriptingInterface.h> // TODO: consider moving to scriptengine.h
|
||||||
|
|
||||||
|
#include "avatars/ScriptableAvatar.h"
|
||||||
|
|
||||||
#include "Agent.h"
|
#include "Agent.h"
|
||||||
|
|
||||||
Agent::Agent(const QByteArray& packet) :
|
Agent::Agent(const QByteArray& packet) :
|
||||||
|
@ -228,7 +230,7 @@ void Agent::run() {
|
||||||
qDebug() << "Downloaded script:" << scriptContents;
|
qDebug() << "Downloaded script:" << scriptContents;
|
||||||
|
|
||||||
// setup an Avatar for the script to use
|
// setup an Avatar for the script to use
|
||||||
AvatarData scriptedAvatar;
|
ScriptableAvatar scriptedAvatar(&_scriptEngine);
|
||||||
|
|
||||||
// call model URL setters with empty URLs so our avatar, if user, will have the default models
|
// call model URL setters with empty URLs so our avatar, if user, will have the default models
|
||||||
scriptedAvatar.setFaceModelURL(QUrl());
|
scriptedAvatar.setFaceModelURL(QUrl());
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
|
|
||||||
QScriptEngine* getEngine() { return &_engine; }
|
QScriptEngine* getEngine() { return &_engine; }
|
||||||
ArrayBufferClass* getArrayBufferClass() { return _arrayBufferClass; }
|
ArrayBufferClass* getArrayBufferClass() { return _arrayBufferClass; }
|
||||||
|
AnimationCache* getAnimationCache() { return &_animationCache; }
|
||||||
|
|
||||||
/// sets the script contents, will return false if failed, will fail if script is already running
|
/// sets the script contents, will return false if failed, will fail if script is already running
|
||||||
bool setScriptContents(const QString& scriptContents, const QString& fileNameString = QString(""));
|
bool setScriptContents(const QString& scriptContents, const QString& fileNameString = QString(""));
|
||||||
|
|
Loading…
Reference in a new issue