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
145145 MyAvatar.characterControllerEnabled = false;
146146 MyAvatar.hmdLeanRecenterEnabled = false;
147147 var roles = this.rolesToOverride();
148− for (i in roles) {
148+ for (var i = 0; i < roles.length; i++) {
149149 MyAvatar.overrideRoleAnimation(roles[i], ANIMATION_URL, ANIMATION_FPS, true, ANIMATION_FIRST_FRAME, ANIMATION_LAST_FRAME);
150150 }
151151
152− for (var i in OVERRIDEN_DRIVE_KEYS) {
152+ for (i = 0; i < OVERRIDEN_DRIVE_KEYS.length; i++) {
153153 MyAvatar.disableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);
154154 }
155155
@@ -178,12 +178,12 @@ · 22 unmodified lines
178178 if (Settings.getValue(SETTING_KEY) === this.entityID) {
179179 Settings.setValue(SETTING_KEY, "");
180180
181− for (var i in OVERRIDEN_DRIVE_KEYS) {
181+ for (var i = 0; i < OVERRIDEN_DRIVE_KEYS.length; i++) {
182182 MyAvatar.enableDriveKey(OVERRIDEN_DRIVE_KEYS[i]);
183183 }
184184
185185 var roles = this.rolesToOverride();
186− for (i in roles) {
186+ for (i = 0; i < roles.length; i++) {
187187 MyAvatar.restoreRoleAnimation(roles[i]);
188188 }
189189 MyAvatar.characterControllerEnabled = true;
@@ -260,7 +260,7 @@ · 70 unmodified lines
260260 // Check if a drive key is pressed
261261 var hasActiveDriveKey = false;
262262 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) {
264264 hasActiveDriveKey = true;
265265 break;
266266 }