From e3fcc1f57fe396918f1bd2b414af7a819b1c09d3 Mon Sep 17 00:00:00 2001 From: Ivan Kukush Date: Sat, 16 Jul 2022 00:19:31 +0300 Subject: [PATCH] PMove: add a bunch of comments so peole would be aware of issues/limitations --- src/shared/pmove_custom.qc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shared/pmove_custom.qc b/src/shared/pmove_custom.qc index 77acd107..e1e0676d 100644 --- a/src/shared/pmove_custom.qc +++ b/src/shared/pmove_custom.qc @@ -241,6 +241,10 @@ PMoveCustom_AccelFriction(float move_time, float premove, vector wish_dir, float vecTemp[2] = 0; flFriction = vlen(vecTemp); + /* Next few lines of code assumes self is using player's hull, however it could be a monster + who use differen hull size, therefore it is invalid, so we probably better of using mins/maxs, + on the other hand edge friction is probably not that important. */ + // if the leading edge is over a dropoff, increase friction vecTemp = self.origin + normalize(vecTemp) * 16 + [0,0,1] * PHY_HULL_MIN[2]; traceline(vecTemp, vecTemp + [0,0,-34], TRUE, self); @@ -592,6 +596,7 @@ PMoveCustom_RunPlayerPhysics(entity target) self = oldself; } +/* Next code assumes self is using player's hull, so it should not be used for monsters who use different hull size. */ void PMoveCustom_RunCrouchPhysics(entity target) {