[Pogamut-list] Credible rotation (Rotate and TurnTo command)

michal.bida pogamut-forum at diana.ms.mff.cuni.cz
Tue Jun 1 14:20:07 CEST 2010


 Re: Credible rotation (Rotate and TurnTo command)

Author: michal.bida

Hi! 

I've checked TurnTo command in Pogamut3 and you were right - there is a bug. :-( Rotation is sent to GameBots in wrong format for TurnTo command. I've fixed that in svn already. 

Either you can fix it in TurnTo class, or checkout TurnTo.java from our svn.

The correct code of TurnTo is as follows (bug is in public String toMessage() function ):

{CODE()}
             	 public String toMessage() {
              		StringBuffer buf = new StringBuffer();
              		buf.append("TURNTO");
              		
		    					if (Target != null) {
		    						buf.append(" {Target " + Target.getStringId() + "}");
		    					}
		    				
                                if (Rotation != null) {
                                    buf.append(" {Rotation " + 
                                        Rotation.getPitch() + "," + 
                                        Rotation.getYaw() + "," + 
                                        Rotation.getRoll() + "}");
                                }
                            
                                if (Location != null) {
                                    buf.append(" {Location " + 
                                        Location.getX() + "," + 
                                        Location.getY() + "," + 
                                        Location.getZ() + "}");
                                }
                                        
            		return buf.toString();
            }
{CODE}

We will however probably make 3.0.12 in summer fixing these bugs (this bug, weaponry class bug, pathExecutor bugs...)

Best,
Michal

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=214&post_reply=1#form>





More information about the Pogamut-list mailing list