From 1aed7f53f86b50d376854b90b972c7cb8b6c8d32 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 1 Dec 2008 10:44:18 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1171 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 2 +- polymer/eduke32/build/src/sdlayer.c | 4 +- polymer/eduke32/source/actors.c | 2 +- polymer/eduke32/source/astub.c | 1 + polymer/eduke32/source/duke3d.h | 122 +++++++++++++-------------- polymer/eduke32/source/funct.h | 2 +- polymer/eduke32/source/game.c | 13 +-- polymer/eduke32/source/gamedef.c | 1 + polymer/eduke32/source/gameexec.c | 56 ++++++------ polymer/eduke32/source/global.c | 2 +- polymer/eduke32/source/player.c | 18 ++-- polymer/eduke32/source/sector.c | 19 +++-- polymer/eduke32/source/winbits.c | 4 +- 13 files changed, 130 insertions(+), 116 deletions(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index e35997611..33e634e88 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -1925,7 +1925,7 @@ int gloadtile_hi(int dapic,int dapalnum, int facen, hicreplctyp *hicr, int damet free(picfil); picfil = 0; if (glinfo.texcompr && glusetexcompr && !(hicr->flags & 1)) - intexfmt = (hasalpha == 255) ? GL_COMPRESSED_RGB_ARB : GL_COMPRESSED_RGBA_ARB; + intexfmt = (hasalpha == 255) ? GL_COMPRESSED_RGBA_S3TC_DXT3_EXT : GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; else if (hasalpha == 255) intexfmt = GL_RGB; if ((doalloc&3)==1) bglGenTextures(1,(GLuint*)&pth->glpic); //# of textures (make OpenGL allocate structure) diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index cd6fe0e15..87f148cae 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -923,7 +923,9 @@ int setvideomode(int x, int y, int c, int fs) { int regrab = 0; static int warnonce = 0; +#if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3) static int ovsync = 1; +#endif if ((fs == fullscreen) && (x == xres) && (y == yres) && (c == bpp) && !videomodereset) @@ -1759,7 +1761,7 @@ inline void idle(void) usleep(1); } -#if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3) +#if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3) // SDL 1.2 static int buildkeytranslationtable(void) { memset(keytranslation,0,sizeof(keytranslation)); diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 7014fe3a7..d0d55c631 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -196,7 +196,7 @@ void P_AddWeapon(DukePlayer_t *p,int weapon) } } -void P_SelectNextInventoryItem(DukePlayer_t *p) +void P_SelectNextInvItem(DukePlayer_t *p) { if (p->firstaid_amount > 0) p->inven_icon = 1; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 7207d2a52..c3c584c68 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -7421,6 +7421,7 @@ static void G_CheckCommandLine(int argc, const char **argv) { #if defined(POLYMOST) && defined(USE_OPENGL) extern char TEXCACHEFILE[BMAX_PATH]; + Bsprintf(tempbuf,"%s/%s",argv[i+1],TEXCACHEFILE); Bstrcpy(TEXCACHEFILE,tempbuf); #endif diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 404b06f92..c34d25709 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -426,67 +426,67 @@ extern int fricxv,fricyv; // of this struct into the same order so we can just memcpy it and get rid of the // mywhatever type globals -typedef struct { - int zoom, exitx, exity; - int posx, posy, posz, horiz, ohoriz, ohorizoff, invdisptime; - int bobposx, bobposy, oposx, oposy, oposz, pyoff, opyoff; - int posxv, posyv, poszv, last_pissed_time, truefz, truecz; - int player_par, visibility; - int bobcounter, weapon_sway; - int pals_time, randomflamex, crack_time; - - unsigned int interface_toggle_flag; - - int max_secret_rooms, secret_rooms, max_actors_killed, actors_killed; - int runspeed, movement_lock, team; - int max_player_health, max_shield_amount, max_ammo_amount[MAX_WEAPONS]; - - int scream_voice; - - int loogiex[64], loogiey[64], numloogs, loogcnt; - - char *palette; - - short sbs, sound_pitch; - - short ang, oang, angvel, cursectnum, look_ang, last_extra, subweapon; - short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself; - - short curr_weapon, last_weapon, tipincs, horizoff, wantweaponfire; - short holoduke_amount, newowner, hurt_delay, hbomb_hold_delay; - short jumping_counter, airleft, knee_incs, access_incs; - short fta, ftq, access_wallnum, access_spritenum; - short kickback_pic, got_access, weapon_ang, firstaid_amount; - short somethingonplayer, on_crane, i, one_parallax_sectnum; - short over_shoulder_on, random_club_frame, fist_incs; - short one_eighty_count, cheat_phase; - short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick; - short heat_amount, actorsqu, timebeforeexit, customexitsound; - - short weaprecs[16], weapreccnt; - - - short orotscrnang, rotscrnang, dead_flag, show_empty_weapon; // JBF 20031220: added orotscrnang - short scuba_amount, jetpack_amount, steroids_amount, shield_amount; - short holoduke_on, pycount, weapon_pos, frag_ps; - short transporter_hold, last_full_weapon, footprintshade, boot_amount; - - char aim_mode, auto_aim, weaponswitch; - - char gm, on_warping_sector, footprintcount; - char hbomb_on, jumping_toggle, rapid_fire_hold, on_ground; - char inven_icon, buttonpalette; - - char jetpack_on, spritebridge, lastrandomspot; - char scuba_on, footprintpal, heat_on; - - char holster_weapon, falling_counter; - char gotweapon[MAX_WEAPONS], refresh_inventory; - - char toggle_key_flag, knuckle_incs; // , select_dir; - char walking_snd_toggle, palookup, hard_landing; - char /*fire_flag, */pals[3]; - char return_to_center, reloading, name[32]; +typedef struct { + int zoom, exitx, exity; + int posx, posy, posz, horiz, ohoriz, ohorizoff, invdisptime; + int bobposx, bobposy, oposx, oposy, oposz, pyoff, opyoff; + int posxv, posyv, poszv, last_pissed_time, truefz, truecz; + int player_par, visibility; + int bobcounter, weapon_sway; + int pals_time, randomflamex, crack_time; + + unsigned int interface_toggle_flag; + + int max_secret_rooms, secret_rooms, max_actors_killed, actors_killed; + int runspeed, movement_lock, team; + int max_player_health, max_shield_amount, max_ammo_amount[MAX_WEAPONS]; + + int scream_voice; + + int loogiex[64], loogiey[64], numloogs, loogcnt; + + char *palette; + + short sbs, sound_pitch; + + short ang, oang, angvel, cursectnum, look_ang, last_extra, subweapon; + short ammo_amount[MAX_WEAPONS], wackedbyactor, frag, fraggedself; + + short curr_weapon, last_weapon, tipincs, horizoff, wantweaponfire; + short holoduke_amount, newowner, hurt_delay, hbomb_hold_delay; + short jumping_counter, airleft, knee_incs, access_incs; + short fta, ftq, access_wallnum, access_spritenum; + short kickback_pic, got_access, weapon_ang, firstaid_amount; + short somethingonplayer, on_crane, i, one_parallax_sectnum; + short over_shoulder_on, random_club_frame, fist_incs; + short one_eighty_count, cheat_phase; + short dummyplayersprite, extra_extra8, quick_kick, last_quick_kick; + short heat_amount, actorsqu, timebeforeexit, customexitsound; + + short weaprecs[16], weapreccnt; + + + short orotscrnang, rotscrnang, dead_flag, show_empty_weapon; // JBF 20031220: added orotscrnang + short scuba_amount, jetpack_amount, steroids_amount, shield_amount; + short holoduke_on, pycount, weapon_pos, frag_ps; + short transporter_hold, last_full_weapon, footprintshade, boot_amount; + + char aim_mode, auto_aim, weaponswitch; + + char gm, on_warping_sector, footprintcount; + char hbomb_on, jumping_toggle, rapid_fire_hold, on_ground; + char inven_icon, buttonpalette; + + char jetpack_on, spritebridge, lastrandomspot; + char scuba_on, footprintpal, heat_on; + + char holster_weapon, falling_counter; + char gotweapon[MAX_WEAPONS], refresh_inventory; + + char toggle_key_flag, knuckle_incs; // , select_dir; + char walking_snd_toggle, palookup, hard_landing; + char /*fire_flag, */pals[3]; + char return_to_center, reloading, name[32]; } DukePlayer_t; extern char tempbuf[2048], packbuf[576], menutextbuf[128]; diff --git a/polymer/eduke32/source/funct.h b/polymer/eduke32/source/funct.h index a497ecc22..ff6d8b13e 100644 --- a/polymer/eduke32/source/funct.h +++ b/polymer/eduke32/source/funct.h @@ -168,7 +168,7 @@ extern inline int G_CheckForSpaceFloor(int sectnum); extern void P_AddAmmo(int weapon,DukePlayer_t *p,int amount); extern void P_AddWeaponNoSwitch(DukePlayer_t *p,int weapon); extern void P_AddWeapon(DukePlayer_t *p,int weapon); -extern void P_SelectNextInventoryItem(DukePlayer_t *p); +extern void P_SelectNextInvItem(DukePlayer_t *p); extern void P_CheckWeapon(DukePlayer_t *p); extern void A_RadiusDamage(int i,int r,int hp1,int hp2,int hp3,int hp4); extern int A_MoveSprite(int spritenum,int xchange,int ychange,int zchange,unsigned int cliptype); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7eeaa121b..949c86c2a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1065,9 +1065,9 @@ void getpackets(void) vote_map = packbuf[3]; Bsprintf(tempbuf,"%s^00 HAS CALLED A VOTE TO CHANGE MAP TO %s (E%dL%d)", - g_player[(unsigned char)packbuf[1]].user_name, - MapInfo[(unsigned char)(packbuf[2]*MAXLEVELS + packbuf[3])].name, - packbuf[2]+1,packbuf[3]+1); + g_player[(unsigned char)packbuf[1]].user_name, + MapInfo[(unsigned char)(packbuf[2]*MAXLEVELS + packbuf[3])].name, + packbuf[2]+1,packbuf[3]+1); G_AddUserQuote(tempbuf); Bsprintf(tempbuf,"PRESS F1 TO ACCEPT, F2 TO DECLINE"); @@ -1581,6 +1581,7 @@ void G_DrawTilePalSmall(int x, int y, int tilenum, int shade, int orientation, i #define POLYMOSTTRANS (1) #define POLYMOSTTRANS2 (1|32) +// draws inventory numbers in the HUD for both the full and mini status bars static void G_DrawInvNum(int x,int y,char num1,char ha,char sbits) { char dabuf[80] = {0}; @@ -1591,7 +1592,7 @@ static void G_DrawInvNum(int x,int y,char num1,char ha,char sbits) Bsprintf(dabuf,"%d",num1); if (num1 > 99) { - if (shd && getrendermode() >= 3 && althud_shadows) + if (shd && ud.screen_size == 4 && getrendermode() >= 3 && althud_shadows) { rotatesprite(sbarx(x-4+1),sbary(y+1),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,4,POLYMOSTTRANS|sbits,0,0,xdim-1,ydim-1); rotatesprite(sbarx(x+1),sbary(y+1),sbarsc(65536L),0,THREEBYFIVE+dabuf[1]-'0',ha,4,POLYMOSTTRANS|sbits,0,0,xdim-1,ydim-1); @@ -1604,7 +1605,7 @@ static void G_DrawInvNum(int x,int y,char num1,char ha,char sbits) } if (num1 > 9) { - if (shd && getrendermode() >= 3 && althud_shadows) + if (shd && ud.screen_size == 4 && getrendermode() >= 3 && althud_shadows) { rotatesprite(sbarx(x+1),sbary(y+1),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,4,POLYMOSTTRANS|sbits,0,0,xdim-1,ydim-1); rotatesprite(sbarx(x+4+1),sbary(y+1),sbarsc(65536L),0,THREEBYFIVE+dabuf[1]-'0',ha,4,POLYMOSTTRANS|sbits,0,0,xdim-1,ydim-1); @@ -12215,7 +12216,7 @@ static void Net_DoPrediction(void) if (myz < (fz-(i<<8)) && (G_CheckForSpaceFloor(psect)|G_CheckForSpaceCeiling(psect)) == 0) //falling { if (!TEST_SYNC_KEY(sb_snum, SK_JUMP) && !TEST_SYNC_KEY(sb_snum, SK_CROUCH) && - myonground && (sector[psect].floorstat&2) && myz >= (fz-(i<<8)-(16<<8))) + myonground && (sector[psect].floorstat&2) && myz >= (fz-(i<<8)-(16<<8))) myz = fz-(i<<8); else { diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 0458c5541..95c002549 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -47,6 +47,7 @@ static int C_IncreaseScriptSize(int size); int g_numQuoteRedefinitions = 0; +// pointers to weapon gamevar data intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire) intptr_t *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 6a379e83a..2e3bf8af1 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -94,7 +94,7 @@ void X_OnEvent(int iEventID, int iActor, int iPlayer, int lDist) g_killitFlag = 0; - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); if (g_killitFlag == 1) { @@ -171,6 +171,9 @@ static char A_Dodge(spritetype *s) int mxvect = sintable[(s->ang+512)&2047]; int myvect = sintable[s->ang&2047]; + if (A_CheckEnemySprite(s) && s->extra <= 0) // hack + return 0; + for (i=headspritestat[STAT_PROJECTILE];i>=0;i=nextspritestat[i]) //weapons list { if (OW == i || SECT != s->sectnum) @@ -374,6 +377,9 @@ static void X_AlterAng(int a) g_sp->xvel += (*moveptr-g_sp->xvel)/5; if (g_sp->zvel < 648) g_sp->zvel += ((*(moveptr+1)<<4)-g_sp->zvel)/5; + if (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) // hack + return; + if (a&seekplayer) { int aang = g_sp->ang, angdif, goalang; @@ -440,6 +446,17 @@ static void X_Move(void) g_t[0]++; + if (g_t[1] == 0 || a == 0 || (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0)) + { + if ((A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) || (ActorExtra[g_i].bposx != g_sp->x) || (ActorExtra[g_i].bposy != g_sp->y)) + { + ActorExtra[g_i].bposx = g_sp->x; + ActorExtra[g_i].bposy = g_sp->y; + setsprite(g_i,g_sp->x,g_sp->y,g_sp->z); + } + return; + } + if (a&face_player) { if (g_player[g_p].ps->newowner >= 0) @@ -483,17 +500,6 @@ static void X_Move(void) g_sp->ang += angdif; } - if (g_t[1] == 0 || a == 0) - { - if ((A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) || (ActorExtra[g_i].bposx != g_sp->x) || (ActorExtra[g_i].bposy != g_sp->y)) - { - ActorExtra[g_i].bposx = g_sp->x; - ActorExtra[g_i].bposy = g_sp->y; - setsprite(g_i,g_sp->x,g_sp->y,g_sp->z); - } - return; - } - moveptr = (intptr_t *)g_t[1]; if (a&geth) g_sp->xvel += (*moveptr-g_sp->xvel)>>1; @@ -836,6 +842,8 @@ static int X_DoExecute(void) if (g_t[5]) g_t[1] = *(((intptr_t *)g_t[5])+1); // move g_sp->hitag = *(((intptr_t *)g_t[5])+2); // move flags g_t[0] = g_t[2] = g_t[3] = 0; // count, actioncount... g_t[3] = ??? + if (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) // hack + break; if (g_sp->hitag&random_angle) g_sp->ang = krand()&2047; break; @@ -1096,8 +1104,8 @@ static int X_DoExecute(void) // fix for flying/jumping monsters getting stuck in water if (g_sp->statnum != MAXSTATUS && actorscrptr[g_sp->picnum] && (g_sp->hitag & jumptoplayer || - (moveptr >= g_scriptPtr && moveptr <= (g_scriptPtr+g_scriptSize) && *(moveptr+1))) - ) + (moveptr >= g_scriptPtr && moveptr <= (g_scriptPtr+g_scriptSize) && *(moveptr+1))) + ) { // OSD_Printf("%d\n",*(moveptr+1)); break; @@ -1287,14 +1295,14 @@ static int X_DoExecute(void) intptr_t *tempscrptr=insptr+2; insptr = (intptr_t *) *(insptr+1); - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); insptr = tempscrptr; } break; case CON_LEFTBRACE: insptr++; - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); break; case CON_MOVE: @@ -1302,6 +1310,8 @@ static int X_DoExecute(void) g_t[0]=0; g_t[1] = *insptr++; g_sp->hitag = *insptr++; + if (A_CheckEnemySprite(g_sp) && g_sp->extra <= 0) // hack + break; if (g_sp->hitag&random_angle) g_sp->ang = krand()&2047; break; @@ -1770,11 +1780,7 @@ static int X_DoExecute(void) insptr=(intptr_t*)(lpCases[lCheckCase*2+1] + &script[0]); //Bsprintf(g_szBuf,"insptr=%d. ", (int)insptr); //AddLog(g_szBuf); - while (1) - { - if (X_DoExecute()) - break; - } + while (!X_DoExecute()); //AddLog("Done Executing Case"); bMatched=1; } @@ -1787,7 +1793,7 @@ static int X_DoExecute(void) { //AddLog("No Matching Case: Using Default"); insptr=(intptr_t*)(*lpDefault + &script[0]); - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); } else { @@ -3480,7 +3486,7 @@ static int X_DoExecute(void) if (tw == CON_CHECKAVAILWEAPON) P_CheckWeapon(g_player[j].ps); - else P_SelectNextInventoryItem(g_player[j].ps); + else P_SelectNextInvItem(g_player[j].ps); break; @@ -4207,7 +4213,7 @@ void A_LoadActor(int iActor) return; } - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); if (g_killitFlag == 1) deletesprite(g_i); @@ -4255,7 +4261,7 @@ void A_Execute(int iActor,int iPlayer,int lDist) g_t[3] = 0; } - while (1) if (X_DoExecute()) break; + while (!X_DoExecute()); if (g_killitFlag == 1) { diff --git a/polymer/eduke32/source/global.c b/polymer/eduke32/source/global.c index bca11a114..14388ddfd 100644 --- a/polymer/eduke32/source/global.c +++ b/polymer/eduke32/source/global.c @@ -157,7 +157,7 @@ char szPlayerName[32]; int g_damageCameras,g_freezerSelfDamage=0,g_tripbombLaserMode=0; int g_networkBroadcastMode = 255, g_movesPerPacket = 1,g_gameQuit = 0,everyothertime; int g_numFreezeBounces=3,g_rpgBlastRadius,g_pipebombBlastRadius,g_tripbombBlastRadius, - g_shrinkerBlastRadius,g_morterBlastRadius,g_bouncemineBlastRadius,g_seenineBlastRadius; + g_shrinkerBlastRadius,g_morterBlastRadius,g_bouncemineBlastRadius,g_seenineBlastRadius; STATUSBARTYPE sbar; int mymaxlag, otherminlag, bufferjitter = 1; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 8af27bf22..55e65b7a6 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -427,7 +427,7 @@ int A_Shoot(int i,int atwith) A_AddToDeleteQueue(k); */ - if (!SpriteFlags[ProjectileData[atwith].decal] & SPRITE_DECAL) + if (!(SpriteFlags[ProjectileData[atwith].decal] & SPRITE_DECAL)) SpriteFlags[ProjectileData[atwith].decal] |= SPRITE_DECAL; k = A_Spawn(i,ProjectileData[atwith].decal); @@ -3137,7 +3137,7 @@ static int P_DoCounters(DukePlayer_t *p) { p->steroids_amount--; if (p->steroids_amount == 0) - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); if (!(p->steroids_amount&7)) if (snum == screenpeek || GTFLAGS(GAMETYPE_COOPSOUND)) A_PlaySound(DUKE_HARTBEAT,p->i); @@ -3149,7 +3149,7 @@ static int P_DoCounters(DukePlayer_t *p) if (p->heat_amount == 0) { p->heat_on = 0; - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); A_PlaySound(NITEVISION_ONOFF,p->i); P_UpdateScreenPal(p); } @@ -3162,7 +3162,7 @@ static int P_DoCounters(DukePlayer_t *p) { A_PlaySound(TELEPORTER,p->i); p->holoduke_on = -1; - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); } } @@ -3172,7 +3172,7 @@ static int P_DoCounters(DukePlayer_t *p) if (p->jetpack_amount <= 0) { p->jetpack_on = 0; - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); A_PlaySound(DUKE_JETPACK_OFF,p->i); A_StopSound(DUKE_JETPACK_IDLE,p->i); A_StopSound(DUKE_JETPACK_ON,p->i); @@ -3264,7 +3264,7 @@ static int P_DoCounters(DukePlayer_t *p) if (p->scuba_amount == 0) { p->scuba_on = 0; - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); } } @@ -4274,7 +4274,7 @@ void P_ProcessInput(int snum) p->boot_amount--; p->inven_icon = 7; if (p->boot_amount <= 0) - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); } else { @@ -4355,7 +4355,7 @@ void P_ProcessInput(int snum) P_DoQuote(75,p); p->boot_amount -= 2; if (p->boot_amount <= 0) - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); } } @@ -4747,7 +4747,7 @@ SHOOTINCODE: if (aplWeaponFlags[p->curr_weapon][snum] & WEAPON_GLOWS) p->random_club_frame += 64; // Glowing - // this is for WEAPON_FIREEVERYOTHER + // this is a hack for WEAPON_FIREEVERYOTHER if (ActorExtra[p->i].temp_data[7]) { ActorExtra[p->i].temp_data[7]--; diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index aa957891c..313f1dd36 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -2437,13 +2437,16 @@ void A_DamageObject(int i,int sn) if (PN != TANK && PN != BOSS1 && PN != BOSS4 && PN != BOSS2 && PN != BOSS3 && PN != RECON && PN != ROTATEGUN) { - if ((sprite[i].cstat&48) == 0) - SA = (sprite[sn].ang+1024)&2047; - sprite[i].xvel = -(sprite[sn].extra<<2); - j = SECT; - pushmove(&SX,&SY,&SZ,&j,128L,(4L<<8),(4L<<8),CLIPMASK0); - if (j != SECT && j >= 0 && j < MAXSECTORS) - changespritesect(i,j); + if (sprite[i].extra > 0) + { + if ((sprite[i].cstat&48) == 0) + SA = (sprite[sn].ang+1024)&2047; + sprite[i].xvel = -(sprite[sn].extra<<2); + j = SECT; + pushmove(&SX,&SY,&SZ,&j,128L,(4L<<8),(4L<<8),CLIPMASK0); + if (j != SECT && j >= 0 && j < MAXSECTORS) + changespritesect(i,j); + } } if (sprite[i].statnum == 2) @@ -3129,7 +3132,7 @@ CHECKINV1: { sprite[p->i].extra += p->firstaid_amount; p->firstaid_amount = 0; - P_SelectNextInventoryItem(p); + P_SelectNextInvItem(p); } A_PlaySound(DUKE_USEMEDKIT,p->i); } diff --git a/polymer/eduke32/source/winbits.c b/polymer/eduke32/source/winbits.c index b7d65b89b..ef7b95921 100644 --- a/polymer/eduke32/source/winbits.c +++ b/polymer/eduke32/source/winbits.c @@ -140,14 +140,14 @@ int G_GetVersionFromWebsite(char *buffer) initprintf("Connecting to http://%s\n",host); if (connect(mysock, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr)) == SOCKET_ERROR) { - // initprintf("update: connect() error in G_GetVersionFromWebsite() (%d)\n",errno); + // initprintf("update: connect() error in G_GetVersionFromWebsite() (%d)\n",errno); return(0); } bytes_sent = send(mysock, req, strlen(req), 0); if (bytes_sent == SOCKET_ERROR) { - // initprintf("update: send() error in G_GetVersionFromWebsite() (%d)\n",errno); + // initprintf("update: send() error in G_GetVersionFromWebsite() (%d)\n",errno); return(0); }