Free Hero Mesh

Check-in [47b6ef91c7]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Fix the timing of the MOVED message; I am not exactly sure about the correct behaviour but this seems to work OK
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 47b6ef91c7c920bd154881726668b9621c18e909
User & Date: user on 2020-12-29 04:43:53
Other Links: manifest | tags
Context
2020-12-29
08:27
Implement "is" instruction, and do not send MSG_CREATED for itself check-in: cc7a46d4df user: user tags: trunk
04:43
Fix the timing of the MOVED message; I am not exactly sure about the correct behaviour but this seems to work OK check-in: 47b6ef91c7 user: user tags: trunk
2020-12-28
22:23
Fix the Missile animations by not disabling visual animation when no logical animation is active check-in: 89831418e9 user: user tags: trunk
Changes

Modified exec.c from [8b686e824a] to [bec69a903f].

1664
1665
1666
1667
1668
1669
1670
1671
1672


1673
1674
1675
1676
1677
1678
1679
1664
1665
1666
1667
1668
1669
1670


1671
1672
1673
1674
1675
1676
1677
1678
1679







-
-
+
+







    n=playfield[i];
    while(n!=VOIDLINK) {
      o=objects[n];
      m=o->up;
      if(o->oflags&OF_DESTROYED) {
        objtrash(n);
      } else if(classes[o->class]->cflags&CF_COMPATIBLE) {
        if(o->oflags&OF_MOVED) {
          o->oflags&=~OF_MOVED;
        if((o->oflags&(OF_MOVED|OF_MOVED2))==OF_MOVED) {
          o->oflags=(o->oflags|OF_MOVED2)&~OF_MOVED;
          send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn));
          busy=1;
        }
        if(o->departed) {
          send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(0),NVALUE(0),NVALUE(turn));
          o->departed=0;
          busy=1;
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709

1710
1711
1712
1713
1714
1715
1716
1698
1699
1700
1701
1702
1703
1704

1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716







-




+







  n=lastobj;
  while(n!=VOIDLINK) {
    o=objects[n];
    if(!(classes[o->class]->cflags&CF_COMPATIBLE)) {
      if(o->oflags&OF_MOVED2) send_message(VOIDLINK,n,MSG_MOVED,NVALUE(0),NVALUE(0),NVALUE(turn)),busy=1;
      if(o->departed2) send_message(VOIDLINK,n,MSG_DEPARTED,NVALUE(o->departed2),NVALUE(0),NVALUE(turn)),busy=1;
      if(o->arrived2) send_message(VOIDLINK,n,MSG_ARRIVED,NVALUE(o->arrived2),NVALUE(0),NVALUE(turn)),busy=1;
      o->oflags&=~OF_MOVED2;
      o->arrived2=o->departed2=0;
      if(o->anim && (o->anim->status&ANISTAT_LOGICAL)) execute_animation(n);
      if(o->oflags&(OF_BUSY|OF_USERSIGNAL)) busy=1;
    }
    o->oflags&=~OF_MOVED2;
    n=o->prev;
  }
  // Ending phase
  if(!busy && !all_flushed) {
    n=lastobj;
    while(n!=VOIDLINK) {
      v=send_message(VOIDLINK,n,MSG_END_TURN,NVALUE(turn),NVALUE(0),NVALUE(0));