Subversion Repositories eduke32

Rev

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

Rev 5228 Rev 6048
Line 1244... Line 1244...
1244
1244
1245
void RipperHatch(short Weapon)
1245
void RipperHatch(short Weapon)
1246
{
1246
{
1247
    SPRITEp wp = &sprite[Weapon];
1247
    SPRITEp wp = &sprite[Weapon];
1248
1248
1249
    short new,i;
1249
    short New,i;
1250
    SPRITEp np;
1250
    SPRITEp np;
1251
    USERp nu;
1251
    USERp nu;
1252
#define MAX_RIPPERS 1
1252
#define MAX_RIPPERS 1
1253
    short rip_ang[MAX_RIPPERS];
1253
    short rip_ang[MAX_RIPPERS];
1254
1254
1255
    rip_ang[0] = RANDOM_P2(2048);
1255
    rip_ang[0] = RANDOM_P2(2048);
1256
    // rip_ang[1] = NORM_ANGLE(rip_ang[0] + 1024 + (RANDOM_P2(512) - 256));
1256
    // rip_ang[1] = NORM_ANGLE(rip_ang[0] + 1024 + (RANDOM_P2(512) - 256));
1257
1257
1258
    for (i = 0; i < MAX_RIPPERS; i++)
1258
    for (i = 0; i < MAX_RIPPERS; i++)
1259
    {
1259
    {
1260
        new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1260
        New = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1261
        np = &sprite[new];
1261
        np = &sprite[New];
1262
        memset(np,0,sizeof(SPRITE));
1262
        memset(np,0,sizeof(SPRITE));
1263
        np->sectnum = wp->sectnum;
1263
        np->sectnum = wp->sectnum;
1264
        np->statnum = STAT_DEFAULT;
1264
        np->statnum = STAT_DEFAULT;
1265
        np->x = wp->x;
1265
        np->x = wp->x;
1266
        np->y = wp->y;
1266
        np->y = wp->y;
Line 1268... Line 1268...
1268
        np->owner = -1;
1268
        np->owner = -1;
1269
        //np->xrepeat = np->yrepeat = 36;
1269
        //np->xrepeat = np->yrepeat = 36;
1270
        np->xrepeat = np->yrepeat = 64;
1270
        np->xrepeat = np->yrepeat = 64;
1271
        np->ang = rip_ang[i];
1271
        np->ang = rip_ang[i];
1272
        np->pal = 0;
1272
        np->pal = 0;
1273
        SetupRipper(new);
1273
        SetupRipper(New);
1274
        nu = User[new];
1274
        nu = User[New];
1275
1275
1276
        // make immediately active
1276
        // make immediately active
1277
        SET(nu->Flags, SPR_ACTIVE);
1277
        SET(nu->Flags, SPR_ACTIVE);
1278
1278
1279
        NewStateGroup(new, nu->ActorActionSet->Jump);
1279
        NewStateGroup(New, nu->ActorActionSet->Jump);
1280
        nu->ActorActionFunc = DoActorMoveJump;
1280
        nu->ActorActionFunc = DoActorMoveJump;
1281
        DoActorSetSpeed(new, FAST_SPEED);
1281
        DoActorSetSpeed(New, FAST_SPEED);
1282
        PickJumpMaxSpeed(new, -600);
1282
        PickJumpMaxSpeed(New, -600);
1283
1283
1284
        SET(nu->Flags, SPR_JUMPING);
1284
        SET(nu->Flags, SPR_JUMPING);
1285
        RESET(nu->Flags, SPR_FALLING);
1285
        RESET(nu->Flags, SPR_FALLING);
1286
1286
1287
        nu->jump_grav = 8;
1287
        nu->jump_grav = 8;
1288
1288
1289
        // if I didn't do this here they get stuck in the air sometimes
1289
        // if I didn't do this here they get stuck in the air sometimes
1290
        DoActorZrange(new);
1290
        DoActorZrange(New);
1291
1291
1292
        DoJump(new);
1292
        DoJump(New);
1293
    }
1293
    }
1294
}
1294
}
1295
1295
1296
int
1296
int
1297
DoRipperMove(short SpriteNum)
1297
DoRipperMove(short SpriteNum)