From 22abcdef79036e8822beb7db2ffd3d54bd5f0d2f Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 15 Apr 2006 22:34:44 +0000 Subject: [PATCH] Made the "Duke Talk" and "HUD weapon" menu options into 3 way toggles, Duke Talk now toggles between off, local player sounds and all player sounds, and HUD weapon display now toggles between full weapon drawing, weapon icon drawing and no weapon drawing. git-svn-id: https://svn.eduke32.com/eduke32@22 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/global.c | 2 +- polymer/eduke32/source/menus.c | 13 +-- polymer/eduke32/source/player.c | 158 +++++++++++++++++++------------- polymer/eduke32/source/sounds.c | 6 +- 4 files changed, 104 insertions(+), 75 deletions(-) diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index 632500fc3..137cb670c 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -61,7 +61,7 @@ char volume_names[MAXVOLUMES][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRA char skill_names[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" }; char gametype_names[MAXGAMETYPES][33] = { "DUKEMATCH (SPAWN)","COOPERATIVE PLAY","DUKEMATCH (NO SPAWN)"}; -int gametype_flags[MAXGAMETYPES] = {4+8+16+1024+2048+16384,1+2+32+64+128+256+512+4096+8192+32768,2+4+8+16+16384}; +int gametype_flags[MAXGAMETYPES] = {4+8+16+256+1024+2048+16384,1+2+32+64+128+256+512+4096+8192+32768,2+4+8+16+256+16384}; char num_gametypes = 3; long soundsiz[NUM_SOUNDS]; diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index f0bc69e86..389263485 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2194,9 +2194,10 @@ cheat_for_port_credits: } enabled = 1; switch (io) { - case 0: if (x==io) ud.drawweapon = 1-ud.drawweapon; - modval(0,1,(int *)&ud.drawweapon,1,probey==0); - gametextpal(d,yy, ud.drawweapon ? "On" : "Off", 0, 0); break; + case 0: if (x==io) { ud.drawweapon = (ud.drawweapon == 2) ? 0 : ud.drawweapon+1; } + modval(0,2,(int *)&ud.drawweapon,1,probey==0); + { char *s[] = { "Off", "On", "Icon" }; + gametextpal(d,yy, s[ud.drawweapon], 0, 0); break; } case 1: if (x==io) ud.tickrate = 1-ud.tickrate; modval(0,1,(int *)&ud.tickrate,1,probey==1); gametextpal(d,yy, ud.tickrate ? "On" : "Off", 0, 0); break; @@ -3326,7 +3327,7 @@ cheat_for_port_credits: break; case 4: - if(SoundToggle && (FXDevice >= 0)) VoiceToggle = 1-VoiceToggle; + if(SoundToggle && (FXDevice >= 0)) { VoiceToggle = (VoiceToggle == 2) ? 0 : VoiceToggle+1; } onbar = 0; break; case 5: @@ -3383,8 +3384,8 @@ cheat_for_port_credits: menutext(c,50+16+16+16+16+16+16,SHX(-8),(FXDevice<0)||SoundToggle==0,"FLIP STEREO"); - if(VoiceToggle) menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"ON"); - else menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"OFF"); + { char *s[] = { "OFF", "LOCAL", "ALL" }; + menutext(c+160+40,50+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,s[VoiceToggle]); } if(AmbienceToggle) menutext(c+160+40,50+16+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"ON"); else menutext(c+160+40,50+16+16+16+16+16,0,(FXDevice<0)||SoundToggle==0,"OFF"); diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 32ce6fe47..2551f6c0c 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2111,6 +2111,33 @@ char animateaccess(short gs,short snum) return 1; } +void myospalw(long x, long y, short tilenum, signed char shade, char orientation, char p) +{ + if(!ud.drawweapon) + return; + else if(ud.drawweapon == 1) + myospal(x,y,tilenum,shade,orientation,p); + else if(ud.drawweapon == 2) + { + switch(g_currentweapon) + { + case PISTOL_WEAPON: + case CHAINGUN_WEAPON: + case RPG_WEAPON: + case FREEZE_WEAPON: + case SHRINKER_WEAPON: + case GROW_WEAPON: + case DEVISTATOR_WEAPON: + case TRIPBOMB_WEAPON: + 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); + break; + } + } +} + short fistsign; void displayweapon(short snum) @@ -2217,7 +2244,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if( (*kb) > 0 ) { @@ -2244,7 +2271,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2257,14 +2284,13 @@ void displayweapon(short snum) if((*kb) > 6) looking_arc += ((*kb)<<3); else if((*kb) < 4) - - myospal(weapon_xoffset+142-(p->look_ang>>1), + myospalw(weapon_xoffset+142-(p->look_ang>>1), looking_arc+234-gun_pos,HANDHOLDINGLASER+3,gs,o,pal); - myospal(weapon_xoffset+130-(p->look_ang>>1), + myospalw(weapon_xoffset+130-(p->look_ang>>1), looking_arc+249-gun_pos, HANDHOLDINGLASER+((*kb)>>2),gs,o,pal); - myospal(weapon_xoffset+152-(p->look_ang>>1), + myospalw(weapon_xoffset+152-(p->look_ang>>1), looking_arc+249-gun_pos, HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal); } @@ -2274,7 +2300,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2287,12 +2313,12 @@ void displayweapon(short snum) { if(*kb < 8) { - myospal(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos, + myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos, RPGGUN+((*kb)>>1),gs,o,pal); } } - myospal(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos, + myospalw(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos, RPGGUN,gs,o,pal); } break; @@ -2301,7 +2327,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2315,13 +2341,13 @@ void displayweapon(short snum) { case 1: case 2: - myospal(weapon_xoffset+168-(p->look_ang>>1),looking_arc+201-gun_pos, + myospalw(weapon_xoffset+168-(p->look_ang>>1),looking_arc+201-gun_pos, SHOTGUN+2,-128,o,pal); case 0: case 6: case 7: case 8: - myospal(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos, + myospalw(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos, SHOTGUN,gs,o,pal); break; case 3: @@ -2336,45 +2362,45 @@ void displayweapon(short snum) gun_pos -= 40; weapon_xoffset += 20; - myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+194-gun_pos, + myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+194-gun_pos, SHOTGUN+1+((*(kb)-1)>>1),-128,o,pal); } - myospal(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos, + myospalw(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos, SHOTGUN+3,gs,o,pal); break; case 13: case 14: case 15: - myospal(32+weapon_xoffset+166-(p->look_ang>>1),looking_arc+210-gun_pos, + myospalw(32+weapon_xoffset+166-(p->look_ang>>1),looking_arc+210-gun_pos, SHOTGUN+4,gs,o,pal); break; case 16: case 17: case 18: case 19: - myospal(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos, + myospalw(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos, SHOTGUN+5,gs,o,pal); break; case 20: case 21: case 22: case 23: - myospal(64+weapon_xoffset+176-(p->look_ang>>1),looking_arc+196-gun_pos, + myospalw(64+weapon_xoffset+176-(p->look_ang>>1),looking_arc+196-gun_pos, SHOTGUN+6,gs,o,pal); break; case 24: case 25: case 26: case 27: - myospal(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos, + myospalw(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos, SHOTGUN+5,gs,o,pal); break; case 28: case 29: case 30: - myospal(32+weapon_xoffset+156-(p->look_ang>>1),looking_arc+206-gun_pos, + myospalw(32+weapon_xoffset+156-(p->look_ang>>1),looking_arc+206-gun_pos, SHOTGUN+4,gs,o,pal); break; } @@ -2386,7 +2412,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2398,12 +2424,12 @@ void displayweapon(short snum) if(*kb > 0 && sprite[p->i].pal != 1) weapon_xoffset += 1-(rand()&3); - myospal(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos, + myospalw(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos, CHAINGUN,gs,o,pal); switch(*kb) { case 0: - myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, + myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, CHAINGUN+1,gs,o,pal); break; default: @@ -2411,21 +2437,21 @@ void displayweapon(short snum) { i = 0; if(sprite[p->i].pal != 1) i = rand()&7; - myospal(i+weapon_xoffset-4+140-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, + myospalw(i+weapon_xoffset-4+140-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, CHAINGUN+5+((*kb-4)/5),gs,o,pal); if(sprite[p->i].pal != 1) i = rand()&7; - myospal(i+weapon_xoffset-4+184-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, + myospalw(i+weapon_xoffset-4+184-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, CHAINGUN+5+((*kb-4)/5),gs,o,pal); } if(*kb < *aplWeaponTotalTime[CHAINGUN_WEAPON]-2) { i = rand()&7; - myospal(i+weapon_xoffset-4+162-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, + myospalw(i+weapon_xoffset-4+162-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos, CHAINGUN+5+((*kb-2)/5),gs,o,pal); - myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, + myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, CHAINGUN+1+((*kb)>>1),gs,o,pal); } - else myospal(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, + else myospalw(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos, CHAINGUN+1,gs,o,pal); break; } @@ -2436,7 +2462,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2452,36 +2478,36 @@ void displayweapon(short snum) if((*kb) == *aplWeaponFireDelay[PISTOL_WEAPON]) l -= 3; - myospal((l-(p->look_ang>>1)),(looking_arc+244-gun_pos),FIRSTGUN+kb_frames[*kb],gs,2,pal); + myospalw((l-(p->look_ang>>1)),(looking_arc+244-gun_pos),FIRSTGUN+kb_frames[*kb],gs,2,pal); } else { if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-17) - myospal(194-(p->look_ang>>1),looking_arc+230-gun_pos,FIRSTGUN+4,gs,o,pal); + myospalw(194-(p->look_ang>>1),looking_arc+230-gun_pos,FIRSTGUN+4,gs,o,pal); else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-12) { - myospal(244-((*kb)<<3)-(p->look_ang>>1),looking_arc+130-gun_pos+((*kb)<<4),FIRSTGUN+6,gs,o,pal); - myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); + myospalw(244-((*kb)<<3)-(p->look_ang>>1),looking_arc+130-gun_pos+((*kb)<<4),FIRSTGUN+6,gs,o,pal); + myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); } else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-7) { - myospal(124+((*kb)<<1)-(p->look_ang>>1),looking_arc+430-gun_pos-((*kb)<<3),FIRSTGUN+6,gs,o,pal); - myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); + myospalw(124+((*kb)<<1)-(p->look_ang>>1),looking_arc+430-gun_pos-((*kb)<<3),FIRSTGUN+6,gs,o,pal); + myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); } else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-4) { - myospal(184-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+8,gs,o,pal); - myospal(224-(p->look_ang>>1),looking_arc+210-gun_pos,FIRSTGUN+5,gs,o,pal); + myospalw(184-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+8,gs,o,pal); + myospalw(224-(p->look_ang>>1),looking_arc+210-gun_pos,FIRSTGUN+5,gs,o,pal); } else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-2) { - myospal(164-(p->look_ang>>1),looking_arc+245-gun_pos,FIRSTGUN+8,gs,o,pal); - myospal(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); + myospalw(164-(p->look_ang>>1),looking_arc+245-gun_pos,FIRSTGUN+8,gs,o,pal); + myospalw(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal); } else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]) - myospal(194-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+5,gs,o,pal); + myospalw(194-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+5,gs,o,pal); } } @@ -2491,7 +2517,7 @@ void displayweapon(short snum) { SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2513,11 +2539,11 @@ void displayweapon(short snum) else if((*kb) < 20) gun_pos -= 9*((*kb)-14); //D - myospal(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal); + myospalw(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal); } } else - myospal(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal); + myospalw(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal); } } break; @@ -2526,7 +2552,7 @@ void displayweapon(short snum) { SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { signed char remote_frames[] = {0,1,1,2,1,1,0,0,0,0,0}; if(sprite[p->i].pal == 1) @@ -2536,9 +2562,9 @@ void displayweapon(short snum) weapon_xoffset = -48; if((*kb)) - myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal); + myospalw(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal); else - myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal); + myospalw(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal); } } break; @@ -2547,7 +2573,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2562,19 +2588,19 @@ void displayweapon(short snum) if(p->hbomb_hold_delay) { - myospal( (cycloidy[*kb]>>1)+weapon_xoffset+268-(p->look_ang>>1),cycloidy[*kb]+looking_arc+238-gun_pos,DEVISTATOR+i,-32,o,pal); - myospal(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal); + myospalw( (cycloidy[*kb]>>1)+weapon_xoffset+268-(p->look_ang>>1),cycloidy[*kb]+looking_arc+238-gun_pos,DEVISTATOR+i,-32,o,pal); + myospalw(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal); } else { - myospal( -(cycloidy[*kb]>>1)+weapon_xoffset+30-(p->look_ang>>1),cycloidy[*kb]+looking_arc+240-gun_pos,DEVISTATOR+i,-32,o|4,pal); - myospal(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal); + myospalw( -(cycloidy[*kb]>>1)+weapon_xoffset+30-(p->look_ang>>1),cycloidy[*kb]+looking_arc+240-gun_pos,DEVISTATOR+i,-32,o|4,pal); + myospalw(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal); } } else { - myospal(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal); - myospal(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal); + myospalw(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal); + myospalw(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal); } } break; @@ -2583,7 +2609,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { if(sprite[p->i].pal == 1) pal = 1; @@ -2600,10 +2626,10 @@ void displayweapon(short snum) looking_arc += rand()&3; } gun_pos -= 16; - myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE+2,-32,o,pal); - myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+235-gun_pos,FREEZE+3+cat_frames[*kb%6],-32,o,pal); + myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE+2,-32,o,pal); + myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+235-gun_pos,FREEZE+3+cat_frames[*kb%6],-32,o,pal); } - else myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal); + else myospalw(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal); } break; @@ -2611,7 +2637,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { weapon_xoffset += 28; looking_arc += 18; @@ -2628,21 +2654,21 @@ void displayweapon(short snum) gun_pos += (rand()&3); } - myospal(weapon_xoffset+184-(p->look_ang>>1), + myospalw(weapon_xoffset+184-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32, o,2); - myospal(weapon_xoffset+188-(p->look_ang>>1), + myospalw(weapon_xoffset+188-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER-1,gs,o,pal); } else { - myospal(weapon_xoffset+184-(p->look_ang>>1), + myospalw(weapon_xoffset+184-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER+2, 16-(sintable[p->random_club_frame&2047]>>10), o,2); - myospal(weapon_xoffset+188-(p->look_ang>>1), + myospalw(weapon_xoffset+188-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER-2,gs,o,pal); } } @@ -2653,7 +2679,7 @@ void displayweapon(short snum) SetGameVarID(g_iReturnVarID,0,ps[screenpeek].i,screenpeek); OnEvent(EVENT_DRAWWEAPON,ps[screenpeek].i,screenpeek, -1); - if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0 && ud.drawweapon > 0) + if(GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0) { weapon_xoffset += 28; looking_arc += 18; @@ -2669,22 +2695,22 @@ void displayweapon(short snum) gun_pos += (rand()&3); } - myospal(weapon_xoffset+184-(p->look_ang>>1), + myospalw(weapon_xoffset+184-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32, o,0); - myospal(weapon_xoffset+188-(p->look_ang>>1), + myospalw(weapon_xoffset+188-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER+1,gs,o,pal); } else { - myospal(weapon_xoffset+184-(p->look_ang>>1), + myospalw(weapon_xoffset+184-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER+2, 16-(sintable[p->random_club_frame&2047]>>10), o,0); - myospal(weapon_xoffset+188-(p->look_ang>>1), + myospalw(weapon_xoffset+188-(p->look_ang>>1), looking_arc+240-gun_pos,SHRINKER,gs,o,pal); } } diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index 693ba9701..916943099 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -274,8 +274,10 @@ int xyzsound(short num,short i,long x,long y,long z) if( soundm[num]&4 ) { - if(VoiceToggle==0 || (ud.multimode > 1 && PN == APLAYER && sprite[i].yvel != screenpeek && !(gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND)) ) return -1; - + if(VoiceToggle==0) + return -1; + else if (ud.multimode > 1 && PN == APLAYER && sprite[i].yvel != screenpeek && (!(gametype_flags[ud.coop]&GAMETYPE_FLAG_COOPSOUND)?1:VoiceToggle!=2)) + return -1; for(j=0;j 0) && (soundm[j]&4) )