1977: Support shotgun_speed 0 r=Learath2 a=def-

for mapping stationary bullets

As requested by Im 'corneum.

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2019-12-04 16:48:06 +00:00 committed by GitHub
commit c31f6303cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -77,6 +77,9 @@ typedef vector2_base<int> ivec2;
template<typename T>
inline vector2_base<T> closest_point_on_line(vector2_base<T> line_point0, vector2_base<T> line_point1, vector2_base<T> target_point)
{
if(line_point1 == line_point0)
return line_point0;
vector2_base<T> c = target_point - line_point0;
vector2_base<T> v = (line_point1 - line_point0);
v = normalize(v);

View file

@ -214,7 +214,7 @@ void CGameWorld::Tick()
CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, vec2& NewPos, CCharacter *pNotThis, int CollideWith, class CCharacter *pThisOnly)
{
// Find other players
float ClosestLen = distance(Pos0, Pos1) * 100.0f;
float ClosestLen = HUGE_VALF;
CCharacter *pClosest = 0;
CCharacter *p = (CCharacter *)FindFirst(ENTTYPE_CHARACTER);

View file

@ -295,7 +295,7 @@ void CGameWorld::Tick()
CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, vec2& NewPos, CCharacter *pNotThis, int CollideWith, class CCharacter *pThisOnly)
{
// Find other players
float ClosestLen = distance(Pos0, Pos1) * 100.0f;
float ClosestLen = HUGE_VALF;
CCharacter *pClosest = 0;
CCharacter *p = (CCharacter *)FindFirst(ENTTYPE_CHARACTER);