Merge branch 'atp' of https://github.com/birarda/hifi into protocol

This commit is contained in:
Atlante45 2015-07-15 15:26:34 -07:00
commit 8483b168be
3 changed files with 8 additions and 3 deletions

View file

@ -42,7 +42,8 @@ Agent::Agent(NLPacket& packet) :
{
// be the parent of the script engine so it gets moved when we do
_scriptEngine.setParent(this);
_scriptEngine.setIsAgent(true);
DependencyManager::get<EntityScriptingInterface>()->setPacketSender(&_entityEditSender);
DependencyManager::set<ResourceCacheSharedItems>();

View file

@ -721,7 +721,8 @@ void ScriptEngine::run() {
}
// If we were on a thread, then wait till it's done
if (thread()) {
// Unless we're an assignment-client, in which case that's handled for us
if (thread() && !_isAgent) {
thread()->quit();
}

View file

@ -88,6 +88,8 @@ public:
void setUserLoaded(bool isUserLoaded) { _isUserLoaded = isUserLoaded; }
bool isUserLoaded() const { return _isUserLoaded; }
void setIsAgent(bool isAgent) { _isAgent = isAgent; }
void setParentURL(const QString& parentURL) { _parentURL = parentURL; }
@ -149,7 +151,8 @@ protected:
bool _isListeningToAudioStream;
Sound* _avatarSound;
int _numAvatarSoundSentBytes;
bool _isAgent = false;
private:
void stopAllTimers();
void sendAvatarIdentityPacket();