mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-02 00:53:16 +00:00
- yet again3 spawns in shootgun
This commit is contained in:
parent
60c69cf115
commit
fd3e63b43c
1 changed files with 60 additions and 57 deletions
|
@ -2034,76 +2034,79 @@ void shootgun(PLAYER& plr, float ang, int guntype) {
|
||||||
if (plr.weapon[plr.currweapon] == 3) {
|
if (plr.weapon[plr.currweapon] == 3) {
|
||||||
|
|
||||||
j = insertsprite(plr.sector, MISSILE);
|
j = insertsprite(plr.sector, MISSILE);
|
||||||
|
auto& spawned = sprite[j];
|
||||||
throwpikesprite[throwpikecnt] = j;
|
throwpikesprite[throwpikecnt] = j;
|
||||||
sprite[j].x = plr.x;
|
spawned.x = plr.x;
|
||||||
sprite[j].y = plr.y;
|
spawned.y = plr.y;
|
||||||
sprite[j].z = plr.z + (24 << 8);
|
spawned.z = plr.z + (24 << 8);
|
||||||
sprite[j].cstat = 21;
|
spawned.cstat = 21;
|
||||||
sprite[j].picnum = THROWPIKE;
|
spawned.picnum = THROWPIKE;
|
||||||
sprite[j].ang = (short) daang;
|
spawned.ang = (short) daang;
|
||||||
|
|
||||||
sprite[j].xrepeat = 24;
|
spawned.xrepeat = 24;
|
||||||
sprite[j].yrepeat = 24;
|
spawned.yrepeat = 24;
|
||||||
sprite[j].clipdist = 32;
|
spawned.clipdist = 32;
|
||||||
sprite[j].extra = (short) daang;
|
spawned.extra = (short) daang;
|
||||||
|
|
||||||
sprite[j].shade = -15;
|
spawned.shade = -15;
|
||||||
sprite[j].xvel = (short) ((krand() & 256) - 128);
|
spawned.xvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].yvel = (short) ((krand() & 256) - 128);
|
spawned.yvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].zvel = plr.horizon.horiz.asq16() >> 12;
|
spawned.zvel = plr.horizon.horiz.asq16() >> 12;
|
||||||
sprite[j].owner = sprite[plr.spritenum].owner;
|
spawned.owner = sprite[plr.spritenum].owner;
|
||||||
sprite[j].lotag = 1024;
|
spawned.lotag = 1024;
|
||||||
sprite[j].hitag = 0;
|
spawned.hitag = 0;
|
||||||
sprite[j].pal = 0;
|
spawned.pal = 0;
|
||||||
movesprite((short) j, (bcos(sprite[j].extra) * TICSPERFRAME) << 3,
|
movesprite((short) j, (bcos(spawned.extra) * TICSPERFRAME) << 3,
|
||||||
(bsin(sprite[j].extra) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
(bsin(spawned.extra) * TICSPERFRAME) << 3, 0, 4 << 8, 4 << 8, 0);
|
||||||
setsprite((short) j, sprite[j].x, sprite[j].y, sprite[j].z);
|
setsprite((short) j, spawned.x, spawned.y, spawned.z);
|
||||||
} else {
|
} else {
|
||||||
j = insertsprite(plr.sector, MISSILE);
|
j = insertsprite(plr.sector, MISSILE);
|
||||||
|
auto& spawned = sprite[j];
|
||||||
throwpikesprite[throwpikecnt] = j;
|
throwpikesprite[throwpikecnt] = j;
|
||||||
sprite[j].x = plr.x;
|
spawned.x = plr.x;
|
||||||
sprite[j].y = plr.y;
|
spawned.y = plr.y;
|
||||||
sprite[j].z = plr.z + (24 << 8);
|
spawned.z = plr.z + (24 << 8);
|
||||||
sprite[j].cstat = 21;
|
spawned.cstat = 21;
|
||||||
sprite[j].picnum = THROWPIKE;
|
spawned.picnum = THROWPIKE;
|
||||||
sprite[j].ang = ((plr.angle.ang.asbuild() + 2048 + 96) - 512) & 2047;
|
spawned.ang = ((plr.angle.ang.asbuild() + 2048 + 96) - 512) & 2047;
|
||||||
sprite[j].xrepeat = 24;
|
spawned.xrepeat = 24;
|
||||||
sprite[j].yrepeat = 24;
|
spawned.yrepeat = 24;
|
||||||
sprite[j].clipdist = 32;
|
spawned.clipdist = 32;
|
||||||
sprite[j].extra = plr.angle.ang.asbuild();
|
spawned.extra = plr.angle.ang.asbuild();
|
||||||
sprite[j].shade = -15;
|
spawned.shade = -15;
|
||||||
sprite[j].xvel = (short) ((krand() & 256) - 128);
|
spawned.xvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].yvel = (short) ((krand() & 256) - 128);
|
spawned.yvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].zvel = plr.horizon.horiz.asq16() >> 12;
|
spawned.zvel = plr.horizon.horiz.asq16() >> 12;
|
||||||
sprite[j].owner = sprite[plr.spritenum].owner;
|
spawned.owner = sprite[plr.spritenum].owner;
|
||||||
sprite[j].lotag = 1024;
|
spawned.lotag = 1024;
|
||||||
sprite[j].hitag = 0;
|
spawned.hitag = 0;
|
||||||
sprite[j].pal = 0;
|
spawned.pal = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
j = insertsprite(plr.sector, MISSILE);
|
j = insertsprite(plr.sector, MISSILE);
|
||||||
|
auto& spawned = sprite[j];
|
||||||
|
|
||||||
sprite[j].x = plr.x;
|
spawned.x = plr.x;
|
||||||
sprite[j].y = plr.y;
|
spawned.y = plr.y;
|
||||||
sprite[j].z = plr.z;
|
spawned.z = plr.z;
|
||||||
|
|
||||||
sprite[j].cstat = 21;
|
spawned.cstat = 21;
|
||||||
|
|
||||||
sprite[j].picnum = THROWPIKE;
|
spawned.picnum = THROWPIKE;
|
||||||
sprite[j].ang = BClampAngle(plr.angle.ang.asbuild() - 512);
|
spawned.ang = BClampAngle(plr.angle.ang.asbuild() - 512);
|
||||||
sprite[j].xrepeat = 24;
|
spawned.xrepeat = 24;
|
||||||
sprite[j].yrepeat = 24;
|
spawned.yrepeat = 24;
|
||||||
sprite[j].clipdist = 24;
|
spawned.clipdist = 24;
|
||||||
|
|
||||||
sprite[j].extra = plr.angle.ang.asbuild();
|
spawned.extra = plr.angle.ang.asbuild();
|
||||||
sprite[j].shade = -15;
|
spawned.shade = -15;
|
||||||
sprite[j].xvel = (short) ((krand() & 256) - 128);
|
spawned.xvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].yvel = (short) ((krand() & 256) - 128);
|
spawned.yvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].zvel = (short) ((krand() & 256) - 128);
|
spawned.zvel = (short) ((krand() & 256) - 128);
|
||||||
sprite[j].owner = sprite[plr.spritenum].owner;
|
spawned.owner = sprite[plr.spritenum].owner;
|
||||||
sprite[j].lotag = 1024;
|
spawned.lotag = 1024;
|
||||||
sprite[j].hitag = 0;
|
spawned.hitag = 0;
|
||||||
sprite[j].pal = 0;
|
spawned.pal = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue