From 099e365a230b0c8b290ed20bf91d5b18f6fdb97f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Jun 2013 10:28:12 +0200 Subject: [PATCH] - fixed typo in USDF spec. - comment fixes taken from GZDoom. - division by zero check in R_SetVisibility from GZDoom. --- specs/usdf.txt | 4 ++-- src/g_doom/a_bossbrain.cpp | 6 +++--- src/p_floor.cpp | 6 ------ src/p_glnodes.cpp | 2 +- src/r_main.cpp | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/specs/usdf.txt b/specs/usdf.txt index 52b418d46..1367ccfbf 100644 --- a/specs/usdf.txt +++ b/specs/usdf.txt @@ -113,14 +113,14 @@ conversation // Starts a dialog. // The amount of an item needed to successfully pick this option. // This can be repeated, but only the first will be shown (provided - // diaplaycost is true). All costs must be satisfied for success. + // displaycost is true). All costs must be satisfied for success. cost { item = ; // Item that is required for this option. amount = ; // Minimum amount of the item needed. } - displaycost = ; // Weather the cost should be + displaycost = ; // Whether the cost should be // displayed with the option. // If no cost is specified this should // be ignored. diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 873b5c6dc..a99ef9323 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -124,12 +124,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) // spawn brain missile spit = P_SpawnMissile (self, targ, spawntype); - // Boss cubes should move freely to their destination so it's - // probably best to disable all collision detection for them. - if (spit != NULL) { + // Boss cubes should move freely to their destination so it's + // probably best to disable all collision detection for them. if (spit->flags & MF_NOCLIP) spit->flags5 |= MF5_NOINTERACTION; + spit->target = targ; spit->master = self; // [RH] Do this correctly for any trajectory. Doom would divide by 0 diff --git a/src/p_floor.cpp b/src/p_floor.cpp index e9768479b..f63087619 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -283,7 +283,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, bool rtn; sector_t* sec; DFloor* floor; - //bool manual = false; tag == 0 and manual == true constitutes the same evidence [fdari] fixed_t ceilingheight; fixed_t newheight; vertex_t *spot, *spot2; @@ -296,7 +295,6 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, if (!line || !(sec = line->backsector)) return rtn; secnum = (int)(sec-sectors); - //manual = true; goto manual_floor; } @@ -814,7 +812,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) DFloor* floor; vertex_t* spot; fixed_t height; - // bool manual = false; Instead of breaking when manual is true, fail to (re)enter loop when tag is false (0). secnum = -1; rtn = false; @@ -823,7 +820,6 @@ bool EV_DoDonut (int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed) { if (!line || !(s1 = line->backsector)) return rtn; - //manual = true; goto manual_donut; } @@ -1378,7 +1374,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, sector_t *sector; DWaggleBase *waggle; bool retCode; - //bool manual = false; retCode = false; sectorIndex = -1; @@ -1387,7 +1382,6 @@ bool EV_StartWaggle (int tag, line_t *line, int height, int speed, int offset, { if (!line || !(sector = line->backsector)) return retCode; - //manual = true; goto manual_waggle; } diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 694c1684b..7a14e4d44 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1498,7 +1498,7 @@ void P_SetRenderSector() seg_t *seg = ss->firstline; // Check for one-dimensional subsectors. These should be ignored when - // being processed for automap drawinng etc. + // being processed for automap drawing etc. ss->flags |= SSECF_DEGENERATE; for(j=2; jnumlines; j++) { diff --git a/src/r_main.cpp b/src/r_main.cpp index f4ba8c6e5..edb13d326 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -263,7 +263,7 @@ void R_SetVisibility (float vis) CurrentVisibility = vis; - if (FocalTangent == 0) + if (FocalTangent == 0 || FocalLengthY == 0) { // If r_visibility is called before the renderer is all set up, don't // divide by zero. This will be called again later, and the proper // values can be initialized then.