mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into Packet
# Conflicts: # source/core/inputstate.cpp # source/exhumed/src/exhumed.h
This commit is contained in:
commit
dc1f56e8f9
55 changed files with 117 additions and 217 deletions
|
@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "common_game.h"
|
#include "common_game.h"
|
||||||
#include "g_input.h"
|
#include "g_input.h"
|
||||||
|
@ -791,8 +790,9 @@ static void gameTicker()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
netCheckSync();
|
netCheckSync();
|
||||||
|
auto beforeSwapTime = I_msTimeF();
|
||||||
viewDrawScreen();
|
viewDrawScreen();
|
||||||
g_gameUpdateAndDrawTime = g_beforeSwapTime/* I_msTimeF()*/ - gameUpdateStartTime;
|
g_gameUpdateAndDrawTime = beforeSwapTime/* I_msTimeF()*/ - gameUpdateStartTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "db.h"
|
#include "db.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
|
|
||||||
BEGIN_BLD_NS
|
BEGIN_BLD_NS
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "baselayer.h"
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h" // Must come before everything else!
|
#include "ns.h" // Must come before everything else!
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "common_game.h"
|
#include "common_game.h"
|
||||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h" // Must come before everything else!
|
#include "ns.h" // Must come before everything else!
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
#include "common_game.h"
|
#include "common_game.h"
|
||||||
|
|
|
@ -66,7 +66,7 @@ void viewInitializePrediction(void)
|
||||||
predict.at6f = gMe->cantJump;
|
predict.at6f = gMe->cantJump;
|
||||||
predict.at70 = gMe->isRunning;
|
predict.at70 = gMe->isRunning;
|
||||||
predict.at72 = gMe->isUnderwater;
|
predict.at72 = gMe->isUnderwater;
|
||||||
predict.at71 = gMe->input.syncFlags.jump;
|
predict.at71 = !!(gMe->input.actions & SB_JUMP);
|
||||||
predict.at50 = gMe->pSprite->x;
|
predict.at50 = gMe->pSprite->x;
|
||||||
predict.at54 = gMe->pSprite->y;
|
predict.at54 = gMe->pSprite->y;
|
||||||
predict.at58 = gMe->pSprite->z;
|
predict.at58 = gMe->pSprite->z;
|
||||||
|
@ -78,7 +78,7 @@ void viewInitializePrediction(void)
|
||||||
predict.at6a = gMe->pXSprite->height;
|
predict.at6a = gMe->pXSprite->height;
|
||||||
predict.at48 = gMe->posture;
|
predict.at48 = gMe->posture;
|
||||||
predict.at4c = gMe->spin;
|
predict.at4c = gMe->spin;
|
||||||
predict.at6e = gMe->input.syncFlags.lookCenter;
|
predict.at6e = !!(gMe->input.actions & SB_CENTERVIEW);
|
||||||
memcpy(&predict.at75,&gSpriteHit[gMe->pSprite->extra],sizeof(SPRITEHIT));
|
memcpy(&predict.at75,&gSpriteHit[gMe->pSprite->extra],sizeof(SPRITEHIT));
|
||||||
predict.at0 = gMe->bobPhase;
|
predict.at0 = gMe->bobPhase;
|
||||||
predict.at4 = gMe->bobAmp;
|
predict.at4 = gMe->bobAmp;
|
||||||
|
@ -135,8 +135,8 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
||||||
gViewLookAdjust = 0.f;
|
gViewLookAdjust = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
predict.at70 = pInput->syncFlags.run;
|
predict.at70 = !!(gMe->input.actions & SB_RUN);
|
||||||
predict.at71 = pInput->syncFlags.jump;
|
predict.at71 = !!(gMe->input.actions & SB_JUMP);
|
||||||
if (predict.at48 == 1)
|
if (predict.at48 == 1)
|
||||||
{
|
{
|
||||||
int x = Cos(fix16_to_int(predict.at30));
|
int x = Cos(fix16_to_int(predict.at30));
|
||||||
|
@ -190,7 +190,7 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
||||||
}
|
}
|
||||||
if (pInput->q16avel)
|
if (pInput->q16avel)
|
||||||
predict.at30 = (predict.at30+pInput->q16avel)&0x7ffffff;
|
predict.at30 = (predict.at30+pInput->q16avel)&0x7ffffff;
|
||||||
if (pInput->syncFlags.spin180)
|
if (pInput->actions & SB_TURNAROUND)
|
||||||
if (!predict.at4c)
|
if (!predict.at4c)
|
||||||
predict.at4c = -1024;
|
predict.at4c = -1024;
|
||||||
if (predict.at4c < 0)
|
if (predict.at4c < 0)
|
||||||
|
@ -215,11 +215,11 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
||||||
case 1:
|
case 1:
|
||||||
if (predict.at71)
|
if (predict.at71)
|
||||||
predict.at64 -= pPosture->normalJumpZ;//0x5b05;
|
predict.at64 -= pPosture->normalJumpZ;//0x5b05;
|
||||||
if (pInput->syncFlags.crouch)
|
if (pInput->actions & SB_CROUCH)
|
||||||
predict.at64 += pPosture->normalJumpZ;//0x5b05;
|
predict.at64 += pPosture->normalJumpZ;//0x5b05;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!pInput->syncFlags.crouch)
|
if (!(pInput->actions & SB_CROUCH))
|
||||||
predict.at48 = 0;
|
predict.at48 = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -228,7 +228,7 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
|
||||||
else predict.at64 = pPosture->normalJumpZ;//-0xbaaaa;
|
else predict.at64 = pPosture->normalJumpZ;//-0xbaaaa;
|
||||||
predict.at6f = 1;
|
predict.at6f = 1;
|
||||||
}
|
}
|
||||||
if (pInput->syncFlags.crouch)
|
if (pInput->actions & SB_CROUCH)
|
||||||
predict.at48 = 2;
|
predict.at48 = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "common_game.h"
|
#include "common_game.h"
|
||||||
#include "levels.h"
|
#include "levels.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "raze_music.h"
|
#include "raze_music.h"
|
||||||
#include "raze_sound.h"
|
#include "raze_sound.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
|
|
|
@ -690,11 +690,7 @@ void viewDrawScreen(bool sceneonly)
|
||||||
|
|
||||||
int yxAspect = yxaspect;
|
int yxAspect = yxaspect;
|
||||||
int viewingRange = viewingrange;
|
int viewingRange = viewingrange;
|
||||||
if (r_usenewaspect)
|
|
||||||
{
|
|
||||||
newaspect_enable = 1;
|
|
||||||
videoSetCorrectedAspect();
|
videoSetCorrectedAspect();
|
||||||
}
|
|
||||||
|
|
||||||
int v1 = Blrintf(double(viewingrange) * tan(r_fov * (PI / 360.)));
|
int v1 = Blrintf(double(viewingrange) * tan(r_fov * (PI / 360.)));
|
||||||
|
|
||||||
|
@ -1004,8 +1000,6 @@ void viewDrawScreen(bool sceneonly)
|
||||||
|
|
||||||
bDeliriumOld = bDelirium && gDeliriumBlur;
|
bDeliriumOld = bDelirium && gDeliriumBlur;
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
newaspect_enable = 0;
|
|
||||||
renderSetAspect(viewingRange, yxAspect);
|
renderSetAspect(viewingRange, yxAspect);
|
||||||
int nClipDist = gView->pSprite->clipdist << 2;
|
int nClipDist = gView->pSprite->clipdist << 2;
|
||||||
int ve8, vec, vf0, vf4;
|
int ve8, vec, vf0, vf4;
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
// Base services interface declaration
|
|
||||||
// for the Build Engine
|
|
||||||
// by Jonathon Fowler (jf@jonof.id.au)
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef baselayer_h_
|
|
||||||
#define baselayer_h_
|
|
||||||
|
|
||||||
#include "compat.h"
|
|
||||||
#include "c_dispatch.h"
|
|
||||||
#include "c_cvars.h"
|
|
||||||
#include "inputstate.h"
|
|
||||||
#include "printf.h"
|
|
||||||
#include "zstring.h"
|
|
||||||
#include "vectors.h"
|
|
||||||
|
|
||||||
extern int32_t swapcomplete;
|
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, r_usenewaspect)
|
|
||||||
|
|
||||||
// video
|
|
||||||
extern int32_t newaspect_enable;
|
|
||||||
extern int32_t r_fpgrouscan;
|
|
||||||
extern int32_t setaspect_new_use_dimen;
|
|
||||||
extern int32_t xres, yres, bpp;
|
|
||||||
|
|
||||||
int32_t videoCheckMode(int32_t *x, int32_t *y, int32_t c, int32_t fs, int32_t forced);
|
|
||||||
int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs);
|
|
||||||
void videoGetModes(void);
|
|
||||||
void videoShowFrame(int32_t);
|
|
||||||
int32_t videoUpdatePalette(int32_t start, int32_t num);
|
|
||||||
|
|
||||||
extern int32_t qsetmode;
|
|
||||||
|
|
||||||
#define in3dmode() (qsetmode==200)
|
|
||||||
|
|
||||||
extern int32_t g_logFlushWindow;
|
|
||||||
|
|
||||||
#include "gamestruct.h"
|
|
||||||
#endif // baselayer_h_
|
|
||||||
|
|
|
@ -646,7 +646,6 @@ void vox_undefine(int32_t const);
|
||||||
void vox_deinit();
|
void vox_deinit();
|
||||||
|
|
||||||
int32_t videoSetGameMode(char davidoption, int32_t daupscaledxdim, int32_t daupscaledydim, int32_t dabpp, int32_t daupscalefactor);
|
int32_t videoSetGameMode(char davidoption, int32_t daupscaledxdim, int32_t daupscaledydim, int32_t dabpp, int32_t daupscalefactor);
|
||||||
void videoNextPage(void);
|
|
||||||
void videoSetCorrectedAspect();
|
void videoSetCorrectedAspect();
|
||||||
void videoSetViewableArea(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
|
void videoSetViewableArea(int32_t x1, int32_t y1, int32_t x2, int32_t y2);
|
||||||
void renderSetAspect(int32_t daxrange, int32_t daaspect);
|
void renderSetAspect(int32_t daxrange, int32_t daaspect);
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# define polymost_h_
|
# define polymost_h_
|
||||||
|
|
||||||
|
|
||||||
#include "baselayer.h" // glinfo
|
|
||||||
#include "mdsprite.h"
|
#include "mdsprite.h"
|
||||||
|
|
||||||
void Polymost_CacheHitList(uint8_t* hash);
|
void Polymost_CacheHitList(uint8_t* hash);
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
#include "printf.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "../../glbackend/glbackend.h"
|
#include "../../glbackend/glbackend.h"
|
||||||
#include "textures.h"
|
#include "textures.h"
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
// by the EDuke32 team (development@voidpoint.com)
|
// by the EDuke32 team (development@voidpoint.com)
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "clip.h"
|
#include "clip.h"
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
|
|
||||||
static int16_t clipnum;
|
static int16_t clipnum;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "scriptfile.h"
|
#include "scriptfile.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#define engine_c_
|
#define engine_c_
|
||||||
|
|
||||||
#include "gl_load.h"
|
#include "gl_load.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
|
||||||
#include "imagehelpers.h"
|
#include "imagehelpers.h"
|
||||||
|
@ -28,6 +27,8 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "earcut.hpp"
|
#include "earcut.hpp"
|
||||||
#include "gamestate.h"
|
#include "gamestate.h"
|
||||||
|
#include "inputstate.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
# include "mdsprite.h"
|
# include "mdsprite.h"
|
||||||
|
@ -79,11 +80,6 @@ static int32_t beforedrawrooms = 1;
|
||||||
|
|
||||||
static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1;
|
static int32_t oxdimen = -1, oviewingrange = -1, oxyaspect = -1;
|
||||||
|
|
||||||
// r_usenewaspect is the cvar, newaspect_enable to trigger the new behaviour in the code
|
|
||||||
CVAR(Bool, r_usenewaspect, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
|
|
||||||
int32_t newaspect_enable=0;
|
|
||||||
|
|
||||||
int32_t r_fpgrouscan = 1;
|
|
||||||
int32_t globalflags;
|
int32_t globalflags;
|
||||||
|
|
||||||
static int8_t tempbuf[MAXWALLS];
|
static int8_t tempbuf[MAXWALLS];
|
||||||
|
@ -350,7 +346,6 @@ int16_t globalpicnum;
|
||||||
static int32_t globaly1, globalx2;
|
static int32_t globaly1, globalx2;
|
||||||
|
|
||||||
int16_t sectorborder[256];
|
int16_t sectorborder[256];
|
||||||
int32_t ydim16, qsetmode = 0;
|
|
||||||
int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
|
int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
|
||||||
|
|
||||||
int32_t halfxdim16, midydim16;
|
int32_t halfxdim16, midydim16;
|
||||||
|
@ -2143,10 +2138,8 @@ void renderDrawMapView(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
renderSetAspect(oviewingrange, oyxaspect);
|
renderSetAspect(oviewingrange, oyxaspect);
|
||||||
else
|
|
||||||
renderSetAspect(65536, divscale16(ydim*320, xdim*200));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////// LOADING AND SAVING ROUTINES ////////////////////
|
//////////////////// LOADING AND SAVING ROUTINES ////////////////////
|
||||||
|
@ -2681,15 +2674,9 @@ int32_t videoSetGameMode(char davidoption, int32_t daupscaledxdim, int32_t daups
|
||||||
daupscaledxdim = max(320, daupscaledxdim);
|
daupscaledxdim = max(320, daupscaledxdim);
|
||||||
daupscaledydim = max(200, daupscaledydim);
|
daupscaledydim = max(200, daupscaledydim);
|
||||||
|
|
||||||
if (in3dmode() &&
|
|
||||||
(xres == daupscaledxdim) && (yres == daupscaledydim) && (bpp == dabpp))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
Bstrcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI."
|
Bstrcpy(kensmessage,"!!!! BUILD engine&tools programmed by Ken Silverman of E.G. RI."
|
||||||
" (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!");
|
" (c) Copyright 1995 Ken Silverman. Summary: BUILD = Ken. !!!!");
|
||||||
|
|
||||||
j = bpp;
|
|
||||||
|
|
||||||
rendmode = REND_POLYMOST;
|
rendmode = REND_POLYMOST;
|
||||||
|
|
||||||
upscalefactor = 1;
|
upscalefactor = 1;
|
||||||
|
@ -2713,26 +2700,9 @@ int32_t videoSetGameMode(char davidoption, int32_t daupscaledxdim, int32_t daups
|
||||||
|
|
||||||
if (searchx < 0) { searchx = halfxdimen; searchy = (ydimen>>1); }
|
if (searchx < 0) { searchx = halfxdimen; searchy = (ydimen>>1); }
|
||||||
|
|
||||||
qsetmode = 200;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// nextpage
|
|
||||||
//
|
|
||||||
void videoNextPage(void)
|
|
||||||
{
|
|
||||||
g_beforeSwapTime = I_msTimeF();
|
|
||||||
videoShowFrame(0);
|
|
||||||
|
|
||||||
omdtims = mdtims;
|
|
||||||
mdtims = I_msTime();
|
|
||||||
|
|
||||||
for (native_t i = 0; i < MAXSPRITES + MAXUNIQHUDID; ++i)
|
|
||||||
if ((mdpause && spriteext[i].mdanimtims) || (spriteext[i].flags & SPREXT_NOMDANIM))
|
|
||||||
spriteext[i].mdanimtims += mdtims - omdtims;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// qloadkvx
|
// qloadkvx
|
||||||
//
|
//
|
||||||
|
@ -3718,30 +3688,20 @@ void rotatepoint(vec2_t const pivot, vec2_t p, int16_t const daang, vec2_t * con
|
||||||
p2->y = dmulscale14(p.y, dacos, p.x, dasin) + pivot.y;
|
p2->y = dmulscale14(p.y, dacos, p.x, dasin) + pivot.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t setaspect_new_use_dimen = 0;
|
|
||||||
|
|
||||||
void videoSetCorrectedAspect()
|
void videoSetCorrectedAspect()
|
||||||
{
|
{
|
||||||
if (/*r_usenewaspect &&*/ newaspect_enable && videoGetRenderMode() != REND_POLYMER)
|
|
||||||
{
|
|
||||||
// In DOS the game world is displayed with an aspect of 1.28 instead 1.333,
|
// In DOS the game world is displayed with an aspect of 1.28 instead 1.333,
|
||||||
// meaning we have to stretch it by a factor of 1.25 instead of 1.2
|
// meaning we have to stretch it by a factor of 1.25 instead of 1.2
|
||||||
// to get perfect squares
|
// to get perfect squares
|
||||||
int32_t yx = (65536 * 5) / 4;
|
int32_t yx = (65536 * 5) / 4;
|
||||||
int32_t vr, y, x;
|
int32_t vr, y, x;
|
||||||
|
|
||||||
const int32_t xd = setaspect_new_use_dimen ? xdimen : xdim;
|
x = xdim;
|
||||||
const int32_t yd = setaspect_new_use_dimen ? ydimen : ydim;
|
y = ydim;
|
||||||
|
|
||||||
x = xd;
|
|
||||||
y = yd;
|
|
||||||
|
|
||||||
vr = divscale16(x*3, y*4);
|
vr = divscale16(x*3, y*4);
|
||||||
|
|
||||||
renderSetAspect(vr, yx);
|
renderSetAspect(vr, yx);
|
||||||
}
|
|
||||||
else
|
|
||||||
renderSetAspect(65536, divscale16(ydim*320, xdim*200));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -109,7 +109,6 @@ extern int16_t searchbottomwall, searchisbottom;
|
||||||
extern char inpreparemirror;
|
extern char inpreparemirror;
|
||||||
|
|
||||||
extern int16_t sectorborder[256];
|
extern int16_t sectorborder[256];
|
||||||
extern int32_t qsetmode;
|
|
||||||
extern int32_t hitallsprites;
|
extern int32_t hitallsprites;
|
||||||
|
|
||||||
extern int32_t xb1[MAXWALLSB];
|
extern int32_t xb1[MAXWALLSB];
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "pragmas.h"
|
#include "pragmas.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
#include "polymost.h"
|
#include "polymost.h"
|
||||||
#include "mdsprite.h"
|
#include "mdsprite.h"
|
||||||
|
@ -18,6 +17,7 @@
|
||||||
#include "flatvertices.h"
|
#include "flatvertices.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
#include "hw_renderstate.h"
|
#include "hw_renderstate.h"
|
||||||
|
#include "printf.h"
|
||||||
#include "../../glbackend/glbackend.h"
|
#include "../../glbackend/glbackend.h"
|
||||||
|
|
||||||
static int32_t curextra=MAXTILES;
|
static int32_t curextra=MAXTILES;
|
||||||
|
@ -1677,6 +1677,16 @@ static void mdfree(mdmodel_t *vm)
|
||||||
if (vm->mdnum == 2 || vm->mdnum == 3) { md3free((md3model_t *)vm); return; }
|
if (vm->mdnum == 2 || vm->mdnum == 3) { md3free((md3model_t *)vm); return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void updateModelInterpolation()
|
||||||
|
{
|
||||||
|
// sigh...
|
||||||
|
omdtims = mdtims;
|
||||||
|
mdtims = I_msTime();
|
||||||
|
|
||||||
|
for (native_t i = 0; i < MAXSPRITES + MAXUNIQHUDID; ++i)
|
||||||
|
if ((mdpause && spriteext[i].mdanimtims) || (spriteext[i].flags & SPREXT_NOMDANIM))
|
||||||
|
spriteext[i].mdanimtims += mdtims - omdtims;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//---------------------------------------- MD LIBRARY ENDS ----------------------------------------
|
//---------------------------------------- MD LIBRARY ENDS ----------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "scriptfile.h"
|
#include "scriptfile.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
usermaphack_t g_loadedMapHack; // used only for the MD4 part
|
usermaphack_t g_loadedMapHack; // used only for the MD4 part
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ Ken Silverman's official web site: http://www.advsys.net/ken
|
||||||
#include "palettecontainer.h"
|
#include "palettecontainer.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
#include "hw_renderstate.h"
|
#include "hw_renderstate.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "scriptfile.h"
|
#include "scriptfile.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
|
#include "printf.h"
|
||||||
|
|
||||||
|
|
||||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "pragmas.h"
|
#include "pragmas.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
#include "polymost.h"
|
#include "polymost.h"
|
||||||
#include "mdsprite.h"
|
#include "mdsprite.h"
|
||||||
|
|
|
@ -53,6 +53,9 @@ enum EKeyCodes
|
||||||
KEY_PGUP = 0xc9, // DIK_PRIOR
|
KEY_PGUP = 0xc9, // DIK_PRIOR
|
||||||
KEY_PGDN = 0xd1, // DIK_NEXT
|
KEY_PGDN = 0xd1, // DIK_NEXT
|
||||||
|
|
||||||
|
KEY_VOLUMEDOWN = 0xAE, // DIK_VOLUMEDOWN
|
||||||
|
KEY_VOLUMEUP = 0xB0, // DIK_VOLUMEUP
|
||||||
|
|
||||||
KEY_FIRSTMOUSEBUTTON = 0x100,
|
KEY_FIRSTMOUSEBUTTON = 0x100,
|
||||||
KEY_MOUSE1 = 0x100,
|
KEY_MOUSE1 = 0x100,
|
||||||
KEY_MOUSE2 = 0x101,
|
KEY_MOUSE2 = 0x101,
|
||||||
|
|
|
@ -91,11 +91,9 @@ CUSTOM_CVAR(Int, mouse_capturemode, 1, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The last remains of sdlayer.cpp
|
// The last remains of sdlayer.cpp
|
||||||
double g_beforeSwapTime;
|
|
||||||
GameInterface* gi;
|
GameInterface* gi;
|
||||||
int myconnectindex, numplayers;
|
int myconnectindex, numplayers;
|
||||||
int connecthead, connectpoint2[MAXMULTIPLAYERS];
|
int connecthead, connectpoint2[MAXMULTIPLAYERS];
|
||||||
int32_t xres = -1, yres = -1, bpp = 0;
|
|
||||||
auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need an address for it to satisfy the MinGW compiled libraries.
|
auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need an address for it to satisfy the MinGW compiled libraries.
|
||||||
int gameclock;
|
int gameclock;
|
||||||
int lastTic;
|
int lastTic;
|
||||||
|
@ -939,10 +937,10 @@ void app_loop()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
I_SetFrameTime();
|
||||||
TickSubsystems();
|
TickSubsystems();
|
||||||
twod->SetSize(screen->GetWidth(), screen->GetHeight());
|
twod->SetSize(screen->GetWidth(), screen->GetHeight());
|
||||||
twodpsp.SetSize(screen->GetWidth(), screen->GetHeight());
|
twodpsp.SetSize(screen->GetWidth(), screen->GetHeight());
|
||||||
I_SetFrameTime();
|
|
||||||
|
|
||||||
handleevents();
|
handleevents();
|
||||||
updatePauseStatus();
|
updatePauseStatus();
|
||||||
|
@ -963,7 +961,7 @@ void app_loop()
|
||||||
soundEngine->UpdateSounds(I_GetTime());
|
soundEngine->UpdateSounds(I_GetTime());
|
||||||
Mus_UpdateMusic(); // must be at the end.
|
Mus_UpdateMusic(); // must be at the end.
|
||||||
|
|
||||||
videoNextPage();
|
videoShowFrame(0);
|
||||||
videoSetBrightness(0); // immediately reset this so that the value doesn't stick around in the backend.
|
videoSetBrightness(0); // immediately reset this so that the value doesn't stick around in the backend.
|
||||||
}
|
}
|
||||||
catch (CRecoverableError& err)
|
catch (CRecoverableError& err)
|
||||||
|
|
|
@ -96,7 +96,6 @@ struct GameInterface
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GameInterface* gi;
|
extern GameInterface* gi;
|
||||||
extern double g_beforeSwapTime;
|
|
||||||
|
|
||||||
|
|
||||||
void ImGui_Begin_Frame();
|
void ImGui_Begin_Frame();
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "statusbar.h"
|
#include "statusbar.h"
|
||||||
#include"packet.h"
|
#include"packet.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
|
|
||||||
static int WeaponToSend = 0;
|
static int WeaponToSend = 0;
|
||||||
ESyncBits ActionsToSend = 0;
|
ESyncBits ActionsToSend = 0;
|
||||||
|
@ -93,14 +94,32 @@ void InputState::GetMouseDelta(ControlInfo * info)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
static int exclKeys[] = { KEY_VOLUMEDOWN, KEY_VOLUMEUP };
|
||||||
|
|
||||||
void InputState::AddEvent(const event_t *ev)
|
void InputState::AddEvent(const event_t *ev)
|
||||||
{
|
{
|
||||||
if (ev->type == EV_KeyDown || ev->type == EV_KeyUp)
|
if (ev->type == EV_KeyDown || ev->type == EV_KeyUp)
|
||||||
{
|
{
|
||||||
int key = ev->data1;
|
int key = ev->data1;
|
||||||
bool state = ev->type == EV_KeyDown;
|
bool state = ev->type == EV_KeyDown;
|
||||||
|
bool ignore = false;
|
||||||
KeyStatus[key] = (uint8_t)state;
|
KeyStatus[key] = (uint8_t)state;
|
||||||
if (state && !(key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT))
|
|
||||||
|
// Check if key is to be excluded from setting AnyKeyStatus.
|
||||||
|
for (int i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
if (exclKeys[i] == key)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT)
|
||||||
|
{
|
||||||
|
ignore = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state && !ignore)
|
||||||
AnyKeyStatus = true;
|
AnyKeyStatus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "d_event.h"
|
#include "d_event.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "v_draw.h"
|
#include "v_draw.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "serializer.h"
|
#include "serializer.h"
|
||||||
#include "findfile.h"
|
#include "findfile.h"
|
||||||
|
#include "inputstate.h"
|
||||||
|
|
||||||
|
|
||||||
FSavegameManager savegameManager;
|
FSavegameManager savegameManager;
|
||||||
|
|
|
@ -149,7 +149,7 @@ struct InputPacket
|
||||||
int16_t fvel;
|
int16_t fvel;
|
||||||
fix16_t q16avel;
|
fix16_t q16avel;
|
||||||
fix16_t q16horz;
|
fix16_t q16horz;
|
||||||
fix16_t q16aimvel; // only used by SW
|
fix16_t q16horiz; // only used by SW
|
||||||
fix16_t q16ang; // only used by SW
|
fix16_t q16ang; // only used by SW
|
||||||
ESyncBits actions;
|
ESyncBits actions;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "m_swap.h"
|
#include "m_swap.h"
|
||||||
#include "v_colortables.h"
|
#include "v_colortables.h"
|
||||||
#include "v_font.h"
|
#include "v_font.h"
|
||||||
|
#include "printf.h"
|
||||||
#include "../../glbackend/glbackend.h"
|
#include "../../glbackend/glbackend.h"
|
||||||
|
|
||||||
LookupTableInfo lookups;
|
LookupTableInfo lookups;
|
||||||
|
|
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#define __exhumed_h__
|
#define __exhumed_h__
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "gamecvars.h"
|
#include "gamecvars.h"
|
||||||
|
@ -252,7 +251,7 @@ struct GameInterface : ::GameInterface
|
||||||
bool SaveGame(FSaveGameNode* sv) override;
|
bool SaveGame(FSaveGameNode* sv) override;
|
||||||
bool CanSave() override;
|
bool CanSave() override;
|
||||||
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
|
ReservedSpace GetReservedScreenSpace(int viewsize) override { return { 0, 24 }; }
|
||||||
void QuitToTitle();
|
void QuitToTitle() override;
|
||||||
|
|
||||||
FString statFPS() override;
|
FString statFPS() override;
|
||||||
::GameStats getStats() override;
|
::GameStats getStats() override;
|
||||||
|
|
|
@ -17,7 +17,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
|
|
@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "baselayer.h"
|
|
||||||
#include "c_bind.h"
|
#include "c_bind.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "v_2ddrawer.h"
|
#include "v_2ddrawer.h"
|
||||||
|
|
|
@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
|
|
@ -222,9 +222,7 @@ static void analyzesprites()
|
||||||
|
|
||||||
void ResetView()
|
void ResetView()
|
||||||
{
|
{
|
||||||
//videoSetGameMode(gSetup.fullscreen, gSetup.xdim, gSetup.ydim, gSetup.bpp, 0);
|
|
||||||
EraseScreen(overscanindex);
|
EraseScreen(overscanindex);
|
||||||
//videoUpdatePalette(0, 256);
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
videoTintBlood(0, 0, 0);
|
videoTintBlood(0, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -360,14 +358,9 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
int const viewingRange = viewingrange;
|
int const viewingRange = viewingrange;
|
||||||
int const vr = Blrintf(65536.f * tanf(r_fov * (fPI / 360.f)));
|
int const vr = Blrintf(65536.f * tanf(r_fov * (fPI / 360.f)));
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
{
|
|
||||||
newaspect_enable = 1;
|
|
||||||
videoSetCorrectedAspect();
|
videoSetCorrectedAspect();
|
||||||
renderSetAspect(mulscale16(vr, viewingrange), yxaspect);
|
renderSetAspect(mulscale16(vr, viewingrange), yxaspect);
|
||||||
}
|
|
||||||
else
|
|
||||||
renderSetAspect(vr, yxaspect);
|
|
||||||
|
|
||||||
if (HavePLURemap())
|
if (HavePLURemap())
|
||||||
{
|
{
|
||||||
|
@ -402,11 +395,8 @@ void DrawView(double smoothRatio, bool sceneonly)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
{
|
|
||||||
newaspect_enable = 0;
|
|
||||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||||
}
|
|
||||||
|
|
||||||
if (nFreeze)
|
if (nFreeze)
|
||||||
{
|
{
|
||||||
|
|
|
@ -373,6 +373,8 @@ enum miscConstants
|
||||||
MAXTORCHSECTORS = 64,
|
MAXTORCHSECTORS = 64,
|
||||||
MAXGEOSECTORS = 64,
|
MAXGEOSECTORS = 64,
|
||||||
|
|
||||||
|
CRACK_TIME = 777,
|
||||||
|
|
||||||
DUKE3D_NO_WIDESCREEN_PINNING = 1 << 0,
|
DUKE3D_NO_WIDESCREEN_PINNING = 1 << 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef duke3d_h_
|
#ifndef duke3d_h_
|
||||||
#define duke3d_h_
|
#define duke3d_h_
|
||||||
|
|
||||||
// JBF
|
|
||||||
#include "baselayer.h"
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
|
@ -31,7 +31,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
||||||
#include "ns.h" // Must come before everything else!
|
#include "ns.h" // Must come before everything else!
|
||||||
|
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
|
|
@ -32,7 +32,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
||||||
#include "ns.h" // Must come before everything else!
|
#include "ns.h" // Must come before everything else!
|
||||||
|
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
|
|
@ -31,10 +31,10 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
||||||
#include "gamestate.h"
|
#include "gamestate.h"
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
#include "glbackend/glbackend.h"
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ bool GameTicker()
|
||||||
int const currentTic = I_GetTime();
|
int const currentTic = I_GetTime();
|
||||||
gameclock = I_GetBuildTime();
|
gameclock = I_GetBuildTime();
|
||||||
|
|
||||||
if (playrunning() && currentTic - lastTic >= 1)
|
while (playrunning() && currentTic - lastTic >= 1)
|
||||||
{
|
{
|
||||||
lastTic = currentTic;
|
lastTic = currentTic;
|
||||||
|
|
||||||
|
|
|
@ -732,7 +732,7 @@ void playerCrouch(int snum)
|
||||||
if (GetGameVarID(g_iReturnVarID, p->i, snum) == 0)
|
if (GetGameVarID(g_iReturnVarID, p->i, snum) == 0)
|
||||||
{
|
{
|
||||||
p->posz += (2048 + 768);
|
p->posz += (2048 + 768);
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ void shoot_d(int i, int atwith)
|
||||||
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
||||||
sa = ps[p].getang();
|
sa = ps[p].getang();
|
||||||
|
|
||||||
ps[p].crack_time = 777;
|
ps[p].crack_time = CRACK_TIME;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1356,7 +1356,7 @@ int doincrements_d(struct player_struct* p)
|
||||||
if (p->crack_time == 0)
|
if (p->crack_time == 0)
|
||||||
{
|
{
|
||||||
p->knuckle_incs = 1;
|
p->knuckle_incs = 1;
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1590,7 +1590,7 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz,
|
||||||
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
||||||
{
|
{
|
||||||
p->posz -= j;
|
p->posz -= j;
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1602,7 +1602,7 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz,
|
||||||
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
if (GetGameVarID(g_iReturnVarID, pi, snum) == 0)
|
||||||
{
|
{
|
||||||
p->posz += j;
|
p->posz += j;
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1949,7 +1949,7 @@ static void fireweapon(int snum)
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
int pi = p->i;
|
int pi = p->i;
|
||||||
|
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
|
|
||||||
if (p->holster_weapon == 1)
|
if (p->holster_weapon == 1)
|
||||||
{
|
{
|
||||||
|
@ -2793,8 +2793,6 @@ void processinput_d(int snum)
|
||||||
// may still be needed later for demo recording
|
// may still be needed later for demo recording
|
||||||
|
|
||||||
applylook(snum, 1, sb_avel);
|
applylook(snum, 1, sb_avel);
|
||||||
|
|
||||||
p->crack_time = 777;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->spritebridge == 0)
|
if (p->spritebridge == 0)
|
||||||
|
@ -2838,7 +2836,7 @@ void processinput_d(int snum)
|
||||||
|
|
||||||
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
||||||
{
|
{
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
|
|
||||||
k = sintable[p->bobcounter & 2047] >> 12;
|
k = sintable[p->bobcounter & 2047] >> 12;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ void shoot_r(int i, int atwith)
|
||||||
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
sz = ps[p].posz + ps[p].pyoff + (4 << 8);
|
||||||
sa = ps[p].getang();
|
sa = ps[p].getang();
|
||||||
|
|
||||||
if (isRRRA()) ps[p].crack_time = 777;
|
if (isRRRA()) ps[p].crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1288,7 +1288,7 @@ int doincrements_r(struct player_struct* p)
|
||||||
if (p->crack_time == 0)
|
if (p->crack_time == 0)
|
||||||
{
|
{
|
||||||
p->knuckle_incs = 1;
|
p->knuckle_incs = 1;
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2616,7 +2616,7 @@ static void fireweapon(int snum)
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
int pi = p->i;
|
int pi = p->i;
|
||||||
|
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
|
|
||||||
if (p->holster_weapon == 1)
|
if (p->holster_weapon == 1)
|
||||||
{
|
{
|
||||||
|
@ -2998,7 +2998,7 @@ static void operateweapon(int snum, ESyncBits actions, EDukeSyncBits sb_snum, in
|
||||||
S_PlayActorSound(SHOTGUN_COCK, pi);
|
S_PlayActorSound(SHOTGUN_COCK, pi);
|
||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
p->shotgun_state[0] = 0;
|
p->shotgun_state[0] = 0;
|
||||||
p->shotgun_state[1] = 0;
|
p->shotgun_state[1] = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -3010,7 +3010,7 @@ static void operateweapon(int snum, ESyncBits actions, EDukeSyncBits sb_snum, in
|
||||||
{
|
{
|
||||||
case 16:
|
case 16:
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
p->shotgun_state[0] = 1;
|
p->shotgun_state[0] = 1;
|
||||||
p->shotgun_state[1] = 0;
|
p->shotgun_state[1] = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -3704,8 +3704,6 @@ void processinput_r(int snum)
|
||||||
// may still be needed later for demo recording
|
// may still be needed later for demo recording
|
||||||
|
|
||||||
applylook(snum, 1, sb_avel);
|
applylook(snum, 1, sb_avel);
|
||||||
|
|
||||||
p->crack_time = 777;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->spritebridge == 0)
|
if (p->spritebridge == 0)
|
||||||
|
@ -3731,7 +3729,7 @@ void processinput_r(int snum)
|
||||||
|
|
||||||
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
if (p->posxv || p->posyv || sb_fvel || sb_svel)
|
||||||
{
|
{
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
|
|
||||||
k = sintable[p->bobcounter & 2047] >> 12;
|
k = sintable[p->bobcounter & 2047] >> 12;
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ void fireweapon_ww(int snum)
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
int pi = p->i;
|
int pi = p->i;
|
||||||
|
|
||||||
p->crack_time = 777;
|
p->crack_time = CRACK_TIME;
|
||||||
|
|
||||||
if (p->holster_weapon == 1)
|
if (p->holster_weapon == 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au)
|
||||||
|
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
#include "sbar.h"
|
#include "sbar.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "m_argv.h"
|
#include "m_argv.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "texturemanager.h"
|
#include "texturemanager.h"
|
||||||
|
|
|
@ -483,7 +483,6 @@ void displayrooms(int snum, double smoothratio)
|
||||||
|
|
||||||
g_visibility = p->visibility;
|
g_visibility = p->visibility;
|
||||||
|
|
||||||
newaspect_enable = 1;
|
|
||||||
videoSetCorrectedAspect();
|
videoSetCorrectedAspect();
|
||||||
|
|
||||||
sect = p->cursectnum;
|
sect = p->cursectnum;
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "hw_viewpointbuffer.h"
|
#include "hw_viewpointbuffer.h"
|
||||||
#include "hw_renderstate.h"
|
#include "hw_renderstate.h"
|
||||||
#include "hw_cvars.h"
|
#include "hw_cvars.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
|
|
||||||
CVAR(Bool, gl_texture, true, 0)
|
CVAR(Bool, gl_texture, true, 0)
|
||||||
|
|
||||||
|
|
|
@ -362,5 +362,5 @@ void renderSetVisibility(float v);
|
||||||
void renderBeginScene();
|
void renderBeginScene();
|
||||||
void renderFinishScene();
|
void renderFinishScene();
|
||||||
void DrawRateStuff();
|
void DrawRateStuff();
|
||||||
|
void videoShowFrame(int32_t);
|
||||||
void hud_drawsprite(double sx, double sy, int z, double a, int picnum, int dashade, int dapalnum, int dastat, double alpha = 1);
|
void hud_drawsprite(double sx, double sy, int z, double a, int picnum, int dashade, int dapalnum, int dastat, double alpha = 1);
|
||||||
|
|
|
@ -1796,11 +1796,8 @@ drawscreen(PLAYERp pp, double smoothratio)
|
||||||
JS_DrawCameras(pp, tx, ty, tz);
|
JS_DrawCameras(pp, tx, ty, tz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
{
|
|
||||||
newaspect_enable = 1;
|
|
||||||
videoSetCorrectedAspect();
|
videoSetCorrectedAspect();
|
||||||
}
|
|
||||||
renderSetAspect(Blrintf(float(viewingrange)* tanf(r_fov* (fPI / 360.f))), yxaspect);
|
renderSetAspect(Blrintf(float(viewingrange)* tanf(r_fov* (fPI / 360.f))), yxaspect);
|
||||||
OverlapDraw = TRUE;
|
OverlapDraw = TRUE;
|
||||||
DrawOverlapRoom(tx, ty, tz, tq16ang, tq16horiz, tsectnum);
|
DrawOverlapRoom(tx, ty, tz, tq16ang, tq16horiz, tsectnum);
|
||||||
|
@ -1822,11 +1819,8 @@ drawscreen(PLAYERp pp, double smoothratio)
|
||||||
post_analyzesprites();
|
post_analyzesprites();
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
if (r_usenewaspect)
|
|
||||||
{
|
|
||||||
newaspect_enable = 0;
|
|
||||||
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
renderSetAspect(viewingRange, divscale16(ydim * 8, xdim * 5));
|
||||||
}
|
|
||||||
UpdatePanel(smoothratio);
|
UpdatePanel(smoothratio);
|
||||||
|
|
||||||
#define SLIME 2305
|
#define SLIME 2305
|
||||||
|
|
|
@ -29,10 +29,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
#define MAIN
|
#define MAIN
|
||||||
#define QUIET
|
#define QUIET
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
|
||||||
|
|
||||||
#include "baselayer.h"
|
|
||||||
|
|
||||||
#include "names2.h"
|
#include "names2.h"
|
||||||
#include "panel.h"
|
#include "panel.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
|
@ -38,7 +38,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
|
|
||||||
#include "mytypes.h"
|
#include "mytypes.h"
|
||||||
|
@ -49,6 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
|
#include "gamestruct.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, sw_ninjahack)
|
EXTERN_CVAR(Bool, sw_ninjahack)
|
||||||
|
|
|
@ -68,7 +68,7 @@ double elapsedInputTicks;
|
||||||
double scaleAdjustmentToInterval(double x) { return x * (120 / synctics) / (1000.0 / elapsedInputTicks); }
|
double scaleAdjustmentToInterval(double x) { return x * (120 / synctics) / (1000.0 / elapsedInputTicks); }
|
||||||
|
|
||||||
void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel);
|
void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel);
|
||||||
void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel);
|
void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16horz);
|
||||||
|
|
||||||
|
|
||||||
void GameInterface::ResetFollowPos(bool)
|
void GameInterface::ResetFollowPos(bool)
|
||||||
|
@ -187,7 +187,7 @@ getinput(InputPacket *loc, SWBOOL tied)
|
||||||
keymove = 0;
|
keymove = 0;
|
||||||
|
|
||||||
int32_t svel = 0, vel = 0;
|
int32_t svel = 0, vel = 0;
|
||||||
fix16_t q16aimvel = 0, q16angvel = 0;
|
fix16_t q16horz = 0, q16angvel = 0;
|
||||||
|
|
||||||
if (buttonMap.ButtonDown(gamefunc_Strafe) && !pp->sop)
|
if (buttonMap.ButtonDown(gamefunc_Strafe) && !pp->sop)
|
||||||
{
|
{
|
||||||
|
@ -201,14 +201,14 @@ getinput(InputPacket *loc, SWBOOL tied)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mouseaim)
|
if (mouseaim)
|
||||||
q16aimvel = fix16_ssub(q16aimvel, fix16_from_float(info.mousey / aimvelScale));
|
q16horz = fix16_ssub(q16horz, fix16_from_float(info.mousey / aimvelScale));
|
||||||
else
|
else
|
||||||
vel -= (info.mousey * ticrateScale) * 8.f;
|
vel -= (info.mousey * ticrateScale) * 8.f;
|
||||||
|
|
||||||
if (in_mouseflip)
|
if (in_mouseflip)
|
||||||
q16aimvel = -q16aimvel;
|
q16horz = -q16horz;
|
||||||
|
|
||||||
q16aimvel -= fix16_from_dbl(scaleAdjustmentToInterval((info.dpitch * ticrateScale) / aimvelScale));
|
q16horz -= fix16_from_dbl(scaleAdjustmentToInterval((info.dpitch * ticrateScale) / aimvelScale));
|
||||||
svel -= info.dx * keymove;
|
svel -= info.dx * keymove;
|
||||||
vel -= info.dz * keymove;
|
vel -= info.dz * keymove;
|
||||||
|
|
||||||
|
@ -268,13 +268,13 @@ getinput(InputPacket *loc, SWBOOL tied)
|
||||||
vel += -keymove;
|
vel += -keymove;
|
||||||
|
|
||||||
q16angvel = fix16_clamp(q16angvel, -fix16_from_int(MAXANGVEL), fix16_from_int(MAXANGVEL));
|
q16angvel = fix16_clamp(q16angvel, -fix16_from_int(MAXANGVEL), fix16_from_int(MAXANGVEL));
|
||||||
q16aimvel = fix16_clamp(q16aimvel, -fix16_from_int(MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
|
q16horz = fix16_clamp(q16horz, -fix16_from_int(MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
|
||||||
|
|
||||||
void DoPlayerTeleportPause(PLAYERp pp);
|
void DoPlayerTeleportPause(PLAYERp pp);
|
||||||
if (PedanticMode)
|
if (PedanticMode)
|
||||||
{
|
{
|
||||||
q16angvel = fix16_floor(q16angvel);
|
q16angvel = fix16_floor(q16angvel);
|
||||||
q16aimvel = fix16_floor(q16aimvel);
|
q16horz = fix16_floor(q16horz);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -283,7 +283,7 @@ getinput(InputPacket *loc, SWBOOL tied)
|
||||||
if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN))
|
if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN))
|
||||||
DoPlayerTurn(pp, &pp->camq16ang, q16angvel);
|
DoPlayerTurn(pp, &pp->camq16ang, q16angvel);
|
||||||
if (TEST(pp->Flags2, PF2_INPUT_CAN_AIM))
|
if (TEST(pp->Flags2, PF2_INPUT_CAN_AIM))
|
||||||
DoPlayerHorizon(pp, &pp->camq16horiz, q16aimvel);
|
DoPlayerHorizon(pp, &pp->camq16horiz, q16horz);
|
||||||
pp->oq16ang += pp->camq16ang - prevcamq16ang;
|
pp->oq16ang += pp->camq16ang - prevcamq16ang;
|
||||||
pp->oq16horiz += pp->camq16horiz - prevcamq16horiz;
|
pp->oq16horiz += pp->camq16horiz - prevcamq16horiz;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ getinput(InputPacket *loc, SWBOOL tied)
|
||||||
}
|
}
|
||||||
|
|
||||||
loc->q16avel += q16angvel;
|
loc->q16avel += q16angvel;
|
||||||
loc->q16aimvel += q16aimvel;
|
loc->q16horz += q16horz;
|
||||||
|
|
||||||
if (!CommEnabled)
|
if (!CommEnabled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
|
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
|
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
|
@ -80,9 +79,9 @@ typedef struct
|
||||||
int32_t fvel;
|
int32_t fvel;
|
||||||
int32_t svel;
|
int32_t svel;
|
||||||
fix16_t q16avel;
|
fix16_t q16avel;
|
||||||
fix16_t q16aimvel;
|
|
||||||
fix16_t q16ang;
|
|
||||||
fix16_t q16horz;
|
fix16_t q16horz;
|
||||||
|
fix16_t q16ang;
|
||||||
|
fix16_t q16horiz;
|
||||||
int32_t bits;
|
int32_t bits;
|
||||||
ESyncBits actions;
|
ESyncBits actions;
|
||||||
} SW_AVERAGE_PACKET;
|
} SW_AVERAGE_PACKET;
|
||||||
|
@ -201,9 +200,9 @@ UpdateInputs(void)
|
||||||
AveragePacket.fvel += loc.fvel;
|
AveragePacket.fvel += loc.fvel;
|
||||||
AveragePacket.svel += loc.svel;
|
AveragePacket.svel += loc.svel;
|
||||||
AveragePacket.q16avel += loc.q16avel;
|
AveragePacket.q16avel += loc.q16avel;
|
||||||
AveragePacket.q16aimvel += loc.q16aimvel;
|
AveragePacket.q16horz += loc.q16horz;
|
||||||
AveragePacket.q16ang = Player[myconnectindex].camq16ang;
|
AveragePacket.q16ang = Player[myconnectindex].camq16ang;
|
||||||
AveragePacket.q16horz = Player[myconnectindex].camq16horiz;
|
AveragePacket.q16horiz = Player[myconnectindex].camq16horiz;
|
||||||
SET(AveragePacket.bits, loc.bits);
|
SET(AveragePacket.bits, loc.bits);
|
||||||
SET(AveragePacket.actions, loc.actions);
|
SET(AveragePacket.actions, loc.actions);
|
||||||
// The above would or the weapon numbers together. Undo that now. The last one should win.
|
// The above would or the weapon numbers together. Undo that now. The last one should win.
|
||||||
|
@ -227,9 +226,9 @@ UpdateInputs(void)
|
||||||
loc.fvel = AveragePacket.fvel / MovesPerPacket;
|
loc.fvel = AveragePacket.fvel / MovesPerPacket;
|
||||||
loc.svel = AveragePacket.svel / MovesPerPacket;
|
loc.svel = AveragePacket.svel / MovesPerPacket;
|
||||||
loc.q16avel = fix16_div(AveragePacket.q16avel, fix16_from_int(MovesPerPacket));
|
loc.q16avel = fix16_div(AveragePacket.q16avel, fix16_from_int(MovesPerPacket));
|
||||||
loc.q16aimvel = fix16_div(AveragePacket.q16aimvel, fix16_from_int(MovesPerPacket));
|
loc.q16horz = fix16_div(AveragePacket.q16horz, fix16_from_int(MovesPerPacket));
|
||||||
loc.q16ang = AveragePacket.q16ang;
|
loc.q16ang = AveragePacket.q16ang;
|
||||||
loc.q16horz = AveragePacket.q16horz;
|
loc.q16horiz = AveragePacket.q16horiz;
|
||||||
loc.bits = AveragePacket.bits;
|
loc.bits = AveragePacket.bits;
|
||||||
loc.actions = AveragePacket.actions;
|
loc.actions = AveragePacket.actions;
|
||||||
|
|
||||||
|
|
|
@ -1911,7 +1911,7 @@ PlayerAutoLook(PLAYERp pp)
|
||||||
|
|
||||||
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
|
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
|
||||||
void
|
void
|
||||||
DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel)
|
DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16horz)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
#define HORIZ_SPEED (16)
|
#define HORIZ_SPEED (16)
|
||||||
|
@ -1922,7 +1922,7 @@ DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel)
|
||||||
if (!PedanticMode && (pq16horiz == &pp->q16horiz))
|
if (!PedanticMode && (pq16horiz == &pp->q16horiz))
|
||||||
{
|
{
|
||||||
SET(pp->Flags2, PF2_INPUT_CAN_AIM);
|
SET(pp->Flags2, PF2_INPUT_CAN_AIM);
|
||||||
pp->q16horiz = pp->input.q16horz;
|
pp->q16horiz = pp->input.q16horiz;
|
||||||
if ((pp == &Player[myconnectindex]) || (pp == ppp)) // No coop view?
|
if ((pp == &Player[myconnectindex]) || (pp == ppp)) // No coop view?
|
||||||
pp->oq16horiz = pp->q16horiz;
|
pp->oq16horiz = pp->q16horiz;
|
||||||
return;
|
return;
|
||||||
|
@ -1932,9 +1932,9 @@ DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel)
|
||||||
if (cl_slopetilting)
|
if (cl_slopetilting)
|
||||||
PlayerAutoLook(pp);
|
PlayerAutoLook(pp);
|
||||||
|
|
||||||
if (q16aimvel)
|
if (q16horz)
|
||||||
{
|
{
|
||||||
pp->q16horizbase += q16aimvel;
|
pp->q16horizbase += q16horz;
|
||||||
SET(pp->Flags, PF_LOCK_HORIZ | PF_LOOKING);
|
SET(pp->Flags, PF_LOCK_HORIZ | PF_LOOKING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2698,7 +2698,7 @@ DoPlayerMove(PLAYERp pp)
|
||||||
|
|
||||||
DoPlayerSetWadeDepth(pp);
|
DoPlayerSetWadeDepth(pp);
|
||||||
|
|
||||||
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
|
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
|
||||||
|
|
||||||
if (pp->cursectnum >= 0 && TEST(sector[pp->cursectnum].extra, SECTFX_DYNAMIC_AREA))
|
if (pp->cursectnum >= 0 && TEST(sector[pp->cursectnum].extra, SECTFX_DYNAMIC_AREA))
|
||||||
{
|
{
|
||||||
|
@ -2906,7 +2906,7 @@ DoPlayerMoveBoat(PLAYERp pp)
|
||||||
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
|
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
|
||||||
pp->cursectnum = save_sectnum; // for speed
|
pp->cursectnum = save_sectnum; // for speed
|
||||||
|
|
||||||
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
|
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoTankTreads(PLAYERp pp)
|
void DoTankTreads(PLAYERp pp)
|
||||||
|
@ -3385,7 +3385,7 @@ DoPlayerMoveTank(PLAYERp pp)
|
||||||
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
|
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
|
||||||
pp->cursectnum = save_sectnum; // for speed
|
pp->cursectnum = save_sectnum; // for speed
|
||||||
|
|
||||||
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
|
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
|
||||||
|
|
||||||
DoTankTreads(pp);
|
DoTankTreads(pp);
|
||||||
}
|
}
|
||||||
|
@ -3402,7 +3402,7 @@ DoPlayerMoveTurret(PLAYERp pp)
|
||||||
|
|
||||||
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->sop->xmid, pp->sop->ymid);
|
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->sop->xmid, pp->sop->ymid);
|
||||||
|
|
||||||
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
|
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3979,7 +3979,7 @@ DoPlayerClimb(PLAYERp pp)
|
||||||
sp->z = pp->posz + PLAYER_HEIGHT;
|
sp->z = pp->posz + PLAYER_HEIGHT;
|
||||||
changespritesect(pp->PlayerSprite, pp->cursectnum);
|
changespritesect(pp->PlayerSprite, pp->cursectnum);
|
||||||
|
|
||||||
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
|
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
|
||||||
|
|
||||||
if (FAF_ConnectArea(pp->cursectnum))
|
if (FAF_ConnectArea(pp->cursectnum))
|
||||||
{
|
{
|
||||||
|
@ -7407,7 +7407,7 @@ void ChopsCheck(PLAYERp pp)
|
||||||
{
|
{
|
||||||
if (!M_Active() && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
|
if (!M_Active() && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
|
||||||
{
|
{
|
||||||
if ((pp->input.bits|pp->input.fvel|pp->input.svel|pp->input.q16avel|pp->input.q16aimvel) ||
|
if ((pp->input.bits|pp->input.fvel|pp->input.svel|pp->input.q16avel|pp->input.q16horz) ||
|
||||||
TEST(pp->Flags, PF_CLIMBING|PF_FALLING|PF_DIVING))
|
TEST(pp->Flags, PF_CLIMBING|PF_FALLING|PF_DIVING))
|
||||||
{
|
{
|
||||||
// Hit a input key or other reason to stop chops
|
// Hit a input key or other reason to stop chops
|
||||||
|
|
Loading…
Reference in a new issue