X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2Fmapstructio.inc;h=68b46ac4167c27397b905466224f752413d66396;hb=7d312543a62c1a290f329110d16835c9065f0147;hp=3e9763be912be89a1be453e99a71a024973bcf91;hpb=aed292b6937ad75773102b66d43a8b5d1eeec921;p=d2df-sdl.git diff --git a/src/shared/mapstructio.inc b/src/shared/mapstructio.inc index 3e9763b..68b46ac 100644 --- a/src/shared/mapstructio.inc +++ b/src/shared/mapstructio.inc @@ -201,7 +201,7 @@ procedure mb_Read_TriggerData (var tr: TTriggerData; ttype: Integer; const buf; getBytesAt(tr.ShotType, buf, 8, 1); getBytesAt(tr.ShotTarget, buf, 9, 1); getBytesAt(tr.ShotSound, buf, 10, 1); - getBytesAt(tr.ShotAllMap, buf, 11, 1); + getBytesAt(tr.ShotAim, buf, 11, 1); getIntAt(tr.ShotPanelID, buf, 12); getWordAt(tr.ShotIntSight, buf, 16); getWordAt(tr.ShotAngle, buf, 18); @@ -229,6 +229,12 @@ procedure mb_Read_TriggerData (var tr: TTriggerData; ttype: Integer; const buf; getBytesAt(tr.FXSpreadD, buf, 15, 1); end; + procedure xreadScript (); + begin + getBytesAt(tr.SCRProc, buf, 0, 64); + getIntAt(tr.SCRArg, buf, 64); + end; + begin if (bufsize < 104) then raise Exception.Create('invalid buffer size in mb_Read_TriggerData'); if (ttype = TRIGGER_EXIT) then begin xreadExit(); exit; end; @@ -259,6 +265,7 @@ begin if (ttype = TRIGGER_HEALTH) then begin xreadHealth(); exit; end; if (ttype = TRIGGER_SHOT) then begin xreadShot(); exit; end; if (ttype = TRIGGER_EFFECT) then begin xreadEffect(); exit; end; + if (ttype = TRIGGER_SCRIPT) then begin xreadScript(); exit; end; raise Exception.Create('invalid trigger type in mb_Read_TriggerData'); end; @@ -505,7 +512,7 @@ procedure mb_Write_TriggerData (var buf; bufsize: Integer; ttype: Integer; var t putBytesAt(buf, 8, tr.ShotType, 1); putBytesAt(buf, 9, tr.ShotTarget, 1); putBytesAt(buf, 10, tr.ShotSound, 1); - putBytesAt(buf, 11, tr.ShotAllMap, 1); + putBytesAt(buf, 11, tr.ShotAim, 1); putIntAt(buf, 12, tr.ShotPanelID); putWordAt(buf, 16, tr.ShotIntSight); putWordAt(buf, 18, tr.ShotAngle);