From 75ff4544ed750c863bcce0ddb816234469ef1eb9 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 27 Nov 2025 16:15:13 +0100 Subject: [PATCH] remove more unused/uneeded things - delet hw_dll - remove sector_t ceilspeed and floorspeed - remove a bunch of stuff from viewvars_s --- src/d_netcmd.c | 1 + src/hardware/hw_data.h | 4 +- src/hardware/hw_defs.h | 8 +-- src/hardware/hw_dll.h | 67 ----------------------- src/hardware/hw_main.cpp | 18 +++---- src/hardware/hw_portal.h | 2 +- src/hardware/r_opengl/r_opengl.c | 8 --- src/hardware/r_opengl/r_opengl.h | 12 ----- src/p_ceilng.c | 21 -------- src/p_floor.c | 92 +------------------------------- src/p_inter.c | 2 + src/p_spec.c | 3 -- src/r_bsp.cpp | 1 + src/r_defs.h | 9 +--- src/r_fps.h | 4 -- src/r_main.cpp | 29 ++-------- 16 files changed, 28 insertions(+), 253 deletions(-) delete mode 100644 src/hardware/hw_dll.h diff --git a/src/d_netcmd.c b/src/d_netcmd.c index eca887ef8..91f1d8245 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3898,6 +3898,7 @@ static void Got_Teamchange(const UINT8 **cp, INT32 playernum) if (G_BattleGametype()) // SRB2kart { players[playernum].marescore = 0; + if (K_IsPlayerWanted(&players[playernum])) K_CalculateBattleWanted(); } diff --git a/src/hardware/hw_data.h b/src/hardware/hw_data.h index 45d072c28..bb174b205 100644 --- a/src/hardware/hw_data.h +++ b/src/hardware/hw_data.h @@ -65,7 +65,7 @@ typedef struct GLMipmap_s GLMipmap_t; struct GLMapTexture_s { GLMipmap_t mipmap; - float scaleX; //used for scaling textures on walls + float scaleX; // used for scaling textures on walls float scaleY; }; typedef struct GLMapTexture_s GLMapTexture_t; @@ -74,7 +74,7 @@ typedef struct GLMapTexture_s GLMapTexture_t; struct GLPatch_s { GLMipmap_t *mipmap; - float max_s,max_t; + float max_s, max_t; }; typedef struct GLPatch_s GLPatch_t; diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index d393c2ec5..b90289d3a 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -79,7 +79,7 @@ typedef struct FColorARGB FColorARGB; // Simple 2D coordinate typedef struct { - FLOAT x,y; + FLOAT x, y; } F2DCoord, v2d_t; // ====================== @@ -142,8 +142,8 @@ enum // Transformed vector, as passed to HWR API typedef struct { - FLOAT x,y,z; - FLOAT s,t; + FLOAT x, y, z; + FLOAT s, t; } FOutVector; typedef struct vbo_vertex_s @@ -173,7 +173,7 @@ typedef struct int rows, columns; int loopcount; - int detail, vertex_count; + int vertex_count; int texture, width, height; boolean rebuild; // VBO needs to be rebuilt diff --git a/src/hardware/hw_dll.h b/src/hardware/hw_dll.h deleted file mode 100644 index 8ee6da2fc..000000000 --- a/src/hardware/hw_dll.h +++ /dev/null @@ -1,67 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 2005 by SRB2 Jr. Team. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -//----------------------------------------------------------------------------- -/// \file -/// \brief Win32 DLL and Shared Objects API definitions - -#ifndef __HWR_DLL_H__ -#define __HWR_DLL_H__ - -// Function declaration for exports from the DLL : -// EXPORT HWRAPI() (); -// If _CREATE_DLL_ is defined the above declaration translates to : -// __declspec(dllexport) WINAPI (); -// If _CREATE_DLL_ is NOT DEFINED the above declaration translates to : -// __declspec(dllexport) type> (WINAPI *) (); - -#ifdef _CREATE_DLL_ - #ifdef __cplusplus - #define EXPORT extern "C" - #else - #define EXPORT - #endif - #ifdef _WIN32 - #define HWRAPI(fn) WINAPI fn - #else - #define HWRAPI(fn) fn - #endif -#else // _CREATE_DLL_ - #define EXPORT typedef - #ifdef _WIN32 - #define HWRAPI(fn) (WINAPI *fn) - #else - #define HWRAPI(fn) (*fn) - #endif -#endif - -// ========================================================================== -// MATHS -// ========================================================================== - -// Constants -#define DEGREE (0.017453292519943295769236907684883l) // 2*PI/360 - -void GL_DBG_Printf(const char *format, ...) /*FUNCPRINTF*/; -#define DBG_Printf GL_DBG_Printf - -#if defined (__CYGWIN__) -void _init() __attribute__((constructor)); -void _fini() __attribute__((destructor)); -#else -void _init(); -void _fini(); -#endif - -#endif diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 36a72a6da..5188c2439 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -2533,7 +2533,7 @@ static boolean HWR_CheckBBox(const fixed_t *bspcoord) // one if statement will split the space in two for one coordinate // for example: // x < BOXLEFT || BOXLEFT || !(x < BOXLEFT) <-- (same as x >= BOXLEFT) - fixed_t mindist;// = min(min(mindist1, mindist2), min(mindist3, mindist4)); + fixed_t mindist = 0;// = min(min(mindist1, mindist2), min(mindist3, mindist4)); // new thing // calculate distance to axis aligned bounding box. @@ -3026,7 +3026,7 @@ static void HWR_Subsector(size_t num) // Hack to make things continue to work around slopes. locCeilingHeight == cullCeilingHeight ? locCeilingHeight : gl_frontsector->ceilingheight, // We now return you to your regularly scheduled rendering. - PF_Occlude, ceilinglightlevel, levelflats[gl_frontsector->ceilingpic].lumpnum,NULL, 255, ceilingcolormap); + PF_Occlude, ceilinglightlevel, levelflats[gl_frontsector->ceilingpic].lumpnum, NULL, 255, ceilingcolormap); } } } @@ -3058,8 +3058,8 @@ static void HWR_Subsector(size_t num) centerHeight = P_GetFFloorBottomZAt(rover, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y); if (centerHeight <= locCeilingHeight && centerHeight >= locFloorHeight && - ((viewz < bottomCullHeight && !(rover->flags & FF_INVERTPLANES)) || - (viewz > bottomCullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((viewz < bottomCullHeight && !(rover->flags & FF_INVERTPLANES)) || + (viewz > bottomCullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) { if (rover->flags & FF_FOG) { @@ -3103,9 +3103,9 @@ static void HWR_Subsector(size_t num) centerHeight = P_GetFFloorTopZAt(rover, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y); if (centerHeight >= locFloorHeight && - centerHeight <= locCeilingHeight && - ((viewz > topCullHeight && !(rover->flags & FF_INVERTPLANES)) || - (viewz < topCullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + centerHeight <= locCeilingHeight && + ((viewz > topCullHeight && !(rover->flags & FF_INVERTPLANES)) || + (viewz < topCullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) { if (rover->flags & FF_FOG) { @@ -5205,7 +5205,6 @@ void HWR_ClearSkyDome(void) sky->rows = sky->columns = 0; sky->loopcount = 0; - sky->detail = 0; sky->texture = -1; sky->width = sky->height = 0; @@ -5224,8 +5223,7 @@ void HWR_BuildSkyDome(void) gl_skyvertex_t *vertex_p; const texture_t *texture = textures[texturetranslation[skytexture]]; - sky->detail = 16; - col_count *= sky->detail; + col_count *= 16; if ((sky->columns != col_count) || (sky->rows != row_count)) HWR_ClearSkyDome(); diff --git a/src/hardware/hw_portal.h b/src/hardware/hw_portal.h index 494110d79..23876281c 100644 --- a/src/hardware/hw_portal.h +++ b/src/hardware/hw_portal.h @@ -65,7 +65,7 @@ extern SINT8 gl_portal_state; // new thing extern gl_portallist_t *currentportallist; -static inline void HWR_SetPortalState (SINT8 state) +static inline void HWR_SetPortalState(SINT8 state) { gl_portal_state = state; } diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index a097d1a18..a78eefb04 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1739,14 +1739,6 @@ void GL_SetBlend(FBITFIELD PolyFlags) if (Xor & PF_Modulated) { -#if defined (__unix__) || defined (UNIXCOMMON) - if (oglflags & GLF_NOTEXENV) - { - if (!(PolyFlags & PF_Modulated)) - pglColor4ubv(white); - } - else -#endif if (PolyFlags & PF_Modulated) { // mix texture colour with Surface->PolyColor pglTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h index dd5748687..da97168fb 100644 --- a/src/hardware/r_opengl/r_opengl.h +++ b/src/hardware/r_opengl/r_opengl.h @@ -38,8 +38,6 @@ extern "C" { #endif #endif -#define _CREATE_DLL_ // necessary for Unix AND Windows - #include "../../doomdef.h" #include "../hw_gl.h" #include "../../z_zone.h" @@ -127,18 +125,8 @@ extern GLint maximumAnisotropy; extern boolean supportNPO2tex; extern boolean supportMipMap; -/** \brief OpenGL flags for video driver -*/ -extern INT32 oglflags; - extern GLfloat projMatrix[16]; -typedef enum -{ - GLF_NOZBUFREAD = 0x01, - GLF_NOTEXENV = 0x02, -} oglflags_t; - #ifdef __cplusplus } // extern "C" #endif diff --git a/src/p_ceilng.c b/src/p_ceilng.c index a00d78008..1ec076325 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -33,7 +33,6 @@ void T_MoveCeiling(ceiling_t *ceiling) { result_e res; - boolean dontupdate = false; if (ceiling->delaytimer) { @@ -69,9 +68,7 @@ void T_MoveCeiling(ceiling_t *ceiling) case instantMoveCeilingByFrontSector: ceiling->sector->ceilingpic = ceiling->texture; ceiling->sector->ceilingdata = NULL; - ceiling->sector->ceilspeed = 0; P_RemoveThinker(&ceiling->thinker); - dontupdate = true; break; case moveCeilingByFrontSector: if (ceiling->texture < -1) // chained linedef executing @@ -83,9 +80,7 @@ void T_MoveCeiling(ceiling_t *ceiling) // case raiseCeilingByLine: case moveCeilingByFrontTexture: ceiling->sector->ceilingdata = NULL; - ceiling->sector->ceilspeed = 0; P_RemoveThinker(&ceiling->thinker); - dontupdate = true; break; case fastCrushAndRaise: @@ -189,9 +184,7 @@ void T_MoveCeiling(ceiling_t *ceiling) case instantMoveCeilingByFrontSector: ceiling->sector->ceilingpic = ceiling->texture; ceiling->sector->ceilingdata = NULL; - ceiling->sector->ceilspeed = 0; P_RemoveThinker(&ceiling->thinker); - dontupdate = true; break; case moveCeilingByFrontSector: @@ -209,9 +202,7 @@ void T_MoveCeiling(ceiling_t *ceiling) // case lowerCeilingByLine: case moveCeilingByFrontTexture: ceiling->sector->ceilingdata = NULL; - ceiling->sector->ceilspeed = 0; P_RemoveThinker(&ceiling->thinker); - dontupdate = true; break; case bounceCeiling: { @@ -290,10 +281,6 @@ void T_MoveCeiling(ceiling_t *ceiling) } break; } - if (!dontupdate) - ceiling->sector->ceilspeed = ceiling->speed*ceiling->direction; - else - ceiling->sector->ceilspeed = 0; } /** Moves a ceiling crusher. @@ -335,12 +322,9 @@ void T_CrushCeiling(ceiling_t *ceiling) switch(ceiling->type) { case crushCeilOnce: - ceiling->sector->ceilspeed = 0; ceiling->sector->ceilingdata = NULL; break; case crushBothOnce: - ceiling->sector->floorspeed = 0; - ceiling->sector->ceilspeed = 0; ceiling->sector->ceilingdata = NULL; break; default: @@ -377,11 +361,6 @@ void T_CrushCeiling(ceiling_t *ceiling) } break; } - - if (ceiling->type == crushBothOnce) - ceiling->sector->floorspeed = ceiling->speed*(-ceiling->direction); - - ceiling->sector->ceilspeed = ceiling->speed*ceiling->direction; } /** Starts a ceiling mover. diff --git a/src/p_floor.c b/src/p_floor.c index f4cc3e992..856d14f09 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -279,7 +279,6 @@ result_e T_MovePlane(sector_t *sector, fixed_t speed, fixed_t dest, boolean crus void T_MoveFloor(floormove_t *movefloor) { result_e res = 0; - boolean dontupdate = false; if (movefloor->delaytimer) { @@ -325,7 +324,6 @@ void T_MoveFloor(floormove_t *movefloor) else movefloor->floordestheight = lines[movefloor->texture].frontsector->floorheight; movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1; - movefloor->sector->floorspeed = movefloor->speed * movefloor->direction; movefloor->delaytimer = movefloor->delay; movefloor->sector->moved = true; return; // not break, why did this work? Graue 04-03-2004 @@ -341,7 +339,6 @@ void T_MoveFloor(floormove_t *movefloor) movefloor->speed = movefloor->origspeed = FixedDiv(abs(lines[movefloor->texture].dx),4*FRACUNIT); // forward again, use dx } movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1; - movefloor->sector->floorspeed = movefloor->speed * movefloor->direction; movefloor->delaytimer = movefloor->delay; movefloor->sector->moved = true; return; // not break, why did this work? Graue 04-03-2004 @@ -374,7 +371,6 @@ void T_MoveFloor(floormove_t *movefloor) else movefloor->floordestheight = lines[movefloor->texture].frontsector->floorheight; movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1; - movefloor->sector->floorspeed = movefloor->speed * movefloor->direction; movefloor->delaytimer = movefloor->delay; movefloor->sector->moved = true; return; // not break, why did this work? Graue 04-03-2004 @@ -390,14 +386,12 @@ void T_MoveFloor(floormove_t *movefloor) movefloor->speed = movefloor->origspeed = FixedDiv(abs(lines[movefloor->texture].dx),4*FRACUNIT); // forward again, use dx } movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1; - movefloor->sector->floorspeed = movefloor->speed * movefloor->direction; movefloor->delaytimer = movefloor->delay; movefloor->sector->moved = true; return; // not break, why did this work? Graue 04-03-2004 case crushFloorOnce: movefloor->sector->floordata = NULL; // Clear up the thinker so others can use it P_RemoveThinker(&movefloor->thinker); - movefloor->sector->floorspeed = 0; movefloor->sector->moved = true; return; default: @@ -406,14 +400,8 @@ void T_MoveFloor(floormove_t *movefloor) } movefloor->sector->floordata = NULL; // Clear up the thinker so others can use it - movefloor->sector->floorspeed = 0; P_RemoveThinker(&movefloor->thinker); - dontupdate = true; } - if (!dontupdate) - movefloor->sector->floorspeed = movefloor->speed*movefloor->direction; - else - movefloor->sector->floorspeed = 0; movefloor->sector->moved = true; } @@ -623,22 +611,13 @@ void T_MoveElevator(elevator_t *elevator) { elevator->sector->floordata = NULL; //jff 2/22/98 elevator->sector->ceilingdata = NULL; //jff 2/22/98 - elevator->sector->ceilspeed = 0; - elevator->sector->floorspeed = 0; P_RemoveThinker(&elevator->thinker); // remove elevator from actives dontupdate = true; } } - if (!dontupdate) + if (dontupdate) { - elevator->sector->floorspeed = elevator->speed*elevator->direction; - elevator->sector->ceilspeed = 42; - } - else - { - elevator->sector->floorspeed = 0; - elevator->sector->ceilspeed = 0; elevator->sector->floordata = NULL; elevator->sector->ceilingdata = NULL; } @@ -695,8 +674,6 @@ void T_ContinuousFalling(levelspecthink_t *faller) } } - faller->sector->floorspeed = faller->speed*faller->direction; - faller->sector->ceilspeed = 42; faller->sector->moved = true; #undef speed #undef direction @@ -767,9 +744,7 @@ void T_BounceCheese(levelspecthink_t *bouncer) { bouncer->sector->crumblestate = 1; bouncer->sector->ceilingdata = NULL; - bouncer->sector->ceilspeed = 0; bouncer->sector->floordata = NULL; - bouncer->sector->floorspeed = 0; P_RemoveThinker(&bouncer->thinker); // remove bouncer from actives return; } @@ -795,8 +770,6 @@ void T_BounceCheese(levelspecthink_t *bouncer) T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor bouncer->sector->ceilingdata = NULL; bouncer->sector->floordata = NULL; - bouncer->sector->floorspeed = 0; - bouncer->sector->ceilspeed = 0; bouncer->sector->moved = true; P_RemoveThinker(&bouncer->thinker); // remove bouncer from actives return; @@ -810,8 +783,6 @@ void T_BounceCheese(levelspecthink_t *bouncer) T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor bouncer->sector->ceilingdata = NULL; bouncer->sector->floordata = NULL; - bouncer->sector->floorspeed = 0; - bouncer->sector->ceilspeed = 0; bouncer->sector->moved = true; P_RemoveThinker(&bouncer->thinker); // remove bouncer from actives return; @@ -827,9 +798,6 @@ void T_BounceCheese(levelspecthink_t *bouncer) T_MovePlane(bouncer->sector, bouncer->speed/2, bouncer->sector->floorheight - 70*FRACUNIT, 0, 0, -1); // move floor - bouncer->sector->floorspeed = -bouncer->speed/2; - bouncer->sector->ceilspeed = 42; - if (bouncer->sector->ceilingheight < bouncer->ceilingwasheight && bouncer->low == 0) // Down { if (abs(bouncer->speed) < 6*FRACUNIT) @@ -878,9 +846,7 @@ void T_BounceCheese(levelspecthink_t *bouncer) T_MovePlane(bouncer->sector, 0, bouncer->sector->ceilingheight, 0, 1, -1); // update things on ceiling T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor bouncer->sector->ceilingdata = NULL; - bouncer->sector->floordata = NULL; - bouncer->sector->floorspeed = 0; - bouncer->sector->ceilspeed = 0; + bouncer->sector->floordata = NULL;; bouncer->sector->moved = true; P_RemoveThinker(&bouncer->thinker); // remove bouncer from actives } @@ -920,8 +886,6 @@ void T_StartCrumble(elevator_t *elevator) || (elevator->floordestheight == 0 && elevator->direction == 1)) && elevator->type == elevateContinuous) // No return crumbler { - elevator->sector->ceilspeed = 0; - elevator->sector->floorspeed = 0; return; } @@ -934,9 +898,6 @@ void T_StartCrumble(elevator_t *elevator) elevator->distance = -15*TICRATE; // Timer until platform returns to original position. else { - // Timer isn't up yet, so just keep waiting. - elevator->sector->ceilspeed = 0; - elevator->sector->floorspeed = 0; return; } } @@ -965,8 +926,6 @@ void T_StartCrumble(elevator_t *elevator) else elevator->direction = 1; - elevator->sector->ceilspeed = 0; - elevator->sector->floorspeed = 0; return; } @@ -1050,9 +1009,6 @@ void T_StartCrumble(elevator_t *elevator) 0, // move ceiling elevator->direction ); - - elevator->sector->ceilspeed = 42; - elevator->sector->floorspeed = elevator->speed*elevator->direction; } } } @@ -1063,8 +1019,6 @@ void T_StartCrumble(elevator_t *elevator) elevator->sector->floorheight = elevator->floorwasheight; elevator->sector->floordata = NULL; elevator->sector->ceilingdata = NULL; - elevator->sector->ceilspeed = 0; - elevator->sector->floorspeed = 0; elevator->sector->moved = true; P_RemoveThinker(&elevator->thinker); } @@ -1121,8 +1075,6 @@ void T_MarioBlock(levelspecthink_t *block) P_RemoveThinker(&block->thinker); block->sector->floordata = NULL; block->sector->ceilingdata = NULL; - block->sector->floorspeed = 0; - block->sector->ceilspeed = 0; } for (i = -1; (i = P_FindSectorFromTag((INT16)block->vars[0], i)) >= 0 ;) @@ -1365,8 +1317,6 @@ wegotit: { bridge->sector->floorheight = LOWCEILINGHEIGHT - (bridge->sector->ceilingheight - bridge->sector->floorheight); bridge->sector->ceilingheight = LOWCEILINGHEIGHT; - bridge->sector->ceilspeed = 0; - bridge->sector->floorspeed = 0; goto dorest; } @@ -1422,9 +1372,6 @@ wegotit: DIRECTION // direction ); - bridge->sector->ceilspeed = 42; - bridge->sector->floorspeed = CURSPEED*DIRECTION; - dorest: // Adjust joined sector heights { @@ -1463,8 +1410,6 @@ wegotit: { bridge->sector->floorheight = ORIGCEILINGHEIGHT - (bridge->sector->ceilingheight - bridge->sector->floorheight); bridge->sector->ceilingheight = ORIGCEILINGHEIGHT; - bridge->sector->ceilspeed = 0; - bridge->sector->floorspeed = 0; continue; } @@ -1519,9 +1464,6 @@ wegotit: 0, // floor or ceiling (0 for floor) DIRECTION // direction ); - - bridge->sector->ceilspeed = 42; - bridge->sector->floorspeed = CURSPEED*DIRECTION; } } } @@ -1558,8 +1500,6 @@ wegotit: { bridge->sector->floorheight = ORIGCEILINGHEIGHT - (bridge->sector->ceilingheight - bridge->sector->floorheight); bridge->sector->ceilingheight = ORIGCEILINGHEIGHT; - bridge->sector->ceilspeed = 0; - bridge->sector->floorspeed = 0; continue; } @@ -1614,9 +1554,6 @@ wegotit: 0, // floor or ceiling (0 for floor) DIRECTION // direction ); - - bridge->sector->ceilspeed = 42; - bridge->sector->floorspeed = CURSPEED*DIRECTION; } } } @@ -1642,8 +1579,6 @@ wegotit: { bridge->sector->floorheight = ORIGCEILINGHEIGHT - (bridge->sector->ceilingheight - bridge->sector->floorheight); bridge->sector->ceilingheight = ORIGCEILINGHEIGHT; - bridge->sector->ceilspeed = 0; - bridge->sector->floorspeed = 0; continue; } @@ -1698,9 +1633,6 @@ wegotit: 0, // floor or ceiling (0 for floor) DIRECTION // direction ); - - bridge->sector->ceilspeed = 42; - bridge->sector->floorspeed = CURSPEED*DIRECTION; } } // Update precip @@ -1875,9 +1807,6 @@ void T_ThwompSector(levelspecthink_t *thwomp) if (res == pastdest) thwomp->direction = 0; // stop moving - - thwomp->sector->ceilspeed = 42; - thwomp->sector->floorspeed = thwomp->speed*thwomp->direction; } else if (thwomp->direction < 0) // Crashing down! { @@ -1932,16 +1861,10 @@ void T_ThwompSector(levelspecthink_t *thwomp) thwomp->direction = 1; // start heading back up thwomp->distance = TICRATE; // but only after a small delay } - - thwomp->sector->ceilspeed = 42; - thwomp->sector->floorspeed = thwomp->speed*thwomp->direction; } else // Not going anywhere, so look for players. { thwomp->direction = -1; - - thwomp->sector->ceilspeed = 0; - thwomp->sector->floorspeed = 0; } actionsector->moved = true; @@ -2355,8 +2278,6 @@ void T_RaiseSector(levelspecthink_t *raise) { raise->sector->floorheight = raise->vars[7] - (raise->sector->ceilingheight - raise->sector->floorheight); raise->sector->ceilingheight = raise->vars[7]; - raise->sector->ceilspeed = 0; - raise->sector->floorspeed = 0; return; } @@ -2370,8 +2291,6 @@ void T_RaiseSector(levelspecthink_t *raise) { raise->sector->floorheight = raise->vars[5] - (raise->sector->ceilingheight - raise->sector->floorheight); raise->sector->ceilingheight = raise->vars[5]; - raise->sector->ceilspeed = 0; - raise->sector->floorspeed = 0; return; } @@ -2390,8 +2309,6 @@ void T_RaiseSector(levelspecthink_t *raise) { raise->sector->floorheight = raise->vars[5] - (raise->sector->ceilingheight - raise->sector->floorheight); raise->sector->ceilingheight = raise->vars[5]; - raise->sector->ceilspeed = 0; - raise->sector->floorspeed = 0; return; } raise->vars[8] = 1; @@ -2404,8 +2321,6 @@ void T_RaiseSector(levelspecthink_t *raise) { raise->sector->floorheight = raise->vars[7] - (raise->sector->ceilingheight - raise->sector->floorheight); raise->sector->ceilingheight = raise->vars[7]; - raise->sector->ceilspeed = 0; - raise->sector->floorspeed = 0; return; } raise->vars[8] = -1; @@ -2460,9 +2375,6 @@ void T_RaiseSector(levelspecthink_t *raise) raise->vars[8] // direction ); - raise->sector->ceilspeed = 42; - raise->sector->floorspeed = raise->vars[3]*raise->vars[8]; - for (i = -1; (i = P_FindSectorFromTag(raise->sourceline->tag, i)) >= 0 ;) sectors[i].moved = true; } diff --git a/src/p_inter.c b/src/p_inter.c index e5cc6b8b0..2df4e5a18 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2203,7 +2203,9 @@ static void P_KillPlayer(player_t *player, mobj_t *source) P_SetScale(karmahitbox, player->mo->scale); CONS_Printf(M_GetText("%s lost all of their bumpers!\n"), player_names[player-players]); } + player->kartstuff[k_bumper]--; + if (K_IsPlayerWanted(player)) K_CalculateBattleWanted(); } diff --git a/src/p_spec.c b/src/p_spec.c index d0c50ea02..e331953d8 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1978,13 +1978,11 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) { P_RemoveThinker(&((elevator_t *)sectors[secnum].floordata)->thinker); sectors[secnum].floordata = sectors[secnum].ceilingdata = NULL; - sectors[secnum].floorspeed = sectors[secnum].ceilspeed = 0; } else // floormove { P_RemoveThinker(&((floormove_t *)sectors[secnum].floordata)->thinker); sectors[secnum].floordata = NULL; - sectors[secnum].floorspeed = 0; } } @@ -1992,7 +1990,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) { P_RemoveThinker(&((ceiling_t *)sectors[secnum].ceilingdata)->thinker); sectors[secnum].ceilingdata = NULL; - sectors[secnum].ceilspeed = 0; } } break; diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index e680783dd..55db7320a 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1117,6 +1117,7 @@ void R_Prep3DFloors(sector_t *sector) bestslope = *rover->t_slope; continue; } + if (rover->flags & FF_DOUBLESHADOW) { heighttest = P_GetFFloorBottomZAt(rover, sector->soundorg.x, sector->soundorg.y); diff --git a/src/r_defs.h b/src/r_defs.h index 876c63485..e6c5866c6 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -397,9 +397,6 @@ typedef struct sector_s // Sprite culling feature struct line_s *cullheight; - // Current speed of ceiling/floor. For Knuckles to hold onto stuff. - fixed_t floorspeed, ceilspeed; - // Eternity engine slope boolean hasslope; // The sector, or one of its visible FOFs, contains a slope } sector_t; @@ -549,12 +546,10 @@ typedef struct seg_s sector_t *backsector; fixed_t length; // precalculated seg length - #ifdef HWRENDER - floatvertex_t fv1; - floatvertex_t fv2; + floatvertex_t fv1; // v1 in floats - precalculated + floatvertex_t fv2; // v2 in floats - precalculated #endif - polyobj_t *polyseg; // Fake contrast calculated on level load diff --git a/src/r_fps.h b/src/r_fps.h index 7ad5e9f16..c1447897e 100644 --- a/src/r_fps.h +++ b/src/r_fps.h @@ -75,15 +75,11 @@ typedef struct { fixed_t y; fixed_t z; boolean sky; - sector_t *sector; player_t *player; angle_t angle; angle_t aim; angle_t roll; - fixed_t cos; - fixed_t sin; - mobj_t *mobj; } viewvars_t; extern viewvars_t *newview; diff --git a/src/r_main.cpp b/src/r_main.cpp index 452ed79c7..af5e821b2 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -1094,7 +1094,7 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) mobj_t *viewmobj = NULL; -static void R_SetupCommonFrame(player_t * player, sector_t * sector) +static void R_SetupCommonFrame(player_t * player) { newview->player = player; @@ -1104,11 +1104,6 @@ static void R_SetupCommonFrame(player_t * player, sector_t * sector) newview->roll = R_ViewRollAngle(player); - if (sector != NULL) - newview->sector = sector; - else - newview->sector = R_PointInSubsectorFast(newview->x, newview->y)->sector; - R_InterpolateView(R_GetTimeFrac(RTF_CAMERA), false); } @@ -1207,7 +1202,6 @@ void R_SkyboxFrame(UINT8 pnum) { player_t *player = &players[displayplayers[pnum]]; camera_t *thiscam = &camera[pnum]; - sector_t *viewsec = NULL; mapheader_t *mh = mapheaderinfo[gamemap-1]; R_SetViewContext(static_cast(VIEWCONTEXT_SKY1 + pnum)); @@ -1233,9 +1227,6 @@ void R_SkyboxFrame(UINT8 pnum) newview->x = viewmobj->x; newview->y = viewmobj->y; newview->z = (viewmobj->spawnpoint) ? (((fixed_t)viewmobj->spawnpoint->angle) << FRACBITS) : 0; - - if (viewmobj->subsector) - viewsec = viewmobj->subsector->sector; } if (mh) @@ -1243,7 +1234,7 @@ void R_SkyboxFrame(UINT8 pnum) R_SetupSkyScale(player, thiscam, mh); } - R_SetupCommonFrame(player, viewsec); + R_SetupCommonFrame(player); } void R_SetupFrame(UINT8 pnum, boolean skybox) @@ -1251,7 +1242,6 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) player_t *player = &players[displayplayers[pnum]]; camera_t *thiscam = &camera[pnum]; boolean chasecam = (cv_chasecam[pnum].value); - sector_t *viewsec = NULL; R_SetViewContext(static_cast(VIEWCONTEXT_PLAYER1 + pnum)); @@ -1295,10 +1285,7 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) newview->y = viewmobj->y; newview->z = viewmobj->z + 20*FRACUNIT; - if (viewmobj->subsector) - viewsec = viewmobj->subsector->sector; - - R_SetupCommonFrame(player, viewsec); + R_SetupCommonFrame(player); } else if (thiscam && chasecam) // use outside cam view { @@ -1309,10 +1296,7 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) newview->y = thiscam->y; newview->z = thiscam->z + (thiscam->height>>1); - if (thiscam->subsector) - viewsec = thiscam->subsector->sector; - - R_SetupCommonFrame(player, viewsec); + R_SetupCommonFrame(player); } else if (player->mo) // use the player's eyes view { @@ -1323,10 +1307,7 @@ void R_SetupFrame(UINT8 pnum, boolean skybox) newview->y = viewmobj->y; newview->z = player->viewz; - if (viewmobj->subsector) - viewsec = viewmobj->subsector->sector; - - R_SetupCommonFrame(player, viewsec); + R_SetupCommonFrame(player); } }