Open BielBdeLuna opened 9 years ago
the original fix from treb:
--------------------- neo/game/physics/Physics_Player.cpp ---------------------
index af1a764..9ab46a8 100644
@@ -971,6 +971,9 @@ void idPhysics_Player::CheckGround( void ) {
EvaluateContacts();
// setup a ground trace from the contacts
+ gameLocal.clip.Translation( groundTrace, current.origin, current.origin +
+ gravityNormal * CONTACT_EPSILON, clipModel, clipModel->GetAxis(), -1, self );
+ /*
groundTrace.endpos = current.origin;
groundTrace.endAxis = clipModel->GetAxis();
if ( contacts.Num() ) {
@@ -983,6 +986,7 @@ void idPhysics_Player::CheckGround( void ) {
} else {
groundTrace.fraction = 1.0f;
}
+ */
contents = gameLocal.clip.Contents( current.origin, clipModel, clipModel->GetAxis(), -1, self );
if ( contents & MASK_SOLID ) {
not sure which one should be applied, maybe the bug should be re-investigated before that. But at least we now have two possible fixes in the bugtracker :-)
ok
maybe NagaHuntress resolves this issues for all "collision models" while Treb's only solves it for players?
the thing is, is it a bug in the collision model system or is it a bug for the player specific collision model?
maybe someone should investigate, if this bug affects non-players (because I don't know.)
I've seen that normally when getting into noclip the position of the player never changed only the model stance, but never the position, but when getting stuck in the terrain, when getting into noclip (by pressing only and only only the "n" key (bound to noclip)) the player seems to move down a little bit, like if there where a force pulling him down (and I'm not crouching or moving at all)
then I've also spawned some monster_zsec_machineguners, and they don't seem to be stuck on any edge.
maybe even it's a two part problem, in the collision system but also in the player collision model?
@Motorsep dicussed it here: https://github.com/OpenTechEngine/Discussions/issues/11
Apparently user "NagaHuntress" (from some community) fixed it with this diff: