mirror of
https://github.com/halpz/re3.git
synced 2025-07-07 17:58:52 +00:00
Merge remote-tracking branch 'origin/miami' into lcs
# Conflicts: # .github/workflows/reLCS_msvc_amd64.yml # .github/workflows/reLCS_msvc_x86.yml # README.md # gamefiles/TEXT/american.gxt # gamefiles/TEXT/french.gxt # gamefiles/TEXT/german.gxt # gamefiles/TEXT/italian.gxt # gamefiles/TEXT/spanish.gxt # premake5.lua # src/animation/AnimManager.cpp # src/animation/AnimationId.h # src/audio/MusicManager.cpp # src/audio/audio_enums.h # src/control/Script7.cpp # src/core/FileLoader.cpp # src/core/re3.cpp # src/extras/custompipes_d3d9.cpp # src/extras/custompipes_gl.cpp # src/extras/postfx.cpp # src/extras/shaders/colourfilterVC.frag # src/extras/shaders/colourfilterVC_PS.hlsl # src/extras/shaders/make_hlsl.cmd # src/extras/shaders/obj/colourfilterVC_PS.cso # src/extras/shaders/obj/colourfilterVC_PS.inc # src/extras/shaders/obj/colourfilterVC_frag.inc # src/peds/PedFight.cpp # src/render/Font.cpp # src/render/Hud.cpp # src/render/Particle.cpp # src/render/WaterCannon.cpp # src/skel/win/gtavc.ico # src/vehicles/Automobile.cpp # utils/gxt/american.txt # utils/gxt/french.txt # utils/gxt/german.txt # utils/gxt/italian.txt # utils/gxt/spanish.txt
This commit is contained in:
@ -311,8 +311,16 @@ CCollision::TestLineTriangle(const CColLine &line, const CompressedVector *verts
|
||||
if(plane.CalcPoint(line.p0) * plane.CalcPoint(line.p1) > 0.0f)
|
||||
return false;
|
||||
|
||||
float p0dist = DotProduct(line.p1 - line.p0, normal);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
// line lines in the plane, assume no collision
|
||||
if (p0dist == 0.0f)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// intersection parameter on line
|
||||
t = -plane.CalcPoint(line.p0) / DotProduct(line.p1 - line.p0, normal);
|
||||
t = -plane.CalcPoint(line.p0) / p0dist;
|
||||
// find point of intersection
|
||||
CVector p = line.p0 + (line.p1-line.p0)*t;
|
||||
|
||||
@ -1131,8 +1139,17 @@ CCollision::ProcessLineTriangle(const CColLine &line,
|
||||
if(plane.CalcPoint(line.p0) * plane.CalcPoint(line.p1) > 0.0f)
|
||||
return false;
|
||||
|
||||
float p0dist = DotProduct(line.p1 - line.p0, normal);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
// line lines in the plane, assume no collision
|
||||
if (p0dist == 0.0f)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// intersection parameter on line
|
||||
t = -plane.CalcPoint(line.p0) / DotProduct(line.p1 - line.p0, normal);
|
||||
t = -plane.CalcPoint(line.p0) / p0dist;
|
||||
|
||||
// early out if we're beyond the mindist
|
||||
if(t >= mindist)
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user