View Single Post
  #22  
Old 08-26-2007, 06:14 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
Well that can be fixed by upping the check, for example:
PHP Code:
while (i<dist/.5) {
  
onwall2(x+(dx/(dist/.5))*i,x+(dx/(dist/.5))*i),1,1);
  
i+=.5;

But that only increases the loop substantially. A simple fix would be to do a seperate check BEFORE doing the check between the two points, that involves checking for a wall in the direction of the player, but only half a tile away. If there is no wall, carry on with checking between them.
Reply With Quote