mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #1977
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:
commit
c31f6303cf
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue