mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:01:09 +02:00
remove cruft: Avatar::setShouldDie()
This commit is contained in:
parent
e363423992
commit
e65d9309b3
3 changed files with 4 additions and 8 deletions
|
@ -303,9 +303,9 @@ void Avatar::updateAvatarEntities() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::setShouldDie() {
|
bool Avatar::shouldDie() const {
|
||||||
// This will cause the avatar to be shrunk away and removed (the actual Avatar gets removed), but then it comes back.
|
const qint64 AVATAR_SILENCE_THRESHOLD_USECS = 5 * USECS_PER_SECOND;
|
||||||
_owningAvatarMixer.clear();
|
return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::simulate(float deltaTime, bool inView) {
|
void Avatar::simulate(float deltaTime, bool inView) {
|
||||||
|
|
|
@ -180,7 +180,7 @@ public:
|
||||||
uint64_t getLastRenderUpdateTime() const { return _lastRenderUpdateTime; }
|
uint64_t getLastRenderUpdateTime() const { return _lastRenderUpdateTime; }
|
||||||
void setLastRenderUpdateTime(uint64_t time) { _lastRenderUpdateTime = time; }
|
void setLastRenderUpdateTime(uint64_t time) { _lastRenderUpdateTime = time; }
|
||||||
|
|
||||||
Q_INVOKABLE void setShouldDie();
|
bool shouldDie() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,6 @@ const quint32 AVATAR_MOTION_DEFAULTS =
|
||||||
const quint32 AVATAR_MOTION_SCRIPTABLE_BITS =
|
const quint32 AVATAR_MOTION_SCRIPTABLE_BITS =
|
||||||
AVATAR_MOTION_SCRIPTED_MOTOR_ENABLED;
|
AVATAR_MOTION_SCRIPTED_MOTOR_ENABLED;
|
||||||
|
|
||||||
const qint64 AVATAR_SILENCE_THRESHOLD_USECS = 5 * USECS_PER_SECOND;
|
|
||||||
|
|
||||||
// Bitset of state flags - we store the key state, hand state, Faceshift, eye tracking, and existence of
|
// Bitset of state flags - we store the key state, hand state, Faceshift, eye tracking, and existence of
|
||||||
// referential data in this bit set. The hand state is an octal, but is split into two sections to maintain
|
// referential data in this bit set. The hand state is an octal, but is split into two sections to maintain
|
||||||
// backward compatibility. The bits are ordered as such (0-7 left to right).
|
// backward compatibility. The bits are ordered as such (0-7 left to right).
|
||||||
|
@ -371,8 +369,6 @@ public:
|
||||||
|
|
||||||
const glm::vec3& getTargetVelocity() const { return _targetVelocity; }
|
const glm::vec3& getTargetVelocity() const { return _targetVelocity; }
|
||||||
|
|
||||||
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }
|
|
||||||
|
|
||||||
void clearRecordingBasis();
|
void clearRecordingBasis();
|
||||||
TransformPointer getRecordingBasis() const;
|
TransformPointer getRecordingBasis() const;
|
||||||
void setRecordingBasis(TransformPointer recordingBasis = TransformPointer());
|
void setRecordingBasis(TransformPointer recordingBasis = TransformPointer());
|
||||||
|
|
Loading…
Reference in a new issue