Falling through Air Rooms...there has to be a better way...

From: Haddixx (haddixx@megamed.com)
Date: 07/18/96

>One question tho.  It appears that if the person falling were to cast
>a fly spell upon himself and avoid reaching the 'bottom', the code >wouldstill record damage for the number of rooms fallen.  I see now >that the check is made outside of the function call to see if the >person is flying,but I'm still not sure they would be free of damage if >casted enroute.  Am I reading this correctly?  Perhaps a check outside >of the while loop infall_char to determine if the room has SECT_FLYING >set and if the PC has AFF_FLY set, then no damage?  I suppose those >conditions would indicate that the person was able to stop in a >'flying-only' room.  A suitable message might be appropriate at this >point.  Maybe let the char know if they would have been killed?  "Wow!  >That ground was coming up awfully fast!"  or  "Saved from the clutches >of death at the last moment!"
>Again, I could be incorrectly reading the code and you have accounted >for this, making this whole message moot.
>Thanks for contributing!

   No, you are correct I do not account for anyone being able to cast a
'fly' or 'feather fall' spell while falling.  I'm not entirely happy
with the way the code is working right now.  The while loop pretty much
makes impacting the ground pretty much instantaneos.  I would prefer a
method by which the character would fall through each room with a slight
delay (one second?) in each room and still be able to react (if fast
enough).  The way the code is set up now it just 'throws' the character
through each room until they impact something or run out of down
exists. 	   Does anyone have any idea how I can go about making it so
that character would fall in the manner I described above?  I was
thinking of maybe adding an AFF_FALL flag that would be checked
(somehow?!?) and force the character through the down exists. I'm just
not sure how to go about making the character fall and still giving them
time to react while at the same time not bogging down the MUD in
needless calculations.  I could add something into heart_beat() that
would check each character for an AFF_FALL flag but I think that would
slow the MUD down tremendously.
   Anyone have any ideas?  I wouldn't mind working on it and reposting
any improvements I make to the code.  I think this is a feature a lot of
people would be interested in getting :)


| Haddixx             |   -=-=-Implementor of Avalanche MUD-=-=-    |   
+ Brian M. Menges     + Running at: 8000              +
| haddixx@megamed.com |   Web Page: http://www.megamed.com/~haddixx |

This archive was generated by hypermail 2b30 : 12/07/00 PST