Commit MetaInfo

Revision9570f8f74e95643ae42b3ecfba75a543d66326b0 (tree)
Time2014-02-06 02:35:00
AuthorArtlav
CommiterArtlav

Log Message

Fixes for arm joints

* Fixed animations firing while working arm
* Fixed arm joints limit

Change Summary

Incremental Difference

diff -r ffe08c62d53a -r 9570f8f74e95 Doc/genericvessel/genericvessel.pdf
Binary file Doc/genericvessel/genericvessel.pdf has changed
diff -r ffe08c62d53a -r 9570f8f74e95 Modules/genericvessel.dll
Binary file Modules/genericvessel.dll has changed
diff -r ffe08c62d53a -r 9570f8f74e95 Modules/xves.dll
Binary file Modules/xves.dll has changed
diff -r ffe08c62d53a -r 9570f8f74e95 Orbitersdk/samples/genericvessel/GenericVessel.cpp
--- a/Orbitersdk/samples/genericvessel/GenericVessel.cpp Tue Feb 04 21:46:00 2014 +0100
+++ b/Orbitersdk/samples/genericvessel/GenericVessel.cpp Wed Feb 05 18:35:00 2014 +0100
@@ -663,6 +663,9 @@
663663
664664 //Animation handling
665665 for(i=0;i<gv_config.anicnt;i++)if(ani[i].tp==0)if((key==(ani[i].trigkey&0xFF))&&((KEYMOD_LSHIFT(kstate))||(key==OAPI_KEY_G)||(key==OAPI_KEY_K))){
666+ if(arm_on){
667+ if((key==OAPI_KEY_NUMPAD2)||(key==OAPI_KEY_NUMPAD4)||(key==OAPI_KEY_NUMPAD6)||(key==OAPI_KEY_NUMPAD8))continue;
668+ }
666669 if(ani[i].repeat!=0){
667670 switch(ani[i].status){
668671 case ANI_RUN:ani[i].status=ANI_PAUSE;break;
diff -r ffe08c62d53a -r 9570f8f74e95 Orbitersdk/samples/xves/os_sc3_reader.pas
--- a/Orbitersdk/samples/xves/os_sc3_reader.pas Tue Feb 04 21:46:00 2014 +0100
+++ b/Orbitersdk/samples/xves/os_sc3_reader.pas Wed Feb 05 18:35:00 2014 +0100
@@ -389,25 +389,30 @@
389389 end;
390390 //############################################################################//
391391 procedure parse_arm(p:pparse_info_rec;par:string);
392-var j,i:integer;
393-ss:string;
392+var j,i,k:integer;
393+ss,rs:string;
394394 begin
395- //if par='pos' then begin main_dat.dock[cur_dock].pos:=tvec(vale(p.segs[1]),vale(p.segs[2]),vale(p.segs[3]));continue;end;
396- //if par='dir' then begin main_dat.dock[cur_dock].dir:=tvec(vale(p.segs[1]),vale(p.segs[2]),vale(p.segs[3]));continue;end;
397- //if par='rot' then begin main_dat.dock[cur_dock].rot:=tvec(vale(p.segs[1]),vale(p.segs[2]),vale(p.segs[3]));continue;end;
398395 if copy(par,1,6)='joint_' then begin
399- i:=vali(copy(par,7,1));
396+ k:=getfsymp(copy(par,7,1000),'_');
397+ if k=0 then begin
398+ rs:='';
399+ i:=vali(copy(par,7,1));
400+ end else begin
401+ k:=k+6;
402+ i:=vali(copy(par,7,k-7));
403+ rs:=copy(par,k,1000);
404+ end;
400405 if i>p.last_arm then begin
401406 for j:=p.last_arm to i-1 do os_addarm(0,180,0,-1,-1);
402407 p.last_arm:=i;
403408 end;
404- if copy(par,8,1000)='_name' then begin
409+ if rs='_name' then begin
405410 ss:=trim(AnsiReplaceStr(AnsiReplaceStr(p.segs[1],'''',' '),'"',' '));
406411 for j:=0 to length(ss)-1 do main_dat.arm[i].name[j]:=ss[j+1];
407412 main_dat.arm[i].name[length(ss)]:=#0;
408413 end;
409- if copy(par,8,1000)='_seq' then main_dat.arm[i].seq:=vali(p.segs[1]);
410- if copy(par,8,1000)='_range' then begin main_dat.arm[i].range_low:=vale(p.segs[1]);main_dat.arm[i].range_high:=vale(p.segs[2]);end;
414+ if rs='_seq' then main_dat.arm[i].seq:=vali(p.segs[1]);
415+ if rs='_range' then begin main_dat.arm[i].range_low:=vale(p.segs[1]);main_dat.arm[i].range_high:=vale(p.segs[2]);end;
411416 end;
412417 if par='grap_seq' then begin if main_cfg.armcnt=0 then exit; main_dat.arm[0].grap_seq:=vali(p.segs[1]);end;
413418 if par='grap_attach' then begin
Show on old repository browser