extern void object::Attack( ) { int list[], i; object p; float dist, prox; point nav1, nav2, dest; boolean advance = true; errmode(0); // ne stoppe pas si erreur while ( ismovie() != 0 ) wait(1); i = 0; list[i++] = WingedGrabber; list[i++] = TrackedGrabber; list[i++] = WheeledGrabber; list[i++] = LeggedGrabber; list[i++] = WingedShooter; list[i++] = TrackedShooter; list[i++] = WheeledShooter; list[i++] = LeggedShooter; list[i++] = WingedOrgaShooter; list[i++] = TrackedOrgaShooter; list[i++] = WheeledOrgaShooter; list[i++] = LeggedOrgaShooter; list[i++] = WingedSniffer; list[i++] = TrackedSniffer; list[i++] = WheeledSniffer; list[i++] = LeggedSniffer; list[i++] = Thumper; list[i++] = PhazerShooter; list[i++] = Recycler; list[i++] = Shielder; list[i++] = Subber; list[i++] = Me; nav1.x = cmdline(0); nav1.y = cmdline(1); nav2.x = cmdline(2); nav2.y = cmdline(3); while ( true ) { while ( ismovie() != 0 ) // film en cours ? { wait(1); } p = radar(list, 0, 360, 0, 40); if ( p == null ) { while ( true ) { goto(nav1); p = radar(list, 0, 360, 0, 40); if ( p != null ) break; goto(nav2); p = radar(list, 0, 360, 0, 40); if ( p != null ) break; } } else { fire(p.position); } } }