mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-22 16:05:25 +00:00
#SCORING nil check added
This commit is contained in:
@@ -1153,7 +1153,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
TargetType = "Scenery"
|
TargetType = "Scenery"
|
||||||
TargetSceneryObject = TargetUNIT
|
TargetSceneryObject = TargetUNIT
|
||||||
self:T("***** Target is Scenery and TargetUNIT is SCENERY object!")
|
self:T("***** Target is Scenery and TargetUNIT is SCENERY object!")
|
||||||
UTILS.PrintTableToLog(TargetSceneryObject)
|
--UTILS.PrintTableToLog(TargetSceneryObject)
|
||||||
end
|
end
|
||||||
|
|
||||||
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
TargetUnitCoalition = _SCORINGCoalition[TargetCoalition]
|
||||||
@@ -1374,7 +1374,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
-- Player contains the score data from self.Players[WeaponPlayerName]
|
-- Player contains the score data from self.Players[WeaponPlayerName]
|
||||||
local PlayerName = Event.IniPlayerName or "Ghost"
|
local PlayerName = Event.IniPlayerName or "Ghost"
|
||||||
local Player = self.Players[PlayerName]
|
local Player = self.Players[PlayerName]
|
||||||
|
if Player then
|
||||||
Player.Score = Player.Score + Score
|
Player.Score = Player.Score + Score
|
||||||
Player.Score = Player.Score + self.ScoreIncrementOnHit
|
Player.Score = Player.Score + self.ScoreIncrementOnHit
|
||||||
MESSAGE:NewType( self.DisplayMessagePrefix .. "hit in zone '" .. ScoreZone:GetName() .. "'." ..
|
MESSAGE:NewType( self.DisplayMessagePrefix .. "hit in zone '" .. ScoreZone:GetName() .. "'." ..
|
||||||
@@ -1387,6 +1387,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user