diff --git a/source/sw/src/demo.cpp b/source/sw/src/demo.cpp index c13078a64..b040028d4 100644 --- a/source/sw/src/demo.cpp +++ b/source/sw/src/demo.cpp @@ -318,7 +318,7 @@ void DemoReadBuffer(void) { memset(&DemoBuffer, -1, sizeof(DemoBuffer)); - DemoReadPackets(DemoBuffer, sizeof(DemoBuffer)/sizeof(*DemoBuffer), DemoFileIn); + //DemoReadPackets(DemoBuffer, sizeof(DemoBuffer)/sizeof(*DemoBuffer), DemoFileIn); } void diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 4dc3182c4..0c4646c0e 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -1397,7 +1397,7 @@ FString GameInterface::GetCoordString() out.AppendFormat("POSX:%d ", pp->posx); out.AppendFormat("POSY:%d ", pp->posy); out.AppendFormat("POSZ:%d ", pp->posz); - out.AppendFormat("ANG:%d\n", (int32_t)pp->pang); + out.AppendFormat("ANG:%d\n", fix16_to_int(pp->camq16ang)); return out; } @@ -2127,7 +2127,7 @@ drawscreen(PLAYERp pp) if (dimensionmode != 6)// && !ScreenSavePic) { // Cameras must be done before the main loop. - JS_DrawCameras(pp, tx, ty, tz, tang, thoriz); + JS_DrawCameras(pp, tx, ty, tz, tq16ang, tq16horiz); } screen->BeginScene(); diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 44973b836..2cf96eabf 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -618,7 +618,7 @@ void LoadDemoRun(void) break; } if (i == ARRAY_SSIZE(DemoName)) - initputs("WARNING: demos.run is too long, ignoring remaining files\n"); + Printf("WARNING: demos.run is too long, ignoring remaining files\n"); fclose(fin); } @@ -635,7 +635,7 @@ void LoadDemoRun(void) break; } if (i == ARRAY_SSIZE(DemoText)) - initputs("WARNING: demotxt.run is too long, trimming the text\n"); + Printf("WARNING: demotxt.run is too long, trimming the text\n"); fclose(fin); } @@ -2809,7 +2809,7 @@ void ManualPlayerInsert(PLAYERp pp) npp->posx = pp->posx; npp->posy = pp->posy; npp->posz = pp->posz; - npp->pang = pp->pang; + npp->q16ang = pp->q16ang; npp->cursectnum = pp->cursectnum; myconnectindex = numplayers; @@ -2839,7 +2839,7 @@ void BotPlayerInsert(PLAYERp pp) npp->posx = pp->posx; npp->posy = pp->posy; npp->posz = pp->posz-Z(100); - npp->pang = pp->pang; + npp->q16ang = pp->q16ang; npp->cursectnum = pp->cursectnum; //myconnectindex = numplayers; @@ -3045,6 +3045,9 @@ short MirrorDelay; double elapsedInputTicks; double scaleAdjustmentToInterval(double x) { return x * (120 / synctics) / (1000.0 / elapsedInputTicks); } +void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel); +void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel); + void getinput(SW_PACKET *loc, SWBOOL tied) { @@ -3290,8 +3293,6 @@ getinput(SW_PACKET *loc, SWBOOL tied) } else if (!TEST(pp->Flags, PF_DEAD)) { - void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel); - void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel); if (!TEST(pp->Flags, PF_CLIMBING)) DoPlayerTurn(pp, &pp->camq16ang, q16angvel); DoPlayerHorizon(pp, &pp->camq16horiz, q16aimvel); diff --git a/source/sw/src/interp.cpp b/source/sw/src/interp.cpp index 9cf009479..c213386d2 100644 --- a/source/sw/src/interp.cpp +++ b/source/sw/src/interp.cpp @@ -33,7 +33,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -#define MAXINTERPOLATIONS 1024 int numinterpolations = 0; int oldipos[MAXINTERPOLATIONS]; int bakipos[MAXINTERPOLATIONS]; diff --git a/source/sw/src/interp.h b/source/sw/src/interp.h index dee5990e1..8ac33a8d4 100644 --- a/source/sw/src/interp.h +++ b/source/sw/src/interp.h @@ -23,7 +23,6 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- -BEGIN_SW_NS #ifndef INTERP_H @@ -31,6 +30,8 @@ BEGIN_SW_NS #include "build.h" +BEGIN_SW_NS + #define SHORT_MAXINTERPOLATIONS 256 extern short short_numinterpolations; extern short short_oldipos[SHORT_MAXINTERPOLATIONS]; diff --git a/source/sw/src/interpsh.cpp b/source/sw/src/interpsh.cpp index a556c2ddf..58645e9d6 100644 --- a/source/sw/src/interpsh.cpp +++ b/source/sw/src/interpsh.cpp @@ -33,7 +33,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -#define SHORT_MAXINTERPOLATIONS 256 short short_numinterpolations = 0; short short_oldipos[SHORT_MAXINTERPOLATIONS]; short short_bakipos[SHORT_MAXINTERPOLATIONS]; @@ -111,4 +110,5 @@ void short_restoreinterpolations(void) // Stick at end of drawsc for (i = short_numinterpolations - 1; i >= 0; i--) *short_curipos[i] = short_bakipos[i]; } + END_SW_NS diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index 73d841951..760e51ca2 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -44,7 +44,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -void getinput(SW_PACKET*); +void getinput(SW_PACKET *, SWBOOL); /* SYNC BUG NOTES: @@ -925,7 +925,6 @@ faketimerhandler(void) { int i, j, k; PLAYERp pp; - void getinput(SW_PACKET *, SWBOOL); extern SWBOOL BotMode; #if 0