Ignore bonk events for source==destination (self harm)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
## Interface: 70300
|
## Interface: 70300
|
||||||
## Title: Heimdall
|
## Title: Heimdall
|
||||||
## Version: 3.4.1
|
## Version: 3.4.2
|
||||||
## Notes: Watches over areas and alerts when hostiles spotted
|
## Notes: Watches over areas and alerts when hostiles spotted
|
||||||
## Author: Cyka
|
## Author: Cyka
|
||||||
## SavedVariables: Heimdall_Data
|
## SavedVariables: Heimdall_Data
|
||||||
|
|||||||
BIN
Heimdall.zip
LFS
BIN
Heimdall.zip
LFS
Binary file not shown.
@@ -60,6 +60,13 @@ function shared.BonkDetector.Init()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if source == destination then
|
||||||
|
if Heimdall_Data.config.bonkDetector.debug then
|
||||||
|
print(string.format("[%s] Source and destination are the same, ignoring event", ModuleName))
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local currentTime = GetTime()
|
local currentTime = GetTime()
|
||||||
local throttle = Heimdall_Data.config.bonkDetector.throttle
|
local throttle = Heimdall_Data.config.bonkDetector.throttle
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user