mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-22 07:50:54 +00:00
- added missing xflip option for weapon sprites and removed the bit shifting voodoo in overwritesprite.
We can use the correct options directly without having to go through that mess.
This commit is contained in:
parent
de1e7b1336
commit
7e632ec382
2 changed files with 8 additions and 6 deletions
|
@ -10,9 +10,7 @@ BEGIN_WH_NS
|
|||
|
||||
static void overwritesprite(double thex, double they, int tilenum, int shade, int stat, int dapalnum)
|
||||
{
|
||||
int dastat = (((stat & RS_TRANS1) ^ RS_TRANS1) << 4) + (stat & RS_AUTO) + ((stat & RS_YFLIP) >> 2) + RS_NOCLIP +
|
||||
(((stat & RS_TOPLEFT) >> 2) ^ ((stat & RS_NOCLIP) >> 1)) + (stat & RS_ALIGN_L) + (stat & RS_ALIGN_R);
|
||||
hud_drawsprite(thex, they, 65536, (stat & RS_NOCLIP) << 7, tilenum, shade, dapalnum, dastat);
|
||||
hud_drawsprite(thex, they, 65536, 0, tilenum, shade, dapalnum, stat);
|
||||
}
|
||||
|
||||
void drawweapons(int snum, double const dasmoothratio) {
|
||||
|
@ -40,9 +38,13 @@ void drawweapons(int snum, double const dasmoothratio) {
|
|||
|
||||
int dabits;
|
||||
if (plr.invisibletime > 0)
|
||||
dabits = RS_TRANS1;
|
||||
dabits = RS_TOPLEFT | RS_TRANS1;
|
||||
else
|
||||
dabits = 0;
|
||||
dabits = RS_TOPLEFT;
|
||||
|
||||
if (plr.currweaponflip == 1)
|
||||
dabits |= RS_XFLIPHUD;
|
||||
|
||||
|
||||
switch (plr.currweapon) {
|
||||
case 1:
|
||||
|
|
|
@ -557,7 +557,7 @@ void weaponsprocess(int snum) {
|
|||
plr.hasshot = 0;
|
||||
plr.currweaponflip = 1;
|
||||
}
|
||||
if (plr.ammo[3] > 0) {
|
||||
else if (plr.ammo[3] > 0) {
|
||||
plr.currweapon = 3;
|
||||
plr.currweapontics = 6;
|
||||
plr.currweaponanim = 0;
|
||||
|
|
Loading…
Reference in a new issue