Subversion Repositories eduke32

Rev

Rev 8786 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8786 Rev 8787
Line 4153... Line 4153...
4153
        {
4153
        {
4154
#if !defined LUNATIC
4154
#if !defined LUNATIC
4155
            if ((unsigned)scrofs_action + ACTION_PARAM_COUNT > (unsigned)g_scriptSize)
4155
            if ((unsigned)scrofs_action + ACTION_PARAM_COUNT > (unsigned)g_scriptSize)
4156
                goto skip;
4156
                goto skip;
4157
4157
4158
            l = apScript[scrofs_action + ACTION_VIEWTYPE];
4158
            int32_t viewtype = apScript[scrofs_action + ACTION_VIEWTYPE];
4159
            uint16_t const action_flags = apScript[scrofs_action + ACTION_FLAGS];
4159
            uint16_t const action_flags = apScript[scrofs_action + ACTION_FLAGS];
4160
#else
4160
#else
4161
            l = viewtype;
-
 
4162
            uint16_t const action_flags = actor[i].ac.flags;
4161
            uint16_t const action_flags = actor[i].ac.flags;
4163
#endif
4162
#endif
4164
4163
4165
            int const invertp = l < 0;
4164
            int const invertp = viewtype < 0;
4166
            l = klabs(l);
4165
            l = klabs(viewtype);
4167
4166
4168
            if (tilehasmodelorvoxel(pSprite->picnum,t->pal) && !(spriteext[i].flags&SPREXT_NOTMD))
4167
            if (tilehasmodelorvoxel(pSprite->picnum,t->pal) && !(spriteext[i].flags&SPREXT_NOTMD))
4169
            {
4168
            {
4170
                frameOffset = 0;
4169
                frameOffset = 0;
4171
                t->cstat &= ~4;
4170
                t->cstat &= ~4;
Line 4212... Line 4211...
4212
                    break;
4211
                    break;
4213
                }
4212
                }
4214
            }
4213
            }
4215
4214
4216
#if !defined LUNATIC
4215
#if !defined LUNATIC
4217
            t->picnum += frameOffset + apScript[scrofs_action + ACTION_STARTFRAME] + l*curframe;
4216
            t->picnum += frameOffset + apScript[scrofs_action + ACTION_STARTFRAME] + viewtype*curframe;
4218
#else
4217
#else
4219
            t->picnum += frameOffset + startframe + l*curframe;
4218
            t->picnum += frameOffset + startframe + viewtype*curframe;
4220
#endif
4219
#endif
4221
            // XXX: t->picnum can be out-of-bounds by bad user code.
4220
            // XXX: t->picnum can be out-of-bounds by bad user code.
4222
4221
4223
            if (l > 0)
4222
            if (viewtype > 0)
4224
                while (tilesiz[t->picnum].x == 0 && t->picnum > 0)
4223
                while (tilesiz[t->picnum].x == 0 && t->picnum > 0)
4225
                    t->picnum -= l;       //Hack, for actors
4224
                    t->picnum -= l;       //Hack, for actors
4226
4225
4227
            if (actor[i].dispicnum >= 0)
4226
            if (actor[i].dispicnum >= 0)
4228
                actor[i].dispicnum = t->picnum;
4227
                actor[i].dispicnum = t->picnum;