BIGFIX: Reworked the code so that SCORING is working with STATIC objects.

The problems were in the EVENTDISPATCHER.

-- Reworked the Event Dispatcher code...
-- Added fields IniCategory and TgtCategory that indicate which Object
Category is involved in the Event.
-- Added fields IniPlayerName and TgtPlayerName that indicate which
Player Name is the initiator or Target (only when the Object Category is
a UNIT).

-- In the Event.lua, I poperly documented every field in EVENTDATA and
typed it correctly.

-- Reworked te Scoring code..
-- Incorporated the Event.* added fields into the Scoring Code.

-- Added a SCO-100 test mission
-- A shooting range with STATIC objects, so that a player can TEST the
scoring for STATIC objects in  a mission.

Hope this helps.
FC
This commit is contained in:
Sven Van de Velde
2017-02-24 12:10:27 +01:00
parent 3a5f4ccd55
commit 604db7e53c
5 changed files with 64401 additions and 70 deletions

View File

@@ -122,7 +122,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
TargetUnitName = Event.IniDCSUnitName
TargetGroup = Event.IniDCSGroup
TargetGroupName = Event.IniDCSGroupName
TargetPlayerName = TargetUnit:getPlayerName()
TargetPlayerName = Event.IniPlayerName
TargetCoalition = TargetUnit:getCoalition()
--TargetCategory = TargetUnit:getCategory()
@@ -369,7 +369,7 @@ function SCORING:_EventOnHit( Event )
InitUnitName = Event.IniDCSUnitName
InitGroup = Event.IniDCSGroup
InitGroupName = Event.IniDCSGroupName
InitPlayerName = InitUnit:getPlayerName()
InitPlayerName = Event.IniPlayerName
InitCoalition = InitUnit:getCoalition()
--TODO: Workaround Client DCS Bug
@@ -391,7 +391,7 @@ function SCORING:_EventOnHit( Event )
TargetUnitName = Event.TgtDCSUnitName
TargetGroup = Event.TgtDCSGroup
TargetGroupName = Event.TgtDCSGroupName
TargetPlayerName = TargetUnit:getPlayerName()
TargetPlayerName = Event.TgtPlayerName
TargetCoalition = TargetUnit:getCoalition()
--TODO: Workaround Client DCS Bug