Pangia
04 cze 2015, 17:23
Regulamin forum
Dział "Tworzenie Modyfikacji" służy do zadawania pytań odnośnie tworzenia modyfikacji, edytowania plików gry, oraz pisania tzw. tutoriali, czyli poradników odnośnie modyfikowania gry.
Nie zadajemy tutaj pytań odnośnie modyfikacji gotowych (nie dyskutujemy o nich!), prócz prób ich połączenia etc.
Przy cytowaniu plików *.LTX stosować tag [SYNTAX="ini"], przy cytowaniu plików *.script [SYNTAX="lua"] a przy cytowaniu plików *.xml - [SYNTAX="xml"].
Nie zadajemy tutaj pytań odnośnie modyfikacji gotowych (nie dyskutujemy o nich!), prócz prób ich połączenia etc.
Przy cytowaniu plików *.LTX stosować tag [SYNTAX="ini"], przy cytowaniu plików *.script [SYNTAX="lua"] a przy cytowaniu plików *.xml - [SYNTAX="xml"].
Posty: 5• Strona 1 z 1
Dobra, teraz coś ciekawszego. W TFW całkiem fajnie jest zrobiony efekt krwawienia, który się pokazuje graczowi na ekranie – jedna teksturka, która jest tym mniej przezroczysta, im mocniej leje się z nas jucha. Nie mam jednak pojęcia, jak to przełożyć do Dynamic Huda, którego znalazłem tutaj, bo po prostu nie umiem nic robić ze skryptami poza kopiowaniem ich części.
W spojlerze jest hud_effects.script z TFW. Ja go rozumiem tak, że jeśli gracz krwawi, to nakłada odpowiednią teksturkę na huda, a jak jest jakaś maska/kombinezon z własnym hudem, to nakłada ją pod tą maskę tak, żeby nie wyglądało to tak, że maska krwawi. I nawet, jeśli mam rację, to nie mam pojęcia, jak to zmergować.
W spojlerze jest hud_effects.script z TFW. Ja go rozumiem tak, że jeśli gracz krwawi, to nakłada odpowiednią teksturkę na huda, a jak jest jakaś maska/kombinezon z własnym hudem, to nakłada ją pod tą maskę tak, żeby nie wyglądało to tak, że maska krwawi. I nawet, jeśli mam rację, to nie mam pojęcia, jak to zmergować.
Kod: Zaznacz cały
local img_name = "ff_hud_bleed"
local bleed_pulse = 0
local bleed_pulse_mod = 1
function update()
if db.actor:get_bleeding() > 0 then
local hud = get_hud()
local custom_static = hud:GetCustomStatic(img_name)
if custom_static == nil then
hud:AddCustomStatic(img_name)
custom_static = hud:GetCustomStatic(img_name)
end
if custom_static then
local alpha = math.floor(db.actor:get_bleeding() * 50)
bleed_pulse = bleed_pulse + bleed_pulse_mod
if bleed_pulse >= 10 or bleed_pulse <= -10 then
bleed_pulse_mod = bleed_pulse_mod * -1
end
alpha = alpha + bleed_pulse
alpha = math.max(0, alpha)
custom_static:wnd():SetColor(GetARGB(alpha, 255, 0, 0))
end
else
local hud = get_hud()
local custom_static = hud:GetCustomStatic(img_name)
if custom_static ~= nil then
hud:RemoveCustomStatic(img_name)
end
end
end
Proszę państwa, sto pięćdziesiąt kilometrów na godzinę w ciągu kilku sekund, wspaniały wynik. Gdyby w ten sposób można było wypie*dolić z polskiej polityki tych wszystkich śmieci z Okrągłego Stołu, Leszka Millera, byłoby… cudownie i każdemu bym ku*wa kupił po takim Ferrari, byleby w piz*u pojechali tym PROSTO do swojego ukochanego… Izraela. SYJONIŚCI Europy, jedźcie do siebie! Pozdrawiam, Zbigniew Stonoga. Nie jestem antysemitą!
Takie coś zaimplementowaliśmy już dawno w AA2 i to całkiem prosty skrypt.
Z tym że tu chyba nie ma odnośnika do tekstury ino do specjalnie zrobionego na potrzeby AA2 efektora .ppe.
Jednakże skrypt to nie wszystko, bo trzeba stworzyć też odpowiednie pliki w config/ui oraz edytować ui_custom_msgs.xml itp.
Kod: Zaznacz cały
function wounded(obj,img_xml_ref)
if blood_var == nil then
blood_var = 0
local hud = get_hud()
hud:AddCustomStatic(img_xml_ref, true)
else
if blood_var ~= obj then
if obj >= 0 then
local hud = get_hud()
hud = hud:GetCustomStatic(img_xml_ref):wnd()
local xa = return_argb_csx(0,255,0.7,0.0,obj)
local xr = 255
local xg = 50
local xb = 75
hud:SetColor(GetARGB(xa,xr,xg,xb,obj))
blood_var = obj
end
end
end
if (obj < 0.3) then
if (effector_wound_set ~= nil) then
local eff_power = return_argb_csx(0,100,0.3,0.1,obj)/100
if eff_power > 0.01 then
level.set_pp_effector_factor(5442,eff_power)
end
else
level.add_pp_effector("critical.ppe", 5442, true)
level.set_pp_effector_factor(5442,0.01)
effector_wound_set = true
end
else
if (effector_wound_set ~= nil) then
level.remove_pp_effector(5442)
effector_wound_set = nil
end
end
endJednakże skrypt to nie wszystko, bo trzeba stworzyć też odpowiednie pliki w config/ui oraz edytować ui_custom_msgs.xml itp.
TAJAG JUDYN
HAZBAZ
SEKODYN!
HAZBAZ
SEKODYN!
Ale to chyba nie zadziała, a przynajmniej nie słyszałem, żeby cokolwiek między SoC-em i późniejszymi grami działało normalnie. Skoro nawet głupi zegarek się wywalał…
Co do configu to chodzi o dopisanie tekstury i całej tej graciarni chyba tylko, nie?
Co do configu to chodzi o dopisanie tekstury i całej tej graciarni chyba tylko, nie?
Proszę państwa, sto pięćdziesiąt kilometrów na godzinę w ciągu kilku sekund, wspaniały wynik. Gdyby w ten sposób można było wypie*dolić z polskiej polityki tych wszystkich śmieci z Okrągłego Stołu, Leszka Millera, byłoby… cudownie i każdemu bym ku*wa kupił po takim Ferrari, byleby w piz*u pojechali tym PROSTO do swojego ukochanego… Izraela. SYJONIŚCI Europy, jedźcie do siebie! Pozdrawiam, Zbigniew Stonoga. Nie jestem antysemitą!
Powinno zadziałać. Efektory ppe i ich obsługa nie zmieniły się za bardzo od SoCa (dodano obsługę palety w CoPie) i są chyba kompatybilne nawet wstecz.
Np. efekty noktowizorów z SoCa działają (chyba) na CS a to są właśnie ppe.
Np. efekty noktowizorów z SoCa działają (chyba) na CS a to są właśnie ppe.
A to, co jest z TFW to zadziała? Bo nie wiem, czy to się gdzieś odwołuje np. do innego skryptu, którego nie widzę.
Ewentualnie w którym miejscu mogę w tym skrypcie zmienić ten efekt krwawienia? Bo naprawdę to słabo wygląda, jakby gracz oberwał, po czym po 10 sekundach wylał się z niego litr krwi i nagle przestało.
Przy okazji to nie kapuję, skąd wpisy o kombinezonach, których w grze nie ma, a i tak nic złego się nie dzieje. Mam nadzieję, że to, co już dodałem do gry będzie się dało tam dopisać, bo jak znowu będzie się sypało na zasadzie „bugtrap, bo jest inaczej niż było”, to chyba wpadnę w prawdziwy szał.
Ewentualnie w którym miejscu mogę w tym skrypcie zmienić ten efekt krwawienia? Bo naprawdę to słabo wygląda, jakby gracz oberwał, po czym po 10 sekundach wylał się z niego litr krwi i nagle przestało.
Kod: Zaznacz cały
----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Dinamic HUD from ABC Inferno and AMK
-- by Rulix aka Bak
-- Zoom and shaking ported from Dinamic Hud 1.3 by TSF00181 for Rd to Laminsk Mod(2014)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local dh_ini = ini_file("misc\\dinamic_hud.ltx")
local suithud_enable = rx_utils.read_from_ini(dh_ini,"main","suithud_enable",true,0)
local blurs_enable = rx_utils.read_from_ini(dh_ini,"main","blurs_enable",true,0)
local blood_enable = rx_utils.read_from_ini(dh_ini,"main","blood_enable",true,0)
local bleed_enable = rx_utils.read_from_ini(dh_ini,"main","bleed_enable",true,0)
local hit_enable = rx_utils.read_from_ini(dh_ini,"main","hit_enable",true,0)
local zoom_enable = rx_utils.read_from_ini(dh_ini,"main","zoom_enable",true,0)
local shoot_enable = rx_utils.read_from_ini(dh_ini,"main","shoot_enable",true,0)
ui_disabled = nil
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local helmets = { scientific_outfit = {hud = "hud_sci",breakable = true,blurs = 3},
ecologist_red_outfit = {hud = "hud_sci",breakable = true,blurs = 3},
ecologist_green_outfit = {hud = "hud_sci",breakable = true,blurs = 3},
stalker_outfit = {hud = "hud_gas",breakable = true,blurs = 4},
specops_outfit = {hud = "hud_mil",breakable = true,blurs = 3},
cs_heavy_outfit = {hud = "hud_mil",breakable = true,blurs = 3},
cs_medium_outfit = {hud = "hud_mil",breakable = true,blurs = 3},
svoboda_exo_outfit = {hud = "hud_exo",breakable = true,blurs = 3},
svoboda_heavy_outfit = {hud = "hud_mil",breakable = true,blurs = 3},
svoboda_scientific_outfit = {hud = "hud_sci",breakable = true,blurs = 3},
dolg_outfit = {hud = "hud_gas",breakable = true,blurs = 4},
dolg_heavy_outfit = {hud = "hud_mil",breakable = true,blurs = 3},
dolg_scientific_outfit = {hud = "hud_sci",breakable = true,blurs = 3},
dolg_exo_outfit = {hud = "hud_exo",breakable = true,blurs = 3},
military_outfit = {hud = "hud_kill",breakable = true,blurs = 3},
exo_outfit = {hud = "hud_exo",breakable = true,blurs = 3},
monolit_outfit = {hud = "hud_gas",breakable = true,blurs = 4},
monolit_heavy_outfit = {hud = "hud_mil",breakable = true,blurs = 4},
bandit_exo_outfit = {hud = "hud_exo",breakable = true,blurs = 3}
}
local no_drop_items = {bolt = true, wpn_knife = true}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local seldom_upd_time,often_upd_time
function update()
if db.actor then
local tg = time_global()
if tg > (seldom_upd_time or 100) then
seldom_upd_time = tg+400
bleedcondition()
end
init_blurs()
if tg > (often_upd_time or 30) then
often_upd_time = tg+120
helmet_hud()
blood()
set_blood()
end
hit_effect()
shoot_effect()
zoom_hud()
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local prev_health = 0
function hit_effect()
if not hit_enable then
return
end
if prev_health > db.actor.health+0.05 then
level.add_pp_effector("amk_shoot.ppe",2011,false)
level.set_pp_effector_factor(2011,(prev_health-db.actor.health)*100)
if prev_health > db.actor.health+0.2 then
local cameffs,sounds
if prev_health > db.actor.health+0.5 then
cameffs = {"head_shot","fusker"}
sounds = {"pain_4","pain_1","hit_5","hit_6"}
else
cameffs ={"shell_shock","hit_front","hit_right","hit_back","hit_left","hit_front_left","hit_back_left","hit_front_right","hit_back_right"}
sounds = {"pain_2","pain_3","pain_5","pain_6","pain_7","pain_8"}
end
level.add_cam_effector("camera_effects\\"..cameffs[math.random(#cameffs)]..".anm",999,false,"")
local snd_obj = sound_object("actor\\"..sounds[math.random(#sounds)])
snd_obj:play(db.actor,0,sound_object.s2d)
if math.random() < (prev_health-db.actor.health)/2.5 then
local active_item = db.actor:active_item()
if active_item and not no_drop_items[active_item:section()] then
db.actor:drop_item(active_item)
end
end
end
end
prev_health = db.actor.health
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local current_suithud
local helmet_condition
local pre_hud_type = ""
local current_helmet
local hud_blurs = 0
function helmet_hud()
if not suithud_enable then
return
end
local hud_type
local helmet = db.actor:alive() and (db.actor:item_in_slot(12) or db.actor:get_current_outfit())
if helmet then
local sect = helmet:section()
if helmets[sect] then
helmet_condition = "blue"
if helmets[sect].breakable == true then
local cond = helmet:condition()
if cond > 0.87 then helmet_condition = "blue"
elseif cond > 0.69 then helmet_condition = "green"
elseif cond > 0.60 then helmet_condition = "yellow"
elseif cond > 0.40 then helmet_condition = "red"
elseif cond > 0.25 then helmet_condition = "red2"
else helmet_condition = "red3" end
end
hud_type = helmets[sect].hud.."_"..helmet_condition
pre_hud_type = helmets[sect].hud
end
end
setmysuithud(hud_type)
end
local suitfirstrun = true
function setmysuithud(hudtype)
local hud = get_hud()
if not hudtype then
local wchud = hud:GetCustomStatic(current_suithud)
if wchud then
hud:RemoveCustomStatic(current_suithud)
end
current_suithud = nil
suitfirstrun = true
elseif hudtype ~= current_suithud then
if current_suithud then
hud:RemoveCustomStatic(current_suithud)
end
hud:AddCustomStatic(hudtype)
if string.find(hudtype,pre_hud_type) then
if suitfirstrun == false and helmet_condition ~= "green" and helmet_condition ~= "blue" then
local snd_obj = sound_object("material\\glass\\glass_fall03hl")
snd_obj:play(db.actor,0,sound_object.s2d)
end
if suitfirstrun == true then
suitfirstrun = false
end
end
current_suithud = hudtype
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local actor_last_health = 0
local bloodtime = 0
local bloodtimeb = 0
local isbleeding = "no"
local countblood = 0
function blood()
if not blood_enable then
return
end
local radwidth = db.actor.radiation
if radwidth == 0 then
if db.actor:alive() then
local current_health = math.floor(db.actor.health*100)
local cbloodtime = time_global()
if cbloodtime > bloodtime and isbleeding == "stopit" then
for i=1,4 do
if get_hud():GetCustomStatic("hud_blood"..i) then
get_hud():RemoveCustomStatic("hud_blood"..i)
isbleeding = "no"
end
end
end
if cbloodtime > bloodtime then
bloodtime = time_global() + 1500
if actor_last_health > current_health and actor_last_health ~= 0 then
isbleeding = "yes"
end
actor_last_health = math.floor(db.actor.health * 100)
end
end
end
end
local m_blood = nil
function set_blood()
if blood_enable == 0 then return end
local radwidth = db.actor.radiation
local cbloodtimed = time_global()
if cbloodtimed > bloodtimeb and isbleeding == "yes" and radwidth == 0 then
bloodtimeb = time_global() + 170
m_blood = {}
countblood = countblood + 1
get_hud():AddCustomStatic("hud_blood"..countblood)
m_blood[countblood] = get_hud():GetCustomStatic("hud_blood"..countblood):wnd()
local chudblood = "hud_blood"..countblood
if countblood == 4 then
isbleeding = "stopit"
countblood = 0
end
end
end
local isactcondset = false
local radeffect = false
function bleedcondition()
if bleed_enable == 0 then return end
if db.actor.health < 0.31 and isactcondset ~= true then
level.add_pp_effector("alcohol.ppe",2012,true)
isactcondset = true
end
if db.actor.health > 0.30 and isactcondset ~= false then
level.remove_pp_effector(2012)
isactcondset = false
end
if db.actor.radiation > 0.3 and radeffect ~= true then
level.add_pp_effector("alcohol.ppe", 2013,true)
radeffect = true
end
if db.actor.radiation == 0 and radeffect ~= false then
level.remove_pp_effector(2013)
radeffect = false
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
function init_blurs()
if not blurs_enable then
return
end
if current_suithud and not string.find(current_suithud,"_red3") then
local zoom=67.5/device().fov
zoom = (zoom-1)*1.5+1
if zoom < 1.001 then
zoom = 1.001
end
local stretchy = 0.75/(math.floor(device().aspect_ratio*1000)/1000)
if stretchy < 1 then
stretchy = 1
end
local rect = {x = -768*zoom+768,y = (-512*zoom+512)*stretchy-(stretchy-1)*300,w = 1024*zoom,h = 768*zoom*stretchy}
set_blurs(true,rect)
else
set_blurs(false)
end
end
local blurs
local blurval = 0
local blurlt = 0
local blurcyctime = 0
local blurlastphase = 0
function set_blurs(enabled,rect)
local hud = get_hud()
if not enabled then
for i=1,4 do
local bh = hud:GetCustomStatic("hud_blur"..i)
if bh then
hud:RemoveCustomStatic("hud_blur"..i)
end
end
return
end
if not (blurs and hud:GetCustomStatic("hud_blur1")) then
blurs = {}
for i=1,4 do
hud:AddCustomStatic("hud_blur"..i)
blurs[i] = hud:GetCustomStatic("hud_blur"..i):wnd()
-- blurs[i]:SetWidth(0)
end
end
local power = db.actor.power
local period = 1.0+power*power*1.0
local expirt = 0.3
local breathpower = 3
local delta = (time_global()-blurlt)/1000
local phase = (time_global()-blurcyctime)/1000
blurlt = time_global()
if phase > period then
phase = phase%period
blurcyctime = blurlt-phase*1000
end
if blurlastphase > phase then
blurlastphase = 0
end
local blurdelta = delta*-0.7
if blurlastphase < expirt and phase < expirt then
blurdelta = blurdelta+(phase-blurlastphase)*breathpower
elseif blurlastphase < expirt then
blurdelta = blurdelta+(expirt-blurlastphase)*breathpower
end
blurlastphase = phase
blurval = blurval+blurdelta
if blurval > 0.999 then
blurval = 0.999
elseif blurval < 0 then
blurval = 0
end
local tm = math.floor(blurval*3)
local tmn = (tm+1)
local v = blurval*3-math.floor(blurval*3)
v = 1-v
local v1 = 1-v
if tm ~= 0 then
blurs[tm]:SetColor(GetARGB(v*255,255,255,255))
end
if tmn ~= 0 then
blurs[tmn]:SetColor(GetARGB(v1*255,255,255,255))
end
for i=1,4 do
if i == tm or i == tmn then
blurs[i]:SetWndRect(Frect():set(rect.x,rect.y,rect.w,rect.h))
else
blurs[i]:SetWndRect(Frect():set(rect.x,rect.y,0,0))
end
end
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local wpn_tbl = {}
local ammon = 0
local shotc = 1
local curwpn
local shott
local function parse_anims(sec)
local hud = rx_utils.read_from_ini(nil,sec,"hud","o_O",1)
local anim = rx_utils.read_from_ini(nil,hud,"shoot_effect",nil,1) or rx_utils.read_from_ini(dh_ini,hud,"shoot_effect",nil,1)
if not anim then
rx_utils.read_from_ini(dh_ini,rx_utils.read_from_ini(nil,sec,"class","O_o",1),"shoot_effect",nil,1)
end
if anim and dh_ini:section_exist(anim) then
-- rx_ai.printf("parse %s for %s",anim,sec)
local tbl = {}
tbl.s = rx_utils.parse_list(dh_ini,anim,"strength")
tbl.r = rx_utils.read_from_ini(dh_ini,anim,"strength_rnd",1)
tbl.e = {}
for i=0,5 do
tbl.e[i] = rx_utils.parse_list(dh_ini,anim,tostring(i))
for k,v in pairs(tbl.e[i]) do
tbl.e[i][k] = v and tonumber(v)
end
end
tbl.p = {}
tbl.c = {}
local n = dh_ini:line_count(anim)
if n > 8 then
for i=6,n-1 do
local r,id,val = dh_ini:r_line(anim,i,"","")
val = rx_utils.str_explode(",",val,true)
local shr = "ppe"
if val[2] then
shr = val[2]
end
local ex
if getFS():exist("$game_anims$",string.format("shoot\\%s.%s",id,shr)) then
ex = false
elseif getFS():exist("$game_anims$",string.format("shoot\\%s_s1.%s",id,shr)) then
ex = true
end
val[1] = tonumber(val[1])
if ex ~= nil and val[1] and val[1] ~= 0 then
if shr == "ppe" then
-- rx_ai.printf("ppe %s = %s",id,val[1])
tbl.p[id] = {f = val[1],s = ex}
else
-- rx_ai.printf("anm %s = %s",id,val[1])
tbl.c[id] = {f = val[1],s = ex}
end
end
end
end
wpn_tbl[sec] = tbl
else
wpn_tbl[sec] = true
end
end
function shoot_effect()
if not shoot_enable then
return
end
if shott and shott < time_global() then
shotc = 1
shott = nil
end
local wpn = db.actor:active_item()
-- rx_ai.printf("%s %s",tostring(db.actor:dont_has_info("ui_inventory")),tostring(db.actor:dont_has_info("ui_car_body")))
if rx_utils.item_is_fa(wpn) then
local sect = wpn:section()
if not wpn_tbl[sect] then
parse_anims(sect)
end
if wpn_tbl[sect] ~= true then
if wpn:name() == curwpn then
local aminmag = wpn:get_ammo_in_magazine()
if (aminmag == 0 and aminmag == ammon-1) or (aminmag ~= 0 and aminmag < ammon) then
shoot_anim(sect)
end
ammon = aminmag
else
curwpn = wpn:name()
ammon = wpn:get_ammo_in_magazine()
end
else
curwpn = nil
end
else
curwpn = nil
end
end
function shoot_anim(sect)
local anims = {}
local s = wpn_tbl[sect].s
if #s > 1 then
if wpn_tbl[sect].r == 1 then
s = s[math.random(#s)]
elseif wpn_tbl[sect].r == 2 then
if shotc == 1 then
s = shotc
else
s = s[math.random(2,#s)]
end
else
local sc = #s
sc = shotc <= sc and shotc or (sc > 2 and math.random(sc-1,sc)) or sc
s = s[sc]
end
else
s = s[1]
end
for i,v in pairs(wpn_tbl[sect].e) do
local cnt,r = math.modf(v[1])
if r ~= 0 and cnt > 4 then --fmb
cnt = cnt-cnt*math.random(0,r*100)/100 --fmb
cnt,r = math.modf(cnt)
end
if r ~= 0 and math.random() < r then
cnt = cnt+1
end
if cnt > 0 then
local dir = v[2]
if not dir then
dir = math.random(0,1)
end
table.insert(anims,{e = i,d = dir,c = cnt})
end
end
for i,a in ipairs(anims) do
local n = string.format([[shoot\s%s_e%s_%s.anm]],s,a.e,a.d)
for ii=1,a.c do
level.add_cam_effector(n,math.random(5000,8000),false,"")
end
end
for k,v in pairs(wpn_tbl[sect].c) do
local cnt,r = math.modf(v.f)
if r ~= 0 and cnt > 4 then
cnt = cnt-cnt*math.random(0,r*100)/100
cnt,r = math.modf(cnt)
end
if r ~= 0 and math.random() < r then
cnt = cnt+1
end
local n = v.s and string.format([[shoot\%s_s%s.anm]],k,s) or string.format([[shoot\%s.anm]],k)
for i=1,cnt do
level.add_cam_effector(n,math.random(8000,9000),false,"")
end
end
for k,v in pairs(wpn_tbl[sect].p) do
local n = v.s and string.format([[shoot\%s_s%s.ppe]],k,s) or string.format([[shoot\%s.ppe]],k)
local cnt,f = math.modf(v.f)
if f > 0 then
cnt = cnt+1
end
for i=1,cnt do
local eid = math.random(5000,8000)
level.add_pp_effector(n,eid,false)
if i == 1 then
level.set_pp_effector_factor(eid,f)
end
end
end
shotc = shotc+1
shott = time_global()+300
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
local pre_fov = 0
local precf = 0
local ztime = time_global()
local zbias = Frect():set(0,0,1024,1024)
local zenc
function zoom_hud()
if not zoom_enable then
return
end
if current_suithud then
local hud = get_hud():GetCustomStatic(current_suithud)
if hud then
local cf = precf
local fov = math.floor((device().fov+0.02)*10)
local delta = time_global()-ztime
ztime = time_global()
if not zenc or fov > 35*10 and pre_fov < fov then
zenc = nil
if cf > 0 then
cf = cf-(delta/400)
if cf < 0 then
cf = 0
end
end
end
if zenc or fov < 53*10 and pre_fov > fov then
zenc = true
if cf < 1 then
cf = cf+(delta/400)
if cf > 1 then
cf = 1
end
end
end
if cf ~= precf then
local wpn = db.actor:active_item()
if wpn then
if wpn:section() == "wpn_binoc" then
zbias:set(100*cf,100*cf,1024-100*cf,1024-100*cf)
elseif rx_utils.addon_attached(wpn,"sc") then
zbias:set(350*cf,175*cf,1024,1024-175*cf)
else
zbias:set(200*cf,100*cf,1024,1024-100*cf)
end
hud:wnd():SetOriginalRect(zbias)
elseif precf ~= 0 then
zbias:set(0,0,1024,1024)
hud:wnd():SetOriginalRect(zbias)
end
precf = cf
end
pre_fov = fov
end
end
end
Proszę państwa, sto pięćdziesiąt kilometrów na godzinę w ciągu kilku sekund, wspaniały wynik. Gdyby w ten sposób można było wypie*dolić z polskiej polityki tych wszystkich śmieci z Okrągłego Stołu, Leszka Millera, byłoby… cudownie i każdemu bym ku*wa kupił po takim Ferrari, byleby w piz*u pojechali tym PROSTO do swojego ukochanego… Izraela. SYJONIŚCI Europy, jedźcie do siebie! Pozdrawiam, Zbigniew Stonoga. Nie jestem antysemitą!
Posty: 5• Strona 1 z 1


