Slick Forums

Discuss the Slick 2D Library
It is currently Sun Nov 19, 2017 3:04 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Mar 03, 2012 12:23 am 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
The method org.newdawn.slick.particles.ConfigurableEmitter.setPosition(float x, float y) is bronken sice SNV Revsion 1333. You can see what the method should do in the PedigreeTest:
Code:
((ConfigurableEmitter) trail.getEmitter(0)).setPosition(rx+14,ry+35);

It should move the rocket streams emitter, but not the already emitted particles. But with the last update, the method
Code:
public void setPosition(float x, float y, boolean moveParticles)

was added, which can also move the emitter and effecting already emitted particles with moveParticles=true. But this schould't be the dafault behavour, because it breaks existing code (like you can see in the testcase). So easily change
Code:
   public void setPosition(float x, float y) {
      setPosition(x,y,true);
   }
to
Code:
   public void setPosition(float x, float y) {
      setPosition(x,y,false);
   }

Problem already mentioned but never fixed in http://slick.javaunlimited.net/viewtopic.php?f=1&t=3395.
Lets do little steps to a better lib :wink:


Attachments:
File comment: ConfigurableEmitter diff, which sets "setPosition(x,y,true);" to "setPosition(x,y,false);"
ParticleSetPostionFix.zip [417 Bytes]
Downloaded 111 times

_________________
XSwing Plus
German Java gaming Slick Tutorial
Top
 Profile  
 
PostPosted: Sat Mar 03, 2012 10:25 am 
Offline
Game Developer

Joined: Sun Nov 12, 2006 11:18 pm
Posts: 890
Location: Germany
Yes, I didn't like the new behavior neither.

I'd vote for changing it back to the original behavior without moving particles.

_________________
Right Angle Games | Marte Engine
Back to the past | Star Cleaner | SpiderTrap


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group