ZoriaRPG

COMBOTDM

Oct 2nd, 2017
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. case COMBOTDM:
  2.     {
  3.         int pos = (ri->d[0])/10000;
  4.         int sc = (ri->d[2]/10000);
  5.         int m = (ri->d[1]/10000)-1;
  6.         //int m = zc_max((ri->d[1]/10000)-1,0); //2.50.1 had this.
  7.     bool err_input_found;
  8.        
  9.     if ( m < 0 || m >= map_count ) {
  10.         al_trace("Invalid Map Reference Passed to Game->GetComboType: \n %d", m);
  11.         err_input_found = true;
  12.     }
  13.    
  14.     if ( sc < 0 || sc >= MAPSCRS )
  15.     {
  16.         al_trace("Invalid Screen Reference Passed to Screen->GetComboType: \n %d", sc);
  17.         err_input_found = true;
  18.     }
  19.    
  20.     if ( pos < 0 || pos > 175 )
  21.     {
  22.         al_trace("Invalid Position Reference Passed to Screen->GetComboype: \n %d", pos);
  23.         err_input_found = true;
  24.     }
  25.    
  26.     if ( err_input_found ) {
  27.         ret = -10000;
  28.     }
  29.        
  30.     else
  31.     {
  32.             long scr = m*MAPSCRS+sc;
  33.         //long scr = zc_max(m*MAPSCRS+sc,0); //2.50.1 had this.
  34.             int layr = whichlayer(scr);
  35.             if(scr==(currmap*MAPSCRS+currscr))
  36.                 ret=combobuf[tmpscr->data[pos]].type*10000;
  37.             else if(layr>-1)
  38.                 ret=combobuf[tmpscr2[layr].data[pos]].type*10000;
  39.             else ret=combobuf[
  40.                              TheMaps[scr].data[pos]].type*10000;
  41.     }
  42.  
  43.     }
  44.     break;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×