Skip to content

Commit

Permalink
Update 22 HOTFIX 1 - Minor crash fixes
Browse files Browse the repository at this point in the history
- Fixed a crash regarding arti_handlers.script ("attempt to index global 's_hit' " - formatting mistake)
- Fixed a crash regarding "cloudkill_mult" (moved a variable out of scope by accident)
  • Loading branch information
ilrathCXV committed Feb 4, 2024
1 parent 17cae5a commit 3134343
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions gamedata/scripts/arti_handlers.script
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ end

function lifesteal(npc, hit_power, is_soulripper_kill)

if is_actor(npc) then return s_hit end
if is_actor(npc) then return end

if db.actor.health > 0.99 then return end

Expand All @@ -180,7 +180,7 @@ function lifesteal(npc, hit_power, is_soulripper_kill)
s:play(db.actor, 0, sound_object.s2d)
heal_amt = 0.15
else
heal_amt = s_hit.power * 0.25
heal_amt = hit_power * 0.25
end

db.actor.health = clamp(db.actor.health + heal_amt, 0, 1)
Expand Down Expand Up @@ -387,6 +387,9 @@ end
function damage_npc_grok(npc, power)
power = power * (1 + (bas_handler.weakened and bas_handler.weakened[npc:id()] or 0) * 0.2)
npc:set_health_ex(npc.health - power)
if npc.health <= 0 then -- double-check in case burn or alternate manual damage kills
npc_on_death_callback(npc, db.actor)
end
end

local napalm_effect = particles_object("artefact\\af_thermal_show")
Expand Down
12 changes: 6 additions & 6 deletions gamedata/scripts/grok_bo.script
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,13 @@ function monster_on_before_hit(monster,shit,bone_id)
return
end

mutant_mult = 0.85
ammo_mult = 0.85
mutant_mult = 0.85
ammo_mult = 0.85
spec_monster_mult = 1.00
bone_mult = 1.00
is_humanoid = false
is_23_eco = false
bone_mult = 1.00
is_humanoid = false
is_23_eco = false
cloudkill_mult = 1.00

printf("/////////// Mutant Hit registered: GBO v1.6.6 //////////////////")
printf('%s about to be hit by %s in bone %s', monster and monster:name(), shit and shit.draftsman and shit.draftsman:name(), bone_id)
Expand Down Expand Up @@ -680,7 +681,6 @@ function monster_on_before_hit(monster,shit,bone_id)
-- Cloudkill Eco Round --
-------------------------
-- Grants 20% stacking mult. damage bonus to targets both hit and affected by the Cloud
cloudkill_mult = 1.0
if (special_effect == "toxic") or (special_effect_2 == "toxic") or (chaos_effect == 10) then
bas_handler.corrosive_cloud(monster, bone_id)
end
Expand Down

0 comments on commit 3134343

Please sign in to comment.