Added an argument check to HealthBarManager

This commit is contained in:
Eddoursul 2022-08-04 00:24:55 +02:00
parent 99c3d3a01d
commit 5bbb5f75af
2 changed files with 14 additions and 10 deletions

Binary file not shown.

View File

@ -1,17 +1,21 @@
Scriptname HealthBarManager Hidden
function Show(Actor akActor) global
int handle = ModEvent.Create("Enderal_ShowActorHealth")
if handle
ModEvent.PushForm(handle, akActor)
ModEvent.Send(handle)
endIf
if akActor
int handle = ModEvent.Create("Enderal_ShowActorHealth")
if handle
ModEvent.PushForm(handle, akActor)
ModEvent.Send(handle)
endIf
endif
endfunction
function Hide(Actor akActor) global
int handle = ModEvent.Create("Enderal_HideActorHealth")
if handle
ModEvent.PushForm(handle, akActor)
ModEvent.Send(handle)
endIf
if akActor
int handle = ModEvent.Create("Enderal_HideActorHealth")
if handle
ModEvent.PushForm(handle, akActor)
ModEvent.Send(handle)
endIf
endif
endfunction