double y=myY + Math.cos(e.getBearingRadians?()+myHeading)*e.getDistance(); |
double y=myY + Math.cos(e.getBearingRadians?()+myHeading)*e.getDistance(); |
out.println(" "); |
return myGunHeat!=getGunHeat() || myX!=getX() || myY!=getY(); |
return time != getTime(); |
Iterator di=dbulletl.iterator(); |
i=dbulletl.iterator(); |
double x=en.location.getX()+en.velocity*timeDelta*Math.sin(en.heading); double y=en.location.getY()+en.velocity*timeDelta*Math.cos(en.heading); |
double x=en.location.getX() + (en.velocity*timeDelta*Math.sin(en.heading)); double y=en.location.getY() + (en.velocity*timeDelta*Math.cos(en.heading)); Line2D.Double diff=new Line2D.Double(en.location,new Point2D.Double(x,y)); int TRACE_DEPTH = 16; Point2D middle; boolean containsFirst; if ((containsFirst = field.contains(diff.getP1())) == field.contains(diff.getP2())){ } for (int i = 0; i < TRACE_DEPTH; i++) { middle = new Point2D.Double((diff.getX1() + diff.getX2()) / 2, (diff.getY1() + diff.getY2()) / 2); if (containsFirst != field.contains(middle)){ diff = new Line2D.Double(diff.getP1(), middle); }else{ diff = new Line2D.Double(middle, diff.getP2()); } } x=(diff.getX1() + diff.getX2()) / 2; y=(diff.getY1() + diff.getY2()) / 2; if(Math.abs(x)>1000){ out.println(en.name + " X WRONG: timeDelta=" + timeDelta + " velocity=" + en.velocity + " heading=" + en.heading + " orig x=" + en.location.getX()); } if(Math.abs(y)>1000){ out.println(en.name + " Y WRONG: timeDelta=" + timeDelta + " velocity=" + en.velocity + " heading=" + en.heading + " orig y=" + en.location.getY()); } |
The code for Smash is above. I need help! (sorry if the code is messy, i commented alot of things out because they don't work (yet) like the MeleePatternMatcher |
The code for Smash is above. I need help! (sorry the code is messy, i commented alot of things out because they don't work (yet) like the MeleePatternMatcher |