2 parts occupie same space?

  • ubuntupokemoninc
    22nd Apr 2011 Member 0 Permalink
    how can you make 1 particle allow another inside it? i imagine its in graphics.c
  • Finalflash50
    22nd Apr 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • ubuntupokemoninc
    22nd Apr 2011 Member 0 Permalink
    /*
    RETURN-value explenation
    1 = Swap
    0 = No move/Bounce
    2 = Both particles occupy the same space.
    */
    int eval_move(int pt, int nx, int ny, unsigned *rr)
    {
    unsigned r;

    if (nx<0 || ny<0 || nx>=XRES || ny>=YRES)
    return 0;

    r = pmap[ny][nx];
    if (r && (r>>8) r = (r&~0xFF) | parts[r>>8].type;
    if (rr)
    *rr = r;

    if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_BHOL)
    return 1;

    if (pt==PT_PHOT&&(
    (r&0xFF)==PT_GLAS || (r&0xFF)==PT_PHOT ||
    (r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN ||
    (r&0xFF)==PT_GLOW || (r&0xFF)==PT_WATR ||
    (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW ||
    (r&0xFF)==PT_ISOZ || (r&0xFF)==PT_ISZS ||
    (r&0xFF)==PT_FILT || (r&0xFF)==PT_INVIS ||
    (r&0xFF)==PT_QRTZ || (r&0xFF)==PT_PQRT ||
    ((r&0xFF)==PT_LCRY&&parts[r>>8].life > 5)))
    return 2;

    k, i notice this for photoelectric effect do i have to create a new one for my element and instead off naming the element do i just use parts [i]