index 3e9763be912be89a1be453e99a71a024973bcf91..68b46ac4167c27397b905466224f752413d66396 100644 (file)
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;
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);