iori Posted July 22, 2005 Ok, so I'm messing with the doom source, and I have a predicament: I cannot find where the code for the Door topwait ( or topcountdown) is. In the door thinker, if the entry bob->topwait = TIMEis present, the door will close after the time has passed. A simple search of all the files in the source only point to 12 occurances, 11 of which are thinkers using topwait in either p_doors.c or p_genlin.c. The 12th is the definition for topwait, in p_spec.h.typedef struct { thinker_t thinker; vldoor_e type; sector_t* sector; fixed_t topheight; fixed_t speed; // 1 = up, 0 = waiting at top, -1 = down int direction; // tics to wait at the top int topwait; // (keep in case a door going down is reset) // when it reaches 0, start going down int topcountdown; //SoM: 3/6/2000: the line that triggered the door. line_t *line; } vldoor_t;So great, all this has shown me so far is that the integer 'topwait' is used to tell the door how long to stay open for. But Where is the code that counts the tics and tells the door to close after x time has passed? I am still fairly new at this, and I fear that I might not be in the right frame of mind. If anyone could lend a hand, it would be greatly appreciated. FYI, what I am trying to accomplish here is to create some effects using floors and ceiling planes, and I want to apply a wait to ceiling thinker of this effect. I have spent enough time around the code to know how this aspect works, at least, but this wait time deal escapes me. 0 Share this post Link to post
Kaiser Posted July 22, 2005 Heh, I've been trying to figure it out myself. But it has something to do with its thinker and topcountdown. But really can't say for sure... Quasar? Help? 0 Share this post Link to post
iori Posted July 22, 2005 I asked Quasar, but he told me to root through p_spec.c and look for EV_VerticalDoor. Well fine, that's all well and great, but it says nothing about the timing, so I guess I was unclear what I meant when I asked him. Oh well, hopefully I will get a response ^_^. 0 Share this post Link to post
Kaiser Posted July 22, 2005 heh, EV_VerticalDoor isn't even in p_spec.c.. though its in p_spec.h which is stored for p_doors.c 0 Share this post Link to post
iori Posted July 22, 2005 I was going to tell Quasar that in IRC, but who am I to argue with the creator of Eternity, heh. Anyway, it just does what all the rest of them do.. well, its cases anyway: thinker->topwait = x, which I already know. At least it helps knowing that someone else has the same problem as me. 0 Share this post Link to post
andrewj Posted July 23, 2005 topwait is transferred to topcountdown which is the one which actually counts down. Both occur in p_doors.c (in the original source, could be different in ports). 0 Share this post Link to post
iori Posted July 23, 2005 Arg, I see, staring me straight in the face. Thanks a lot, I'll play with this tomorrow. 0 Share this post Link to post