<br><br>On Saturday, July 1, 2017, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 1 July 2017 at 10:09,  <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','subversion@hamsterrepublic.com');" target="_blank">subversion@hamsterrepublic.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">james<br>
2017-06-30 15:09:36 -0700 (Fri, 30 Jun 2017)<br>
110<br>
add hero_collision_check functions similar to the npc_collision_check functions<br>
use them for hero pathfinding<br>
---<br>
U   wip/game.bas<br>
U   wip/<a href="http://game.bi" rel="noreferrer" target="_blank">game.bi</a><br>
U   wip/pathfinding.bas<br>
U   wip/<a href="http://pathfinding.bi" rel="noreferrer" target="_blank">pathfinding.bi</a><br></blockquote><div><br></div><div>Hmm, quite a bit of duplicated code! It would be tricky to share code, but I think it's doable. Were you planning/working on that?<br></div></div></div></div></blockquote><div><br></div><div>I actually tried sharing more code, but it got very ugly. I deleted my first attempt.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>After quite a lot of inspection I found they already don't agree: I see hero_collision_check won't work correctly if you're in a vehicle, or if walk-through-walls is enabled. And keeping them in agreement will be a nuisance.</div><div><br></div></div></div></div></blockquote><div>Oh, dang, I totally forgot about vehicles, thanks for reminding me!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br>The "movdivis" checks can be moved from want_to_check_for_walls to update_heroes, so that that function can be called from hero_collision_check<br></div></div></div></div></blockquote><div><br></div><div> I'll look at that</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>The vehicle_is_animating() = NO checks, NPC pushing and NPC activation can be moved out of the collision block in update_heroes, so that that block can replaced with a call to hero_collision_check.<br></div><div>The fact that hero_collision_check stops when it finds a wall collision but update_heroes doesn't, doesn't matter because a wall collision sets x/ygo to 0 so that an NPC collision/activation can't happen except in the corner case that you're standing on top of a touch-activated NPC.<br></div><div><br></div></div></div></div></blockquote><div>I am going to have to re-read all that when I am more awake, but thank you :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Also, pixelpos is unused.<br></div><div><br></div><div>I guess we'll need to special case pushing an NPC when using the mouse.<br></div></div><br></div></div></blockquote><div><br></div><div>Oh, yes. I still have some plans for special handling when you click an NPC.</div><div><br></div><div>I think the only tricky bit there is when an NPC is both pushable and activate able. </div><div><br></div><div>I'll figure it out</div>