mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Temp fix for opp not working properly
This commit is contained in:
@@ -159,8 +159,8 @@ RADAR.rayTraces = {
|
|||||||
{ startVec = { x = 5.0 }, endVec = { x = 5.0, y = 0.0 }, rayType = "same" },
|
{ startVec = { x = 5.0 }, endVec = { x = 5.0, y = 0.0 }, rayType = "same" },
|
||||||
-- { startVec = { x = 3.0 }, endVec = { x = 3.0, y = 0.0, baseY = 400.0 }, rayType = "same" },
|
-- { startVec = { x = 3.0 }, endVec = { x = 3.0, y = 0.0, baseY = 400.0 }, rayType = "same" },
|
||||||
-- { startVec = { x = -3.0 }, endVec = { x = -3.0, y = 0.0, baseY = 400.0 }, rayType = "same" },
|
-- { startVec = { x = -3.0 }, endVec = { x = -3.0, y = 0.0, baseY = 400.0 }, rayType = "same" },
|
||||||
{ startVec = { x = -9.0 }, endVec = { x = -10.0, y = 0.0 }, rayType = "opp" },
|
{ startVec = { x = -10.0 }, endVec = { x = -10.0, y = 0.0 }, rayType = "opp" },
|
||||||
{ startVec = { x = -16.0 }, endVec = { x = -16.0, y = 0.0 }, rayType = "opp" }
|
{ startVec = { x = -17.0 }, endVec = { x = -17.0, y = 0.0 }, rayType = "opp" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Each of these are used for sorting the captured vehicle data, the 'strongest' filter is used for the main
|
-- Each of these are used for sorting the captured vehicle data, the 'strongest' filter is used for the main
|
||||||
@@ -465,7 +465,7 @@ function RADAR:ShootCustomRay( plyVeh, veh, s, e )
|
|||||||
|
|
||||||
local key = tostring( veh )
|
local key = tostring( veh )
|
||||||
|
|
||||||
if ( DoesEntityExist( veh ) and veh ~= plyVeh and dist < self:GetMaxCheckDist() and not self:HasVehicleAlreadyBeenHit( key ) ) then
|
if ( DoesEntityExist( veh ) and veh ~= plyVeh and dist < self:GetMaxCheckDist() --[[ and not self:HasVehicleAlreadyBeenHit( key ) ]] ) then
|
||||||
local entSpeed = GetEntitySpeed( veh )
|
local entSpeed = GetEntitySpeed( veh )
|
||||||
local visible = HasEntityClearLosToEntity( plyVeh, veh, 15 ) -- 13 seems okay, 15 too (doesn't grab ents through ents)
|
local visible = HasEntityClearLosToEntity( plyVeh, veh, 15 ) -- 13 seems okay, 15 too (doesn't grab ents through ents)
|
||||||
|
|
||||||
@@ -813,7 +813,9 @@ function RADAR:GetVehiclesForAntenna()
|
|||||||
for ant in UTIL:Values( { "front", "rear" } ) do
|
for ant in UTIL:Values( { "front", "rear" } ) do
|
||||||
if ( not UTIL:IsTableEmpty( vehs[ant] ) ) then
|
if ( not UTIL:IsTableEmpty( vehs[ant] ) ) then
|
||||||
-- Get the 'strongest' vehicle for the antenna
|
-- Get the 'strongest' vehicle for the antenna
|
||||||
|
print( "=============== start ===============")
|
||||||
for k, v in pairs( vehs[ant] ) do
|
for k, v in pairs( vehs[ant] ) do
|
||||||
|
print( tostring( v.veh ) .. " - " .. tostring( v.size ) .. " - " .. v.rayType )
|
||||||
if ( self:CheckVehicleDataFitsMode( ant, v.rayType ) ) then
|
if ( self:CheckVehicleDataFitsMode( ant, v.rayType ) ) then
|
||||||
results[ant][1] = v
|
results[ant][1] = v
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user