View Single Post
  #17  
Old 08-26-2007, 05:40 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
It's not that. This is what I get for posting a script I haven't tested... it had to do with the array I was using, apparently you can't grab values from the same array you're setting. Used to be able to.
Here:
PHP Code:
function checkPath(ox, dx, oy, dy) {
  
temp.dx=dx - ox;
  
temp.dy=dy - oy;
  
temp.delta=((temp.dx^2)+(temp.dy^2))^.5;
  
i = 0;
  
temp.onwall = false;
  while (
i < temp.delta) {
    
temp.onwall=onwall2(ox+(temp.dx/temp.delta)*i,oy+(temp.dy/temp.delta)*i,1,1);
    if (
temp.onwall) break;
    
i++;
  }
  return 
temp.onwall;
} 
Reply With Quote