// // Add_Scroller // // Add a generalized scroller to the thinker list. // // type: the enumerated type of scrolling: floor, ceiling, floor carrier, // wall, floor carrier & scroller // // (dx,dy): the direction and speed of the scrolling or its acceleration // // control: the sector whose heights control this scroller's effect // remotely, or -1 if no control sector // // affectee: the index of the affected object (sector or sidedef) // // accel: non-zero if this is an accelerative effect // void Add_Scroller(int type, fixed_t dx, fixed_t dy, int control, int affectee, int accel, bool overridescroller) { ScrollThinker *s = new ScrollThinker; s->type = type; s->dx = dx; s->dy = dy; s->accel = accel; s->vdx = s->vdy = 0; if((s->control = control) != -1) s->last_height = sectors[control].floorheight + sectors[control].ceilingheight; s->affectee = affectee; if(type != ScrollThinker::sc_side) { if(overridescroller) EV_stopFlatScrollerBySecnum(type, affectee); s->addScroller(); } s->addThinker(); }
// // Add_Scroller // // Add a generalized scroller to the thinker list. // // type: the enumerated type of scrolling: floor, ceiling, floor carrier, // wall, floor carrier & scroller // // (dx,dy): the direction and speed of the scrolling or its acceleration // // control: the sector whose heights control this scroller's effect // remotely, or -1 if no control sector // // affectee: the index of the affected object (sector or sidedef) // // accel: non-zero if this is an accelerative effect // void Add_Scroller(int type, fixed_t dx, fixed_t dy, int control, int affectee, int accel) { ScrollThinker *s = new ScrollThinker; s->type = type; s->dx = dx; s->dy = dy; s->accel = accel; s->vdx = s->vdy = 0; if((s->control = control) != -1) s->last_height = sectors[control].floorheight + sectors[control].ceilingheight; s->affectee = affectee; s->addThinker(); }