From 198de4b07512300cd1dd5f64347931c9e9036ab2 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Mon, 11 Apr 2005 02:48:44 +0000 Subject: [PATCH] o Fixed bug where skulks could not scale walls that were aligned 45 degrees in the x-y plane. It is also easier to walk around corners now. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@61 67975925-1194-0748-b3d5-c16f83f1a3a1 --- dev/tankefugl/source/pm_shared/pm_shared.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/tankefugl/source/pm_shared/pm_shared.cpp b/dev/tankefugl/source/pm_shared/pm_shared.cpp index 7694918..ab89569 100644 --- a/dev/tankefugl/source/pm_shared/pm_shared.cpp +++ b/dev/tankefugl/source/pm_shared/pm_shared.cpp @@ -1438,6 +1438,13 @@ void NS_UpdateWallsticking() bool wallsticking = false; + // tankefugl: fix to allow skulks to climb walls oriented 45 degrees in the x-y plane + // it also allows for easier climbing around courners + wallsticking |= NS_CheckOffsetFromOrigin(pmove->forward[0], pmove->forward[1], pmove->forward[2], theSurfaceNormal); + if (wallsticking) + VectorScale(theSurfaceNormal, 5, theSurfaceNormal); + // :tankefugl + wallsticking |= NS_CheckOffsetFromOrigin(theMinPoint[0], theMinPoint[1], theMinPoint[2], theSurfaceNormal); wallsticking |= NS_CheckOffsetFromOrigin(theMinPoint[0], theMaxPoint[1], theMinPoint[2], theSurfaceNormal); wallsticking |= NS_CheckOffsetFromOrigin(theMaxPoint[0], theMinPoint[1], theMinPoint[2], theSurfaceNormal);