mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 15:52:09 +02:00
one more try
This commit is contained in:
parent
d57e3b57aa
commit
fa66ed766d
4 changed files with 5 additions and 13 deletions
|
@ -901,8 +901,10 @@ int EntityItem::readEntityDataFromBuffer(const unsigned char* data, int bytesLef
|
|||
// from being received by an entity script server running a script that continously updates an entity.
|
||||
// Basically, we'll allow recent changes to the server scripts even if there are local changes to other properties
|
||||
// that have been made more recently.
|
||||
bool overwriteLocalData = !ignoreServerPacket || (lastEditedFromBufferAdjusted > _serverScriptsChangedTimestamp);
|
||||
bool oldOverwrite = overwriteLocalData;
|
||||
overwriteLocalData = !ignoreServerPacket || (lastEditedFromBufferAdjusted > _serverScriptsChangedTimestamp);
|
||||
READ_ENTITY_PROPERTY(PROP_SERVER_SCRIPTS, QString, setServerScripts);
|
||||
overwriteLocalData = oldOverwrite;
|
||||
}
|
||||
|
||||
// Certifiable props
|
||||
|
|
|
@ -341,7 +341,6 @@ void EntityItemProperties::setBillboardModeFromString(const QString& materialMap
|
|||
|
||||
QString EntityItemProperties::getCreatedAsString() const {
|
||||
auto created = QDateTime::fromMSecsSinceEpoch(getCreated() / 1000.0f, Qt::UTC); // usec per msec
|
||||
created.setTimeSpec(Qt::OffsetFromUTC);
|
||||
return created.toString(Qt::ISODate);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <QtCore/QObject>
|
||||
#include <QVector>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <AACube.h>
|
||||
#include <NumericalConstants.h>
|
||||
|
@ -381,7 +382,7 @@ public:
|
|||
|
||||
void setLocationDirty() { _positionChanged = true; _rotationChanged = true; }
|
||||
|
||||
void setCreatedFromString(QString& v) { _created = QDateTime::fromString(v, Qt::ISODate).toMSecsSinceEpoch() * 1000; }
|
||||
void setCreatedFromString(QString& v) { _created = QDateTime::fromString(v.trimmed(), Qt::ISODate).toMSecsSinceEpoch() * 1000; }
|
||||
QString getCreatedAsString() const;
|
||||
|
||||
bool hasTransformOrVelocityChanges() const;
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
#ifndef hifi_EntityItemPropertiesMacros_h
|
||||
#define hifi_EntityItemPropertiesMacros_h
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include "EntityItemID.h"
|
||||
#include <RegisteredMetaTypes.h>
|
||||
|
||||
|
@ -234,14 +232,6 @@ inline QString QString_convertFromScriptValue(const QScriptValue& v, bool& isVal
|
|||
inline QUuid QUuid_convertFromScriptValue(const QScriptValue& v, bool& isValid) { isValid = true; return v.toVariant().toUuid(); }
|
||||
inline EntityItemID EntityItemID_convertFromScriptValue(const QScriptValue& v, bool& isValid) { isValid = true; return v.toVariant().toUuid(); }
|
||||
|
||||
|
||||
inline QDateTime QDateTime_convertFromScriptValue(const QScriptValue& v, bool& isValid) {
|
||||
isValid = true;
|
||||
auto result = QDateTime::fromString(v.toVariant().toString().trimmed(), Qt::ISODate);
|
||||
// result.setTimeSpec(Qt::OffsetFromUTC);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline QByteArray QByteArray_convertFromScriptValue(const QScriptValue& v, bool& isValid) {
|
||||
isValid = true;
|
||||
QString b64 = v.toVariant().toString().trimmed();
|
||||
|
|
Loading…
Reference in a new issue