View Issue Details

IDProjectCategoryView StatusLast Update
0005244The Dark ModCodingpublic08.08.2022 00:32
ReporterBikerdude Assigned Tonbohr1more  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSAll 
Product VersionTDM 2.10 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0005244: Can't move in noclip with shouldered NPC's
Descriptionsee below
Steps To Reproduce- Fly around in noclip.
- knock out an and pickup and AI.
- go to move and your stuck in place.
- you have type noclip twice in the console to be able to move again while shouldering an Ai,
TagsNo tags attached.

Activities

Daft Mugi

Daft Mugi

07.08.2022 05:19

reporter   ~0015142

The start shouldering animation immobilizes the player. No shouldering animation is shown during noclip, so I assumed the immobilization is never cleared.

The attached patch makes it so the player is not immobilized while shouldering and using noclip.
fix-noclip-on-shoulder-v1-r10063.diff (757 bytes)   
diff --git game/physics/Physics_Player.cpp game/physics/Physics_Player.cpp
index 586d2ff..826a7c4 100644
--- game/physics/Physics_Player.cpp
+++ game/physics/Physics_Player.cpp
@@ -6072,7 +6072,10 @@ void idPhysics_Player::StartShouldering(idEntity const * const pBody)
 			| EIM_MANTLE | EIM_FROB_COMPLEX | EIM_MOVEMENT | EIM_CROUCH_HOLD
 			| EIM_CROUCH | EIM_JUMP | EIM_FROB | EIM_FROB_HILIGHT | EIM_LEAN;
 
-		pPlayer->SetImmobilization("ShoulderingAnimation", iImmobilization);
+		if (!pPlayer->noclip)
+		{
+			pPlayer->SetImmobilization("ShoulderingAnimation", iImmobilization);
+		}
 
 		// Check height of body: If heigher than crouched, do not go to crouched state
 		const float fBodyHeight = pBody->GetPhysics()->GetOrigin() * (-gravityNormal);
Daft Mugi

Daft Mugi

07.08.2022 06:51

reporter   ~0015143

I worked on this a bit more. The reason the immobilization is not cleared is that ShoulderingMove() is never called while using noclip.

I've attached version 2 of the patch, which is cleaner in my opinion, because it doesn't change the Physics_Player.cpp file and overall state changes less during runtime.
fix-noclip-on-shoulder-v2-r10063.diff (426 bytes)   
diff --git game/Player.cpp game/Player.cpp
index 28decdb..fd463d0 100644
--- game/Player.cpp
+++ game/Player.cpp
@@ -4483,7 +4483,8 @@ void idPlayer::OnStartShoulderingBody(idEntity* body)
 	m_bShoulderingBody = true;
 
 	// STiFU #3607: Trigger shouldering viewport animation
-	physicsObj.StartShouldering(body);
+	if (!noclip)
+		physicsObj.StartShouldering(body);
 }
 
 void idPlayer::OnStopShoulderingBody(idEntity* body)
nbohr1more

nbohr1more

07.08.2022 11:17

developer   ~0015145

Thank you!
Bikerdude

Bikerdude

07.08.2022 11:52

reporter   ~0015146

Indeed @Daft Mugi, thanks for sorting this.
nbohr1more

nbohr1more

08.08.2022 00:31

developer   ~0015147

Rev 10064

( This is fantastic ! )

Issue History

Date Modified Username Field Change
05.05.2020 15:28 Bikerdude New Issue
09.10.2020 21:14 Bikerdude Product Version TDM 2.07 => TDM 2.08
09.10.2020 21:14 Bikerdude Steps to Reproduce Updated
06.08.2022 14:07 Bikerdude Summary Can't move in noclip whith shouldered AI => Can't move in noclip with shouldered NPC's
06.08.2022 14:07 Bikerdude Product Version TDM 2.08 => TDM 2.10
07.08.2022 05:19 Daft Mugi Note Added: 0015142
07.08.2022 05:19 Daft Mugi File Added: fix-noclip-on-shoulder-v1-r10063.diff
07.08.2022 06:51 Daft Mugi Note Added: 0015143
07.08.2022 06:51 Daft Mugi File Added: fix-noclip-on-shoulder-v2-r10063.diff
07.08.2022 11:17 nbohr1more Note Added: 0015145
07.08.2022 11:17 nbohr1more Assigned To => nbohr1more
07.08.2022 11:17 nbohr1more Status new => assigned
07.08.2022 11:52 Bikerdude Note Added: 0015146
08.08.2022 00:31 nbohr1more Note Added: 0015147
08.08.2022 00:32 nbohr1more Reproducibility have not tried => always
08.08.2022 00:32 nbohr1more Status assigned => resolved
08.08.2022 00:32 nbohr1more Resolution open => fixed
08.08.2022 00:32 nbohr1more OS Windows => All
08.08.2022 00:32 nbohr1more OS Version 10 =>
08.08.2022 00:32 nbohr1more Fixed in Version => TDM 2.11
08.08.2022 00:32 nbohr1more Target Version => TDM 2.11