Skip to content

Commit 5374c66

Browse files
committed
Removed tempvars from update.
1 parent 1df2435 commit 5374c66

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

jme3-examples/src/main/java/jme3test/games/RollingTheMonkey.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,7 @@ public void simpleUpdate(float tpf) {
328328
pickUp.rotate(pickUpSpeed, pickUpSpeed, pickUpSpeed);
329329
}
330330

331-
TempVars tempVars = TempVars.get();
332-
333-
Vector3f centralForce = tempVars.vect1.set(Vector3f.ZERO);
331+
Vector3f centralForce = new Vector3f();
334332

335333
if(keyForward) centralForce.addLocal(cam.getDirection());
336334
if(keyBackward) centralForce.addLocal(cam.getDirection().negate());
@@ -344,7 +342,6 @@ public void simpleUpdate(float tpf) {
344342

345343
player.applyCentralForce(centralForce); // apply force to player
346344
}
347-
tempVars.release();
348345

349346
cam.lookAt(player.getPhysicsLocation(), Vector3f.UNIT_Y);
350347
}

0 commit comments

Comments
 (0)