Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [259ff81012]:

To Artifact [074e5c782f]:


726
727
728
729
730
731
732

733
734
735
736
737
738
739
  // calling this function is limited to only certain times.
  Object*o=objects[obj];
  Uint8 ord=classes[o->class]->order;
  Uint8 u;
  Sint32 v0,v1;
  Uint16 p;
  Uint32 n=firstobj;

  for(;;) {
    if(n==obj || n==VOIDLINK) goto notfound;
    u=classes[objects[n]->class]->order;
    if(u<ord || !(objects[n]->oflags&OF_ORDERED)) goto found;
    if(u==ord) {
      p=orders[ord]+1;
      criteria: switch(orders[p]) {







>







726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
  // calling this function is limited to only certain times.
  Object*o=objects[obj];
  Uint8 ord=classes[o->class]->order;
  Uint8 u;
  Sint32 v0,v1;
  Uint16 p;
  Uint32 n=firstobj;
  Value v;
  for(;;) {
    if(n==obj || n==VOIDLINK) goto notfound;
    u=classes[objects[n]->class]->order;
    if(u<ord || !(objects[n]->oflags&OF_ORDERED)) goto found;
    if(u==ord) {
      p=orders[ord]+1;
      criteria: switch(orders[p]) {
786
787
788
789
790
791
792








793
794
795
796
797
798
799
          v1=o->misc7.s; v0=objects[n]->misc7.s; goto compare;
        case OP_TEMPERATURE: v0=o->temperature; v1=objects[n]->temperature; goto compare;
        case OP_TEMPERATURE_C: v1=o->temperature; v0=objects[n]->temperature; goto compare;
        case OP_XLOC: v0=o->x; v1=objects[n]->x; goto compare;
        case OP_XLOC_C: v1=o->x; v0=objects[n]->x; goto compare;
        case OP_YLOC: v0=o->y; v1=objects[n]->y; goto compare;
        case OP_YLOC_C: v1=o->y; v0=objects[n]->y; goto compare;








        compare:
          if(v0==v1) {
            p++;
            goto criteria;
          }
          if(v0>v1) goto found;
          break;







>
>
>
>
>
>
>
>







787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
          v1=o->misc7.s; v0=objects[n]->misc7.s; goto compare;
        case OP_TEMPERATURE: v0=o->temperature; v1=objects[n]->temperature; goto compare;
        case OP_TEMPERATURE_C: v1=o->temperature; v0=objects[n]->temperature; goto compare;
        case OP_XLOC: v0=o->x; v1=objects[n]->x; goto compare;
        case OP_XLOC_C: v1=o->x; v0=objects[n]->x; goto compare;
        case OP_YLOC: v0=o->y; v1=objects[n]->y; goto compare;
        case OP_YLOC_C: v1=o->y; v0=objects[n]->y; goto compare;
        case 0xC000 ... 0xFFFF: // message
          changed=0;
          v=send_message(obj,n,(orders[p]&0x3FFF)+256,NVALUE(o->x),NVALUE(o->y),NVALUE(0));
          if(changed) Throw("State-changing is not allowed during ordering");
          changed=1;
          if((o->oflags|objects[n]->oflags)&OF_DESTROYED) Throw("Destruction during ordering");
          if(v.t) Throw("Type mismatch in order criteria");
          v0=0; v1=v.s; goto compare;
        compare:
          if(v0==v1) {
            p++;
            goto criteria;
          }
          if(v0>v1) goto found;
          break;