Difference between revisions of "Thread:Talk:Oculus/Movement/reply (16)"

From Robowiki
Jump to navigation Jump to search
m (Reply to Movement)
 
m
 
Line 2: Line 2:
 
:Something like this
 
:Something like this
 
<syntaxhighlight>
 
<syntaxhighlight>
boolean fire =gunHeat == 0 && a.getGunTurnRemainingRadians() < 18 / (currentBattleInfo.distance -18)
+
boolean fire = (gunHeat == 0 && a.getGunTurnRemainingRadians() < 18 / (currentBattleInfo.distance -18));
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 09:23, 30 August 2017

Oculus doesn't have such problem because it does some checking to be sure that the bullet would hit %100 if enemy movement predicted correctly.
Something like this
boolean fire = (gunHeat == 0 && a.getGunTurnRemainingRadians() < 18 / (currentBattleInfo.distance -18));