- initplayersprite: final sprite[] replacement in this first pass.

This commit is contained in:
Christoph Oelckers 2021-11-21 12:24:27 +01:00
parent dc2f8ed84b
commit f7a21870a1

View file

@ -91,27 +91,28 @@ void initplayersprite(PLAYER& plr) {
plr.z = sector[plr.sector].floorz - (plr.height << 8); plr.z = sector[plr.sector].floorz - (plr.height << 8);
plr.spritenum = (short) insertsprite(plr.sector, (short) 0); plr.spritenum = (short) insertsprite(plr.sector, (short) 0);
auto& spr = sprite[plr.spritenum];
plr.onsomething = 1; plr.onsomething = 1;
sprite[plr.spritenum].x = plr.x; spr.x = plr.x;
sprite[plr.spritenum].y = plr.y; spr.y = plr.y;
sprite[plr.spritenum].z = plr.z + (plr.height << 8); spr.z = plr.z + (plr.height << 8);
sprite[plr.spritenum].cstat = 1 + 256; spr.cstat = 1 + 256;
sprite[plr.spritenum].picnum = isWh2() ? GRONSW : FRED; spr.picnum = isWh2() ? GRONSW : FRED;
sprite[plr.spritenum].shade = 0; spr.shade = 0;
sprite[plr.spritenum].xrepeat = 36; spr.xrepeat = 36;
sprite[plr.spritenum].yrepeat = 36; spr.yrepeat = 36;
sprite[plr.spritenum].ang = plr.angle.ang.asbuild(); spr.ang = plr.angle.ang.asbuild();
sprite[plr.spritenum].xvel = 0; spr.xvel = 0;
sprite[plr.spritenum].yvel = 0; spr.yvel = 0;
sprite[plr.spritenum].zvel = 0; spr.zvel = 0;
sprite[plr.spritenum].owner = (short) (4096 + myconnectindex); spr.owner = (short) (4096 + myconnectindex);
sprite[plr.spritenum].lotag = 0; spr.lotag = 0;
sprite[plr.spritenum].hitag = 0; spr.hitag = 0;
sprite[plr.spritenum].pal = (short) (isWh2() ? 10 : 1); spr.pal = (short) (isWh2() ? 10 : 1);
if(isWh2()) if(isWh2())
sprite[plr.spritenum].clipdist = 48; spr.clipdist = 48;
plr.selectedgun = 0; plr.selectedgun = 0;