History

Updating with jshint edits

Alexia Mandeville committed 8 years ago

Commit 35551f01 parent f356de51 file · +5 −5Browse files

Showing the changes to scripts/tutorials/entity_scripts (1 of 1 file). Show all

Unified · Split

scripts/tutorials/entity_scripts/sit.js+5−5
@@ -145,11 +145,11 @@ · 144 unmodified lines
145 MyAvatar.characterControllerEnabled = false;145 MyAvatar.characterControllerEnabled = false;
146 MyAvatar.hmdLeanRecenterEnabled = false;146 MyAvatar.hmdLeanRecenterEnabled = false;
147 var roles = this.rolesToOverride();147 var roles = this.rolesToOverride();
148 for (i in roles) {148 for (var i = 0; i < roles.length; i++) {
149 MyAvatar.overrideRoleAnimation(roles[i], ANIMATION_URL, ANIMATION_FPS, true, ANIMATION_FIRST_FRAME, ANIMATION_LAST_FRAME);149 MyAvatar.overrideRoleAnimation(roles[i], ANIMATION_URL, ANIMATION_FPS, true, ANIMATION_FIRST_FRAME, ANIMATION_LAST_FRAME);
150 }150 }
151 151
152 for (var i in OVERRIDEN_DRIVE_KEYS) {152 for (i = 0; i < OVERRIDEN_DRIVE_KEYS.length; i++) {
153 MyAvatar.disableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);153 MyAvatar.disableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);
154 }154 }
155 155
@@ -178,12 +178,12 @@ · 22 unmodified lines
178 if (Settings.getValue(SETTING_KEY) === this.entityID) {178 if (Settings.getValue(SETTING_KEY) === this.entityID) {
179 Settings.setValue(SETTING_KEY, "");179 Settings.setValue(SETTING_KEY, "");
180 180
181 for (var i in OVERRIDEN_DRIVE_KEYS) {181 for (var i = 0; i < OVERRIDEN_DRIVE_KEYS.length; i++) {
182 MyAvatar.enableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);182 MyAvatar.enableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);
183 }183 }
184 184
185 var roles = this.rolesToOverride();185 var roles = this.rolesToOverride();
186 for (i in roles) {186 for (i = 0; i < roles.length; i++) {
187 MyAvatar.restoreRoleAnimation(roles[i]);187 MyAvatar.restoreRoleAnimation(roles[i]);
188 }188 }
189 MyAvatar.characterControllerEnabled = true;189 MyAvatar.characterControllerEnabled = true;
@@ -260,7 +260,7 @@ · 70 unmodified lines
260 // Check if a drive key is pressed260 // Check if a drive key is pressed
261 var hasActiveDriveKey = false;261 var hasActiveDriveKey = false;
262 for (var i in OVERRIDEN_DRIVE_KEYS) {262 for (var i in OVERRIDEN_DRIVE_KEYS) {
263 if (MyAvatar.getRawDriveKey(OVERRIDEN_DRIVE_KEYS[i]) != 0.0) {263 if (MyAvatar.getRawDriveKey(OVERRIDEN_DRIVE_KEYS[i]) !== 0.0) {
264 hasActiveDriveKey = true;264 hasActiveDriveKey = true;
265 break;265 break;
266 }266 }