From 2c06987f674125d97de7f05a59e2ed9b14398d25 Mon Sep 17 00:00:00 2001 From: ZzZombo Date: Sun, 8 Feb 2015 14:35:45 +0800 Subject: [PATCH 1/3] - Fixed the sanity commit. --- src/d_net.cpp | 1 + src/info.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d_net.cpp b/src/d_net.cpp index b984799f6..b973c2db0 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -2056,6 +2056,7 @@ void FDynamicBuffer::SetData (const BYTE *data, int len) else { m_Len = 0; + M_Free(m_Data); } } diff --git a/src/info.h b/src/info.h index 19f03670d..680b6fcd8 100644 --- a/src/info.h +++ b/src/info.h @@ -217,7 +217,7 @@ public: bool ReplaceFactor; bool NoArmor; - void Apply(FName const &type); + void Apply(FName const type); void Clear() { DefaultFactor = FRACUNIT; From c4b742ebf0732928646363afd89655180c295c21 Mon Sep 17 00:00:00 2001 From: ZzZombo Date: Sun, 8 Feb 2015 17:03:49 +0800 Subject: [PATCH 2/3] - Part 2 of the sanity crusade. --- src/g_shared/a_pickups.h | 2 +- src/nodebuild.cpp | 5 +---- src/nodebuild_extract.cpp | 3 --- src/nodebuild_gl.cpp | 6 +++--- src/p_acs.cpp | 12 ++++-------- src/p_buildmap.cpp | 4 ++-- src/p_conversation.cpp | 21 ++++++++++----------- src/p_enemy.cpp | 2 -- src/p_floor.cpp | 6 +++--- src/p_interaction.cpp | 4 +--- src/p_map.cpp | 10 ++++------ src/p_mobj.cpp | 31 +++++++++++++++++++++++++------ src/p_setup.cpp | 12 +++--------- src/p_slopes.cpp | 2 -- src/p_teleport.cpp | 3 +-- src/p_usdf.cpp | 1 - src/p_user.cpp | 3 +-- src/r_plane.cpp | 1 - 18 files changed, 59 insertions(+), 69 deletions(-) diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index df0c94b46..968de8eac 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -16,7 +16,7 @@ class FWeaponSlot { public: FWeaponSlot() { Clear(); } - FWeaponSlot(const FWeaponSlot &other) { Weapons = other.Weapons; } + FWeaponSlot(const FWeaponSlot &other):Weapons(other.Weapons) {} FWeaponSlot &operator= (const FWeaponSlot &other) { Weapons = other.Weapons; return *this; } void Clear() { Weapons.Clear(); } bool AddWeapon (const char *type); diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index 210f0f3de..d39157aed 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -942,8 +942,6 @@ DWORD FNodeBuilder::SplitSeg (DWORD segnum, int splitvert, int v1InFront) int newnum = (int)Segs.Size(); newseg = Segs[segnum]; - dx = double(Vertices[splitvert].x - Vertices[newseg.v1].x); - dy = double(Vertices[splitvert].y - Vertices[newseg.v1].y); if (v1InFront > 0) { newseg.v1 = splitvert; @@ -1129,8 +1127,7 @@ int ClassifyLineBackpatchC (node_t &node, const FSimpleVert *v1, const FSimpleVe long pagesize = sysconf(_SC_PAGESIZE); char *callerpage = (char *)((intptr_t)calleroffset & ~(pagesize - 1)); size_t protectlen = (intptr_t)calleroffset + sizeof(void*) - (intptr_t)callerpage; - int ptect; - if (!(ptect = mprotect(callerpage, protectlen, PROT_READ|PROT_WRITE|PROT_EXEC))) + if (!mprotect(callerpage, protectlen, PROT_READ|PROT_WRITE|PROT_EXEC)) #endif { *calleroffset = diff; diff --git a/src/nodebuild_extract.cpp b/src/nodebuild_extract.cpp index c0f769873..04660f6d0 100644 --- a/src/nodebuild_extract.cpp +++ b/src/nodebuild_extract.cpp @@ -317,7 +317,6 @@ int FNodeBuilder::CloseSubsector (TArray &segs, int subsector, vertex_t { angle_t bestdiff = ANGLE_MAX; FPrivSeg *bestseg = NULL; - DWORD bestj = DWORD_MAX; j = first; do { @@ -328,14 +327,12 @@ int FNodeBuilder::CloseSubsector (TArray &segs, int subsector, vertex_t { bestdiff = diff; bestseg = seg; - bestj = j; break; } if (diff < bestdiff && diff > 0) { bestdiff = diff; bestseg = seg; - bestj = j; } } while (++j < max); diff --git a/src/nodebuild_gl.cpp b/src/nodebuild_gl.cpp index d029e7f69..8853a7eab 100644 --- a/src/nodebuild_gl.cpp +++ b/src/nodebuild_gl.cpp @@ -176,7 +176,7 @@ void FNodeBuilder::AddMinisegs (const node_t &node, DWORD splitseg, DWORD &fset, { if (prev != NULL) { - DWORD fseg1, bseg1, fseg2, bseg2; + DWORD fseg1, bseg1; DWORD fnseg, bnseg; // Minisegs should only be added when they can create valid loops on both the front and @@ -186,8 +186,8 @@ void FNodeBuilder::AddMinisegs (const node_t &node, DWORD splitseg, DWORD &fset, if ((fseg1 = CheckLoopStart (node.dx, node.dy, prev->Info.Vertex, event->Info.Vertex)) != DWORD_MAX && (bseg1 = CheckLoopStart (-node.dx, -node.dy, event->Info.Vertex, prev->Info.Vertex)) != DWORD_MAX && - (fseg2 = CheckLoopEnd (node.dx, node.dy, event->Info.Vertex)) != DWORD_MAX && - (bseg2 = CheckLoopEnd (-node.dx, -node.dy, prev->Info.Vertex)) != DWORD_MAX) + (CheckLoopEnd (node.dx, node.dy, event->Info.Vertex)) != DWORD_MAX && + (CheckLoopEnd (-node.dx, -node.dy, prev->Info.Vertex)) != DWORD_MAX) { // Add miniseg on the front side fnseg = AddMiniseg (prev->Info.Vertex, event->Info.Vertex, DWORD_MAX, fseg1, splitseg); diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4b9a8bbab..780495e76 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -660,10 +660,7 @@ void ACSStringPool::ReadStrings(PNGHandle *png, DWORD id) i++; j = arc.ReadCount(); } - if (str != NULL) - { - delete[] str; - } + delete[] str; FindFirstFreeEntry(0); } } @@ -2052,7 +2049,6 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len) } } } - i += 4+ArrayStore[arraynum].ArraySize; } } @@ -5846,13 +5842,13 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) } FActorIterator iterator(args[0]); - bool canraiseall = false; + bool canraiseall = true; while ((actor = iterator.Next())) { - canraiseall = !P_Thing_CanRaise(actor) | canraiseall; + canraiseall = P_Thing_CanRaise(actor) && canraiseall; } - return !canraiseall; + return canraiseall; } break; diff --git a/src/p_buildmap.cpp b/src/p_buildmap.cpp index 2ee2ae83a..2c5c78921 100644 --- a/src/p_buildmap.cpp +++ b/src/p_buildmap.cpp @@ -249,7 +249,7 @@ static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **mapthings, int * BYTE infoBlock[37]; int mapver = data[5]; DWORD matt; - int numRevisions, numWalls, numsprites, skyLen, visibility, parallaxType; + int numRevisions, numWalls, numsprites, skyLen, visibility; int i; int k; @@ -271,7 +271,7 @@ static bool P_LoadBloodMap (BYTE *data, size_t len, FMapThing **mapthings, int * } skyLen = 2 << LittleShort(*(WORD *)(infoBlock + 16)); visibility = LittleLong(*(DWORD *)(infoBlock + 18)); - parallaxType = infoBlock[26]; + numRevisions = LittleLong(*(DWORD *)(infoBlock + 27)); numsectors = LittleShort(*(WORD *)(infoBlock + 31)); numWalls = LittleShort(*(WORD *)(infoBlock + 33)); diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 09f2d49d6..ac59e6a4b 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -924,7 +924,7 @@ public: { const char *speakerName; int x, y, linesize; - int width, fontheight; + int width=screen->GetWidth(), height=screen->GetHeight(), fontheight; player_t *cp = &players[consoleplayer]; @@ -949,8 +949,8 @@ public: { screen->DrawTexture (TexMan(CurNode->Backdrop), 0, 0, DTA_320x200, true, TAG_DONE); } - x = 16 * screen->GetWidth() / 320; - y = 16 * screen->GetHeight() / 200; + x = 16 * width / 320; + y = 16 * height / 200; linesize = 10 * CleanYfac; // Who is talking to you? @@ -970,16 +970,16 @@ public: int i; for (i = 0; mDialogueLines[i].Width >= 0; ++i) { } - screen->Dim (0, 0.45f, 14 * screen->GetWidth() / 320, 13 * screen->GetHeight() / 200, - 308 * screen->GetWidth() / 320 - 14 * screen->GetWidth () / 320, + screen->Dim (0, 0.45f, 14 * width / 320, 13 * height / 200, + 308 * width / 320 - 14 * width / 320, speakerName == NULL ? linesize * i + 6 * CleanYfac : linesize * i + 6 * CleanYfac + linesize * 3/2); } // Dim the screen behind the PC's choices. - screen->Dim (0, 0.45f, (24-160) * CleanXfac + screen->GetWidth()/2, - (mYpos - 2 - 100) * CleanYfac + screen->GetHeight()/2, + screen->Dim (0, 0.45f, (24-160) * CleanXfac + width/2, + (mYpos - 2 - 100) * CleanYfac + height/2, 272 * CleanXfac, MIN(mResponseLines.Size() * OptionSettings.mLinespacing + 4, 200 - mYpos) * CleanYfac); @@ -989,7 +989,7 @@ public: DTA_CleanNoMove, true, TAG_DONE); y += linesize * 3 / 2; } - x = 24 * screen->GetWidth() / 320; + x = 24 * width / 320; for (int i = 0; mDialogueLines[i].Width >= 0; ++i) { screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, mDialogueLines[i].Text, @@ -1019,7 +1019,6 @@ public: int response = 0; for (unsigned i = 0; i < mResponseLines.Size(); i++, y += fontheight) { - width = SmallFont->StringWidth(mResponseLines[i]); x = 64; screen->DrawText (SmallFont, CR_GREEN, x, y, mResponseLines[i], DTA_Clean, true, TAG_DONE); @@ -1037,8 +1036,8 @@ public: { int color = ((DMenu::MenuTime%8) < 4) || DMenu::CurrentMenu != this ? CR_RED:CR_GREY; - x = (50 + 3 - 160) * CleanXfac + screen->GetWidth() / 2; - int yy = (y + fontheight/2 - 5 - 100) * CleanYfac + screen->GetHeight() / 2; + x = (50 + 3 - 160) * CleanXfac + width / 2; + int yy = (y + fontheight/2 - 5 - 100) * CleanYfac + height / 2; screen->DrawText (ConFont, color, x, yy, "\xd", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac, diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 618f50663..1892d4488 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2533,8 +2533,6 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates) // use the current actor's radius instead of the Arch Vile's default. fixed_t maxdist = corpsehit->GetDefault()->radius + self->radius; - maxdist = corpsehit->GetDefault()->radius + self->radius; - if (abs(corpsehit->x - viletryx) > maxdist || abs(corpsehit->y - viletryy) > maxdist) continue; // not actually touching diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 9a5a6eaf8..9d47729ae 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -900,12 +900,12 @@ DElevator::DElevator () } DElevator::DElevator (sector_t *sec) - : Super (sec) + : m_Interp_Floor(sec->SetInterpolation(sector_t::FloorMove, true)), + m_Interp_Ceiling(sec->SetInterpolation(sector_t::CeilingMove, true)), + Super (sec) { sec->floordata = this; sec->ceilingdata = this; - m_Interp_Floor = sec->SetInterpolation(sector_t::FloorMove, true); - m_Interp_Ceiling = sec->SetInterpolation(sector_t::CeilingMove, true); } void DElevator::Serialize (FArchive &arc) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 7bf19a03b..5f5d728bc 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -366,7 +366,7 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags) if (debugfile && this->player) { - static int dieticks[MAXPLAYERS]; + static int dieticks[MAXPLAYERS]; // [ZzZombo] not used? Except if for peeking in debugger... int pnum = int(this->player-players); dieticks[pnum] = gametic; fprintf (debugfile, "died (%d) on tic %d (%s)\n", pnum, gametic, @@ -1716,14 +1716,12 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage, bool playPainSound) { AActor *target; - AActor *inflictor; if (player == NULL) { return; } target = player->mo; - inflictor = source; if (target->health <= 0) { return; diff --git a/src/p_map.cpp b/src/p_map.cpp index 68d0b21f0..a62f2e019 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -755,12 +755,14 @@ bool PIT_CheckLine(line_t *ld, const FBoundingBox &box, FCheckPosition &tm) if (!(tm.thing->flags & MF_DROPOFF) && !(tm.thing->flags & (MF_NOGRAVITY | MF_NOCLIP))) { - secplane_t frontplane = ld->frontsector->floorplane; - secplane_t backplane = ld->backsector->floorplane; + secplane_t frontplane, backplane; #ifdef _3DFLOORS // Check 3D floors as well frontplane = P_FindFloorPlane(ld->frontsector, tm.thing->x, tm.thing->y, tm.thing->floorz); backplane = P_FindFloorPlane(ld->backsector, tm.thing->x, tm.thing->y, tm.thing->floorz); +#else + frontplane = ld->frontsector->floorplane; + backplane = ld->backsector->floorplane; #endif if (frontplane.c < STEEPSLOPE || backplane.c < STEEPSLOPE) { @@ -2964,7 +2966,6 @@ bool FSlide::BounceWall(AActor *mo) deltaangle = (2 * lineangle) - moveangle; mo->angle = deltaangle; - lineangle >>= ANGLETOFINESHIFT; deltaangle >>= ANGLETOFINESHIFT; movelen = fixed_t(sqrt(double(mo->velx)*mo->velx + double(mo->vely)*mo->vely)); @@ -3151,9 +3152,6 @@ bool aim_t::AimTraverse3DFloors(const divline_t &trace, intercept_t * in) fixed_t trY = trace.y + FixedMul(trace.dy, in->frac); fixed_t dist = FixedMul(attackrange, in->frac); - - int dir = aimpitch < 0 ? 1 : aimpitch > 0 ? -1 : 0; - frontflag = P_PointOnLineSide(shootthing->x, shootthing->y, li); // 3D floor check. This is not 100% accurate but normally sufficient when diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index c61b77eba..5cb008bf1 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1979,11 +1979,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly) bool blockingtg = (BlockingMobj->target != NULL); if (BlockingMobj->flags7 & MF7_AIMREFLECT && (tg || blockingtg)) { - AActor *origin; - if (tg) - origin = mo->target; - else if (blockingtg) - origin = BlockingMobj->target; + AActor *origin=tg ? mo->target : BlockingMobj->target; float speed = (float)(mo->Speed); //dest->x - source->x @@ -3496,11 +3492,13 @@ void AActor::Tick () velz <= 0 && floorz == z) { - secplane_t floorplane = floorsector->floorplane; + secplane_t floorplane; #ifdef _3DFLOORS // Check 3D floors as well floorplane = P_FindFloorPlane(floorsector, x, y, floorz); +#else + floorplane = floorsector->floorplane; #endif if (floorplane.c < STEEPSLOPE && @@ -5631,18 +5629,25 @@ static fixed_t GetDefaultSpeed(const PClass *type) AActor *P_SpawnMissile (AActor *source, AActor *dest, const PClass *type, AActor *owner) { + if(!source) + return NULL; return P_SpawnMissileXYZ (source->x, source->y, source->z + 32*FRACUNIT + source->GetBobOffset(), source, dest, type, true, owner); } AActor *P_SpawnMissileZ (AActor *source, fixed_t z, AActor *dest, const PClass *type) { + if(!source) + return NULL; return P_SpawnMissileXYZ (source->x, source->y, z, source, dest, type); } AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z, AActor *source, AActor *dest, const PClass *type, bool checkspawn, AActor *owner) { + if(!source) + return NULL; + if (dest == NULL) { Printf ("P_SpawnMissilyXYZ: Tried to shoot %s from %s with no dest\n", @@ -5712,6 +5717,8 @@ AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z, AActor * P_OldSpawnMissile(AActor * source, AActor * owner, AActor * dest, const PClass *type) { + if(!source) + return NULL; angle_t an; fixed_t dist; AActor *th = Spawn (type, source->x, source->y, source->z + 4*8*FRACUNIT, ALLOW_REPLACE); @@ -5753,6 +5760,8 @@ AActor * P_OldSpawnMissile(AActor * source, AActor * owner, AActor * dest, const AActor *P_SpawnMissileAngle (AActor *source, const PClass *type, angle_t angle, fixed_t velz) { + if(!source) + return NULL; return P_SpawnMissileAngleZSpeed (source, source->z + 32*FRACUNIT + source->GetBobOffset(), type, angle, velz, GetDefaultSpeed (type)); } @@ -5760,12 +5769,16 @@ AActor *P_SpawnMissileAngle (AActor *source, const PClass *type, AActor *P_SpawnMissileAngleZ (AActor *source, fixed_t z, const PClass *type, angle_t angle, fixed_t velz) { + if(!source) + return NULL; return P_SpawnMissileAngleZSpeed (source, z, type, angle, velz, GetDefaultSpeed (type)); } AActor *P_SpawnMissileZAimed (AActor *source, fixed_t z, AActor *dest, const PClass *type) { + if(!source) + return NULL; angle_t an; fixed_t dist; fixed_t speed; @@ -5796,6 +5809,8 @@ AActor *P_SpawnMissileZAimed (AActor *source, fixed_t z, AActor *dest, const PCl AActor *P_SpawnMissileAngleSpeed (AActor *source, const PClass *type, angle_t angle, fixed_t velz, fixed_t speed) { + if(!source) + return NULL; return P_SpawnMissileAngleZSpeed (source, source->z + 32*FRACUNIT + source->GetBobOffset(), type, angle, velz, speed); } @@ -5803,6 +5818,8 @@ AActor *P_SpawnMissileAngleSpeed (AActor *source, const PClass *type, AActor *P_SpawnMissileAngleZSpeed (AActor *source, fixed_t z, const PClass *type, angle_t angle, fixed_t velz, fixed_t speed, AActor *owner, bool checkspawn) { + if(!source) + return NULL; AActor *mo; if (z != ONFLOORZ && z != ONCEILINGZ && source != NULL) @@ -5840,6 +5857,8 @@ AActor *P_SpawnMissileAngleZSpeed (AActor *source, fixed_t z, AActor *P_SpawnPlayerMissile (AActor *source, const PClass *type) { + if(!source) + return NULL; return P_SpawnPlayerMissile (source, 0, 0, 0, type, source->angle); } diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 6b5d9403f..9da28d9d8 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1362,7 +1362,7 @@ void P_LoadSegs (MapData * map) } } } - catch (badseg bad) + catch (const badseg &bad) // the preferred way is to catch by (const) reference. { switch (bad.badtype) { @@ -1467,7 +1467,6 @@ void P_LoadSubsectors (MapData * map) void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex) { - char fname[9]; int i; char *msp; mapsector_t *ms; @@ -1486,7 +1485,6 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex) defSeqType = -1; fogMap = normMap = NULL; - fname[8] = 0; msp = new char[lumplen]; map->Read(ML_SECTORS, msp); @@ -3044,16 +3042,14 @@ void P_LoadBlockMap (MapData * map) blockmap = blockmaplump+4; } - +line_t** linebuffer; // // P_GroupLines // Builds sector line lists and subsector sector numbers. // Finds block bounding boxes for sectors. -// [RH] Handles extra lights +// [RH] Handles extra lights. // -struct linf { short tag; WORD count; }; -line_t** linebuffer; static void P_GroupLines (bool buildmap) { @@ -3062,7 +3058,6 @@ static void P_GroupLines (bool buildmap) int i; int j; int total; - int totallights; line_t* li; sector_t* sector; FBoundingBox bbox; @@ -3095,7 +3090,6 @@ static void P_GroupLines (bool buildmap) // count number of lines in each sector times[1].Clock(); total = 0; - totallights = 0; for (i = 0, li = lines; i < numlines; i++, li++) { if (li->frontsector == NULL) diff --git a/src/p_slopes.cpp b/src/p_slopes.cpp index af0ad7a20..2cce53a92 100644 --- a/src/p_slopes.cpp +++ b/src/p_slopes.cpp @@ -529,11 +529,9 @@ static void P_AlignPlane (sector_t *sec, line_t *line, int which) FVector3 p, v1, v2, cross; - const secplane_t *refplane; secplane_t *srcplane; fixed_t srcheight, destheight; - refplane = (which == 0) ? &refsec->floorplane : &refsec->ceilingplane; srcplane = (which == 0) ? &sec->floorplane : &sec->ceilingplane; srcheight = (which == 0) ? sec->GetPlaneTexZ(sector_t::floor) : sec->GetPlaneTexZ(sector_t::ceiling); destheight = (which == 0) ? refsec->GetPlaneTexZ(sector_t::floor) : refsec->GetPlaneTexZ(sector_t::ceiling); diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index 40e432af0..e930ffd62 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -188,8 +188,7 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, // Spawn teleport fog at source and destination if (sourceFog && !predicting) { - fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; - P_SpawnTeleportFog(thing, oldx, oldy, oldz, true, true); //Passes the actor through which then pulls the TeleFog metadate types based on properties. + P_SpawnTeleportFog(thing, oldx, oldy, oldz, true, true); //Passes the actor through then pulls the TeleFog metadata types based on properties. } if (useFog) { diff --git a/src/p_usdf.cpp b/src/p_usdf.cpp index 2ab52e380..99ac071e8 100644 --- a/src/p_usdf.cpp +++ b/src/p_usdf.cpp @@ -135,7 +135,6 @@ class USDFParser : public UDMFParserBase while (!sc.CheckToken('}')) { bool block = false; - int costs = 0; FName key = ParseKey(true, &block); if (!block) { diff --git a/src/p_user.cpp b/src/p_user.cpp index e91766cf0..21ebf00a1 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -101,11 +101,10 @@ FPlayerClass::FPlayerClass () Flags = 0; } -FPlayerClass::FPlayerClass (const FPlayerClass &other) +FPlayerClass::FPlayerClass (const FPlayerClass &other) : Skins(other.Skins) { Type = other.Type; Flags = other.Flags; - Skins = other.Skins; } FPlayerClass::~FPlayerClass () diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 6572c1f0b..8c01a1c3e 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -438,7 +438,6 @@ void R_MapTiltedPlane (int y, int x1) } startu = endu; startv = endv; - startz = endz; width -= SPANSIZE; } if (width > 0) From 0be3341031f959158771eea650dd75da9e11e712 Mon Sep 17 00:00:00 2001 From: ZzZombo Date: Sun, 8 Feb 2015 18:04:11 +0800 Subject: [PATCH 3/3] - Missed some unused variables. --- src/nodebuild.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index d39157aed..081b42f3e 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -937,7 +937,6 @@ void FNodeBuilder::SetNodeFromSeg (node_t &node, const FPrivSeg *pseg) const DWORD FNodeBuilder::SplitSeg (DWORD segnum, int splitvert, int v1InFront) { - double dx, dy; FPrivSeg newseg; int newnum = (int)Segs.Size();