Fixed a couple of bugs and made the show opponent weapon option a bit less hard coded for modders

git-svn-id: https://svn.eduke32.com/eduke32@72 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-19 21:00:41 +00:00
parent a1f78582ea
commit 73eb097921
2 changed files with 3 additions and 16 deletions

View file

@ -5761,25 +5761,12 @@ void animatesprites(long x,long y,short a,long smoothratio)
tsprite[spritesortcnt].shade = ud.brightskins?-32:t->shade; tsprite[spritesortcnt].shade = ud.brightskins?-32:t->shade;
tsprite[spritesortcnt].cstat = 0; tsprite[spritesortcnt].cstat = 0;
switch(ps[p].curr_weapon) tsprite[spritesortcnt].picnum = (ps[p].curr_weapon==GROW_WEAPON?GROWSPRITEICON:weapon_sprites[ps[p].curr_weapon]);
{
case PISTOL_WEAPON: tsprite[spritesortcnt].picnum = FIRSTGUNSPRITE; break;
case SHOTGUN_WEAPON: tsprite[spritesortcnt].picnum = SHOTGUNSPRITE; break;
case CHAINGUN_WEAPON: tsprite[spritesortcnt].picnum = CHAINGUNSPRITE; break;
case RPG_WEAPON: tsprite[spritesortcnt].picnum = RPGSPRITE; break;
case HANDREMOTE_WEAPON:
case HANDBOMB_WEAPON: tsprite[spritesortcnt].picnum = HEAVYHBOMB; break;
case TRIPBOMB_WEAPON: tsprite[spritesortcnt].picnum = TRIPBOMBSPRITE; break;
case GROW_WEAPON: tsprite[spritesortcnt].picnum = GROWSPRITEICON; break;
case SHRINKER_WEAPON: tsprite[spritesortcnt].picnum = SHRINKERSPRITE; break;
case FREEZE_WEAPON: tsprite[spritesortcnt].picnum = FREEZESPRITE; break;
case DEVISTATOR_WEAPON: tsprite[spritesortcnt].picnum = DEVISTATORSPRITE; break;
}
if(s->owner >= 0) if(s->owner >= 0)
tsprite[spritesortcnt].z = ps[p].posz-(12<<8); tsprite[spritesortcnt].z = ps[p].posz-(12<<8);
else tsprite[spritesortcnt].z = s->z-(51<<8); else tsprite[spritesortcnt].z = s->z-(51<<8);
if(ps[p].curr_weapon == HANDBOMB_WEAPON) if(tsprite[spritesortcnt].picnum == HEAVYHBOMB)
{ {
tsprite[spritesortcnt].xrepeat = 10; tsprite[spritesortcnt].xrepeat = 10;
tsprite[spritesortcnt].yrepeat = 10; tsprite[spritesortcnt].yrepeat = 10;

View file

@ -2101,7 +2101,7 @@ void myospalw(long x, long y, short tilenum, signed char shade, char orientation
case HANDREMOTE_WEAPON: case HANDREMOTE_WEAPON:
case HANDBOMB_WEAPON: case HANDBOMB_WEAPON:
case SHOTGUN_WEAPON: case SHOTGUN_WEAPON:
rotatesprite(160<<16,(180+(ps[screenpeek].weapon_pos*ps[screenpeek].weapon_pos))<<16,scale(65536,ud.statusbarscale,100),0,weapon_sprites[g_currentweapon],0,0,2,windowx1,windowy1,windowx2,windowy2); rotatesprite(160<<16,(180+(ps[screenpeek].weapon_pos*ps[screenpeek].weapon_pos))<<16,scale(65536,ud.statusbarscale,100),0,g_currentweapon==GROW_WEAPON?GROWSPRITEICON:weapon_sprites[g_currentweapon],0,0,2,windowx1,windowy1,windowx2,windowy2);
break; break;
} }
} }