Commits

Chris Logsdon committed 53ed1d2

Fixed self-inflicted bug that messed up jumping.
Added a jumpSpeedLimit variable

Comments (0)

Files changed (3)

obj/IfritConfig.old

     </define>
     <define append="true">
       <name>CONFIG::timeStamp</name>
-      <value>'10/30/2011'</value>
+      <value>'10/31/2011'</value>
     </define>
     <verbose-stacktraces>true</verbose-stacktraces>
     <source-path append="true">

obj/IfritConfig.xml

     </define>
     <define append="true">
       <name>CONFIG::timeStamp</name>
-      <value>'10/30/2011'</value>
+      <value>'10/31/2011'</value>
     </define>
     <verbose-stacktraces>true</verbose-stacktraces>
     <source-path append="true">
 		public static var vy:Number;
 		private var speedLimitX:Number;
 		private var speedLimitY:Number;
+		private var jumpSpeedLimit:Number;
 		
 		public static var gravity:Number;
 		
 			vy = 0;
 			speedLimitX = 7;
 			speedLimitY = 20;
+			jumpSpeedLimit = 7;
 			gravity = 1;
 			
 			addEventListener(Event.ENTER_FRAME, onEnterFrame);
 		//BUG: Upward thrust when player hits corner of platform
 		private function onEnterFrame(e:Event):void
 		{
+			trace(vy);
+			
 			if (gravUp)	vy += gravity;
 			else vy = 0;
 			
 			if (vx >= speedLimitX) {  vx = speedLimitX;  }
 			if (vx < -speedLimitX) {  vx = -speedLimitX;  }
 			if (vy >= speedLimitY) {  vy = speedLimitY;  }
-			if (vy < -speedLimitY) {  vy = -speedLimitY;  }
+			if (vy < -jumpSpeedLimit) {  vy = -jumpSpeedLimit;  }
 			
 			// Apply physics to player movement
 			this.x += vx;