Difference between revisions of "Thread:Talk:Robocode/Game Physics/robocode.Bullet instances not being synchronized/reply (2)"
Jump to navigation
Jump to search
(spelling error) |
|||
Line 1: | Line 1: | ||
− | onHitByBullet events return bullet coordinates <b>after</b> it hits you, and onBulletHitBullet events return bullet coordinates <b>before</b> it hits the other bullet. If you reuse the same code for both events, you have to | + | onHitByBullet events return bullet coordinates <b>after</b> it hits you, and onBulletHitBullet events return bullet coordinates <b>before</b> it hits the other bullet. If you reuse the same code for both events, you have to adjust time accordingly. I stumbled on this while tracking a wave detection bug in [[Combat]] a while ago. |
Latest revision as of 00:54, 11 February 2013
onHitByBullet events return bullet coordinates after it hits you, and onBulletHitBullet events return bullet coordinates before it hits the other bullet. If you reuse the same code for both events, you have to adjust time accordingly. I stumbled on this while tracking a wave detection bug in Combat a while ago.