mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #793 from machinelevel/dev4
Rave glove: Fix initialization issues and activate mode switch.
This commit is contained in:
commit
bb15eb664c
2 changed files with 8 additions and 3 deletions
|
@ -54,7 +54,7 @@ void Hand::reset() {
|
|||
void Hand::simulate(float deltaTime, bool isMine) {
|
||||
|
||||
if (_isRaveGloveActive) {
|
||||
if (_raveGloveEffectsModeChanged) {
|
||||
if (_raveGloveEffectsModeChanged && _raveGloveInitialized) {
|
||||
activateNewRaveGloveMode();
|
||||
_raveGloveEffectsModeChanged = false;
|
||||
}
|
||||
|
@ -363,6 +363,10 @@ void Hand::updateRaveGloveParticles(float deltaTime) {
|
|||
// The rave glove mode has changed, so activate the effects.
|
||||
void Hand::activateNewRaveGloveMode() {
|
||||
|
||||
if (!_raveGloveInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
int mode = _raveGloveEffectsMode;
|
||||
_raveGloveParticleSystem.killAllParticles();
|
||||
|
||||
|
|
|
@ -161,8 +161,9 @@ int HandData::decodeRemoteData(unsigned char* sourceBuffer) {
|
|||
}
|
||||
|
||||
setRaveGloveActive((gloveFlags & GLOVE_FLAG_RAVE) != 0);
|
||||
// Jeffrey: uncomment this to test locally, before unrolling it to the team.
|
||||
// setRaveGloveMode(effectsMode);
|
||||
if (numHands > 0) {
|
||||
setRaveGloveMode(effectsMode);
|
||||
}
|
||||
|
||||
// One byte for error checking safety.
|
||||
unsigned char requiredLength = (unsigned char)(sourceBuffer - startPosition);
|
||||
|
|
Loading…
Reference in a new issue