[Ohrrpgce] SVN: james/8552 Stop passing npcnum to npc_collision_check()

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Fri Mar 17 13:48:10 PDT 2017


james
2017-03-17 13:48:10 -0700 (Fri, 17 Mar 2017)
460
Stop passing npcnum to npc_collision_check()
It was only being used to avoid collisions-with-self

I replaced it with the following code that I really hope is correct and reliable:

-   IF npc(i).id > 0 AND npcnum <> i AND npc(i).not_obstruction = 0 THEN
+   IF npc(i).id > 0 AND @npci <> @npc(i) AND npc(i).not_obstruction = 0 THEN

Where npci is the function's local reference to the NPCInst, and npc() is the global NPCInst array that I am looping through
---
U   wip/game.bas


More information about the Ohrrpgce mailing list