From 73eb097921c935232f5a9f5fb6802edaf38bb2e5 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 19 Apr 2006 21:00:41 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/game.c | 17 ++--------------- polymer/eduke32/source/player.c | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 0bd84d94c..2d357aa36 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5761,25 +5761,12 @@ void animatesprites(long x,long y,short a,long smoothratio) tsprite[spritesortcnt].shade = ud.brightskins?-32:t->shade; tsprite[spritesortcnt].cstat = 0; - switch(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; - } + tsprite[spritesortcnt].picnum = (ps[p].curr_weapon==GROW_WEAPON?GROWSPRITEICON:weapon_sprites[ps[p].curr_weapon]); if(s->owner >= 0) tsprite[spritesortcnt].z = ps[p].posz-(12<<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].yrepeat = 10; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index fcb6320c9..8b75c2401 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2101,7 +2101,7 @@ void myospalw(long x, long y, short tilenum, signed char shade, char orientation case HANDREMOTE_WEAPON: case HANDBOMB_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; } }