---
** [bugs:#2009] Touch and step-on NPCs not activated normally when obstruction
suspended**
**Status:** open
**Milestone:** OHRRPGCE
**Created:** Fri Feb 20, 2015 09:47 AM UTC by TeeEmCee
**Last Updated:** Fri Feb 20, 2015 09:47 AM UTC
**Owner:** nobody
I was looking through the code and noticed some odd behaviour of "suspend
obstruction" and "set npc obstructs"
There are two ways in which touch-activated NPCs get activated. Firstly,
there's a check every tick that an NPC moves, at the bottom of
perform_npc_move. This is unconditional. Secondly, it's checked in
update_heroes when the hero starts to move onto a tile, but this time the check
doesn't happen if "suspend obstruction" is on. Makes no difference whether the
npc is set to obstruct.
You can see this in test.rpg: if you suspend obstructions then the
touch-activated npc (immediately south of the starting position) isn't
activated when you walk into it.
I think this doesn't really need fixing because the check in the hero code is
partially redundant (though the test case proves it isn't entirely). And the
different behaviour of "set npc obstructs" was IIRC intentional, as I thought
activation should be affected only by "set npc usable"
Secondly, step on NPCs aren't activated if "suspend obstruction" is on, but
they are activated if obstruction is turned off for the npc using "set npc
obstructs".
This should maybe be fixed by making step-on NPCs activate in both cases.
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/ohrrpgce/bugs/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/ohrrpgce/admin/bugs/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org