Ejemplo n.º 1
0
 TRAVERSE_SPRITE_SECT(headspritesect[src_sp->sectnum], src_move, nextsrc_move)    
     {
     // don't move ST1 Copy Tags
     if (SPRITE_TAG1(src_move) != SECT_COPY_SOURCE)
         {
         int sx,sy,dx,dy,src_xoff,src_yoff,trash;
         
         // move sprites from source to dest - use center offset
         
         // get center of src and dest sect
         SectorMidPoint(src_sp->sectnum, &sx, &sy, &trash);
         SectorMidPoint(dest_sp->sectnum, &dx, &dy, &trash);
         
         // get offset
         src_xoff = sx - sprite[src_move].x;
         src_yoff = sy - sprite[src_move].y;
         
         // move sprite to dest sector
         sprite[src_move].x = dx - src_xoff;
         sprite[src_move].y = dy - src_yoff;
         
         // change sector
         changespritesect(src_move, dest_sp->sectnum);
         
         // check to see if it moved on to a sector object
         if (TEST(sector[dest_sp->sectnum].extra, SECTFX_SECTOR_OBJECT))
             {
             SECTOR_OBJECTp sop;
             extern short GlobSpeedSO;
             
             // find and add sprite to SO
             sop = DetectSectorObject(&sector[sprite[src_move].sectnum]);
             AddSpriteToSectorObject(src_move, sop);
             
             // update sprites postions so they aren't in the
             // wrong place for one frame
             GlobSpeedSO = 0;
             RefreshPoints(sop, 0, 0, TRUE);
             }
         }
     }
Ejemplo n.º 2
0
void CStand :: SetP(CPoint P0) {

  Stand.SetP1(P0);
  RefreshPoints();
}
Ejemplo n.º 3
0
void CStand :: MoveStand (double dx, double dy) {
  Stand.Move(dx, dy);
  RefreshPoints();
}
Ejemplo n.º 4
0
void CStand:: SetP(double x, double y) {

  Stand.SetP1(x, y);
  RefreshPoints();

}