本文是由玩家nicki1314分享的收获日2的透视修改代码,能透视敌人和市民,可以用海盗修改器v12版修改,也可手动修改,有兴趣的玩家可以来看看。
透视敌人和市民:
-- X-RAY VISION v2.0 (post infamy edition) EDITED BY SUPER SHIFTY
-- MARKS ENEMIES AND CIVILIANS ONLY (NO CAMERAS)
function mark_enemies()
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():add( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():add( "mark_enemy" )
end
for u_key, unit in pairs( managers.groupai:state()._security_cameras ) do
--u_data.unit:contour():add( "mark_enemy" )
end
end
function UnitNetworkHandler:mark_enemy( unit, marking_strength, sender )
end
if not _markingToggle then _marktoggle = nil _markingToggle = true
else _markingToggle = nil
end
if not _gameUpdate then _gameUpdate = GameSetup.update
end
do
local _gameUpdateLastMark
function GameSetup:update( t, dt )
_gameUpdate(self, t, dt)
_gameUpdateLastMark = t
if _markingToggle then
mark_enemies()
else
if not _marktoggle then
_marktoggle = true
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():remove( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():remove( "mark_enemy" )
end
end
end
end
end只透视敌人:
-- X-RAY VISION v2.0 (post infamy edition) EDITED BY SUPER SHIFTY
-- MARKS ENEMIES ONLY
function mark_enemies()
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
--u_data.unit:contour():add( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():add( "mark_enemy" )
end
for u_key, unit in pairs( managers.groupai:state()._security_cameras ) do
--u_data.unit:contour():add( "mark_enemy" )
end
end
function UnitNetworkHandler:mark_enemy( unit, marking_strength, sender )
end
if not _markingToggle then _marktoggle = nil _markingToggle = true
else _markingToggle = nil
end
if not _gameUpdate then _gameUpdate = GameSetup.update
end
do
local _gameUpdateLastMark
function GameSetup:update( t, dt )
_gameUpdate(self, t, dt)
_gameUpdateLastMark = t
if _markingToggle then
mark_enemies()
else
if not _marktoggle then
_marktoggle = true
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():remove( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():remove( "mark_enemy" )
end
end
end
end
end
只透视市民:
-- X-RAY VISION v2.0 (post infamy edition) EDITED BY SUPER SHIFTY
-- MARKS ENEMIES AND CIVILIANS ONLY (NO CAMERAS)
function mark_enemies()
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():add( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
--u_data.unit:contour():add( "mark_enemy" )
end
for u_key, unit in pairs( managers.groupai:state()._security_cameras ) do
--u_data.unit:contour():add( "mark_enemy" )
end
end
function UnitNetworkHandler:mark_enemy( unit, marking_strength, sender )
end
if not _markingToggle then _marktoggle = nil _markingToggle = true
else _markingToggle = nil
end
if not _gameUpdate then _gameUpdate = GameSetup.update
end
do
local _gameUpdateLastMark
function GameSetup:update( t, dt )
_gameUpdate(self, t, dt)
_gameUpdateLastMark = t
if _markingToggle then
mark_enemies()
else
if not _marktoggle then
_marktoggle = true
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.unit:contour():remove( "mark_enemy" )
end
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
u_data.unit:contour():remove( "mark_enemy" )
end
end
end
end
end
下载了的人V12的按X 都会跳窗吧
修复这个以后就不会了 而且实测可用