• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得cocoaqtpythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

This is a fork of Zandronum Beta for TSPG.


Commit MetaInfo

Revisionfb87f372061238c184d91d53c8700e89936471ac (tree)
Time2021-11-20 13:07:16
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

A player's tics and crouch state should always be restored when performing a backtrace now.

Change Summary

Incremental Difference

diff -r d9c3c27e9572 -r fb87f3720612 src/sv_main.cpp
--- a/src/sv_main.cpp Fri Nov 19 17:54:03 2021 -0500
+++ b/src/sv_main.cpp Fri Nov 19 23:07:16 2021 -0500
@@ -5373,14 +5373,14 @@
53735373
53745374 //*****************************************************************************
53755375 //
5376-void CLIENT_PLAYER_DATA_s::Restore ( player_t *player, bool bMoveOnly )
5376+void CLIENT_PLAYER_DATA_s::Restore ( player_t *player )
53775377 {
53785378 // [AK] Set the actor's position. Despite the name of the function, the clients don't execute this
53795379 // function here, but CLIENT_MoveThing adds checks upon calling AActor::SetOrigin that correct the
53805380 // player's floorz value after they've been moved.
53815381 CLIENT_MoveThing( player->mo, PositionData.x, PositionData.y, PositionData.z );
53825382
5383- // [AK] Set the player's velocity, orientation, and reactiontime.
5383+ // [AK] Set the player's velocity, orientation, and other data accordingly.
53845384 player->mo->velx = PositionData.velx;
53855385 player->mo->vely = PositionData.vely;
53865386 player->mo->velz = PositionData.velz;
@@ -5388,21 +5388,16 @@
53885388 player->mo->angle = PositionData.angle;
53895389 player->mo->movedir = PositionData.movedir;
53905390 player->mo->reactiontime = reactionTime;
5391-
5392- // [AK] Set the player's tics and crouch accordingly if we want to.
5393- if ( bMoveOnly == false )
5394- {
5395- player->chickenPeck = chickenPeck;
5396- player->morphTics = morphTics;
5397- player->inventorytics = inventoryTics;
5398- player->jumpTics = jumpTics;
5399- player->turnticks = turnTics;
5400- player->crouching = crouching;
5401- player->crouchdir = crouchDirection;
5402- player->crouchfactor = crouchFactor;
5403- player->crouchoffset = crouchOffset;
5404- player->crouchviewdelta = crouchViewDelta;
5405- }
5391+ player->chickenPeck = chickenPeck;
5392+ player->morphTics = morphTics;
5393+ player->inventorytics = inventoryTics;
5394+ player->jumpTics = jumpTics;
5395+ player->turnticks = turnTics;
5396+ player->crouching = crouching;
5397+ player->crouchdir = crouchDirection;
5398+ player->crouchfactor = crouchFactor;
5399+ player->crouchoffset = crouchOffset;
5400+ player->crouchviewdelta = crouchViewDelta;
54065401 }
54075402
54085403 //*****************************************************************************
@@ -7537,7 +7532,7 @@
75377532 pClient->backtraceThrust[2] = pmo->velz - pClient->backtraceThrust[2];
75387533
75397534 CLIENT_PLAYER_DATA_s oldData( &players[ulClient] );
7540- pClient->OldData->Restore( &players[ulClient], false );
7535+ pClient->OldData->Restore( &players[ulClient] );
75417536
75427537 // [AK] Check if the player hasn't moved into a spot that's blocking them or something else.
75437538 if ( P_TestMobjLocation( players[ulClient].mo ))
@@ -7616,7 +7611,7 @@
76167611 sectors[i].ceilingplane.d = sectors[i].ceilingplane.restoreD;
76177612 }
76187613
7619- oldData.Restore( &players[ulClient], true );
7614+ oldData.Restore( &players[ulClient] );
76207615 debugMessage.AppendFormat( "not enough room" );
76217616 }
76227617
diff -r d9c3c27e9572 -r fb87f3720612 src/sv_main.h
--- a/src/sv_main.h Fri Nov 19 17:54:03 2021 -0500
+++ b/src/sv_main.h Fri Nov 19 23:07:16 2021 -0500
@@ -260,7 +260,7 @@
260260
261261 // [AK] Restore's the player's data to whatever's stored in the structure.
262262 // We won't restore the morphed player class though.
263- void Restore ( player_t *player, bool bMoveOnly );
263+ void Restore ( player_t *player );
264264 };
265265
266266 //*****************************************************************************