*/}}
Bladeren bron

Mesh normal and destroy action fixes.

YimingWu 1 jaar geleden
bovenliggende
commit
b9ff0a0997
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      la_animation.c
  2. 2 2
      resources/la_properties.c

+ 1 - 1
la_animation.c

@@ -216,7 +216,7 @@ void laAnimationRemoveAction(laAction* aa){
     while(aa->Channels.pFirst){ laAnimationRemoveChannel(aa,aa->Channels.pFirst); }
     if(!aa->HolderContainer || !aa->HolderInstance){ return; }
     strSafeDestroy(&aa->Name);
-    if(aa=MAIN.Animation->CurrentAction){
+    if(aa==MAIN.Animation->CurrentAction){
         if(aa->Item.pNext){ memAssignRef(MAIN.Animation,&MAIN.Animation->CurrentAction,aa->Item.pNext); }
         else{ memAssignRef(MAIN.Animation,&MAIN.Animation->CurrentAction,aa->Item.pPrev); }
     }

+ 2 - 2
resources/la_properties.c

@@ -864,7 +864,7 @@ void* tnsget_MeshObjectFaceRaw(tnsMeshObject* o, int* r_size, int* r_is_copy){
         arr[i]=o->f[f].looplen; i++;
         arr[i]=o->f[f].flags; i++;
         arr[i]=o->f[f].mat; i++;
-        float* nm=(void*)&arr[i]; tnsVectorSet2v(nm,o->f[f].n); i+=3;
+        float* nm=(void*)&arr[i]; tnsVectorSet3v(nm,o->f[f].n); i+=3;
         for(int l=0;l<o->f[f].looplen;l++){
             arr[i]=o->f[f].loop[l]; i++;
         }
@@ -888,7 +888,7 @@ void tnsset_MeshObjectFaceRaw(tnsMeshObject* o, int* data, int s){
         f->looplen=data[i]; i++;
         f->flags=data[i]; i++;
         f->mat=data[i]; i++;
-        float* nm=(void*)&data[i]; tnsVectorSet2v(f->n,nm); i+=3;
+        float* nm=(void*)&data[i]; tnsVectorSet3v(f->n,nm); i+=3;
         f->loop=calloc(1,sizeof(int)*f->looplen);
         for(int li=0;li<f->looplen;li++){
             f->loop[li]=data[i]; i++;