Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWFOTE FUSS » Changes to get clean compile ...
Forum Rules | Mark all | Recent Posts

Changes to get clean compile in cygwin
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 27, 2009, 2:04 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

in act_move.c
find
short encumbrance( CHAR_DATA * ch, short move )
{
   int cur, max;

   max = can_carry_w( ch );
   cur = ch->carry_weight;
   if( cur >= max )
      return move * 4;
   else if( cur >= max * 0.95 )
      return move * 3.5;
   else if( cur >= max * 0.90 )
      return move * 3;
   else if( cur >= max * 0.85 )
      return move * 2.5;
   else if( cur >= max * 0.80 )
      return move * 2;
   else if( cur >= max * 0.75 )
      return move * 1.5;
   else
      return move;
}

change it to
short encumbrance( CHAR_DATA * ch, short move )
{
   int cur, max;

   max = can_carry_w( ch );
   cur = ch->carry_weight;
   if( cur >= max )
      return ( short )( move * 4 );
   else if( cur >= max * 0.95 )
      return ( short )( move * 3.5 );
   else if( cur >= max * 0.90 )
      return ( short )( move * 3 );
   else if( cur >= max * 0.85 )
      return ( short )( move * 2.5 );
   else if( cur >= max * 0.80 )
      return ( short )( move * 2 );
   else if( cur >= max * 0.75 )
      return ( short )( move * 1.5 );
   else
      return move;
}

in act_obj.c
line 2824 change
      WAIT_STATE( ch, 1.5 * PULSE_VIOLENCE );

to this
      WAIT_STATE( ch, ( int )( 1.5 * PULSE_VIOLENCE ) );

in build.c function do_mset
find
   if( !str_cmp( arg2, "level" ) )
   {
      if( !can_mmodify( ch, victim ) )
         return;
      if( !IS_NPC( victim ) )
      {
         send_to_char( "Not on PC's.\r\n", ch );
         return;
      }

      if( value < 0 || value > LEVEL_AVATAR + 5 )
      {
         ch_printf( ch, "Level range is 0 to %d.\r\n", LEVEL_AVATAR + 5 );
         return;
      }
      {
         int ability;
         for( ability = 0; ability < MAX_ABILITY; ability++ )
            victim->skill_level[ability] = value;
      }
      victim->top_level = value;
      victim->armor = 100 - value * 2.5;
      victim->hitroll = value / 5;
      victim->damroll = value / 5;
      if( IS_NPC( victim ) && IS_SET( victim->act, ACT_PROTOTYPE ) )
      {
         victim->pIndexData->level = value;
         victim->pIndexData->ac = 100 - value * 2.5;
         victim->pIndexData->hitroll = victim->hitroll;
         victim->pIndexData->damroll = victim->damroll;
      }
      sprintf( outbuf, "%s damnumdie %d", arg1, value / 10 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s damsizedie %d", arg1, 4 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s damplus %d", arg1, 2 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitnumdie %d", arg1, value / 5 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitsizedie %d", arg1, 10 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitplus %d", arg1, value * 10 );
      do_mset( ch, outbuf );

      return;
   }

change it to this
   if( !str_cmp( arg2, "level" ) )
   {
      if( !can_mmodify( ch, victim ) )
         return;
      if( !IS_NPC( victim ) )
      {
         send_to_char( "Not on PC's.\r\n", ch );
         return;
      }

      if( value < 0 || value > LEVEL_AVATAR + 5 )
      {
         ch_printf( ch, "Level range is 0 to %d.\r\n", LEVEL_AVATAR + 5 );
         return;
      }
      {
         int ability;
         for( ability = 0; ability < MAX_ABILITY; ability++ )
            victim->skill_level[ability] = value;
      }
      victim->top_level = value;
      victim->armor = ( short )( 100 - value * 2.5 );
      victim->hitroll = value / 5;
      victim->damroll = value / 5;
      if( IS_NPC( victim ) && IS_SET( victim->act, ACT_PROTOTYPE ) )
      {
         victim->pIndexData->level = value;
         victim->pIndexData->ac = ( short )( 100 - value * 2.5 );
         victim->pIndexData->hitroll = victim->hitroll;
         victim->pIndexData->damroll = victim->damroll;
      }
      sprintf( outbuf, "%s damnumdie %d", arg1, value / 10 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s damsizedie %d", arg1, 4 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s damplus %d", arg1, 2 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitnumdie %d", arg1, value / 5 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitsizedie %d", arg1, 10 );
      do_mset( ch, outbuf );
      sprintf( outbuf, "%s hitplus %d", arg1, value * 10 );
      do_mset( ch, outbuf );

      return;
   }

in clans.c
function do_gatherclans
find
      for( planet = first_planet; planet; planet = planet->next )
         if( clan == planet->governed_by )
         {
            support += planet->pop_support;
            pCount++;
            revenue += get_taxes( planet );
         }

change it to
      for( planet = first_planet; planet; planet = planet->next )
         if( clan == planet->governed_by )
         {
            support += ( int )planet->pop_support;
            pCount++;
            revenue += get_taxes( planet );
         }

function do_clanstat
find
   for( planet = first_planet; planet; planet = planet->next )
      if( clan == planet->governed_by )
      {
         support += planet->pop_support;
         pCount++;
         revenue += get_taxes( planet );
      }

change it to
   for( planet = first_planet; planet; planet = planet->next )
      if( clan == planet->governed_by )
      {
         support += ( int )planet->pop_support;
         pCount++;
         revenue += get_taxes( planet );
      }

function do_clans
find
      for( planet = first_planet; planet; planet = planet->next )
         if( clan == planet->governed_by )
         {
            support += planet->pop_support;
            pCount++;
            revenue += get_taxes( planet );
         }

change it to
      for( planet = first_planet; planet; planet = planet->next )
         if( clan == planet->governed_by )
         {
            support += ( int )planet->pop_support;
            pCount++;
            revenue += get_taxes( planet );
         }

in db.c
function create_mobile
find
   if( pMobIndex->ac )
      mob->armor = pMobIndex->ac;
   else
      mob->armor = 100 - mob->top_level * 2.5;

change it to
   if( pMobIndex->ac )
      mob->armor = pMobIndex->ac;
   else
      mob->armor = ( short )( 100 - mob->top_level * 2.5 );

in fight.c
line 989
change
         dam *= 1.5;

to
         dam = ( int )( dam * 1.5 );

line 994
change
         dam *= 1.25;

to
         dam = ( int )( dam * 1.25 );

line 1065
change
         dam *= 0.75;

to
         dam = ( int )( dam * 0.75 );

line 1070
change
         dam *= 0.5;

to
         dam = ( int )( dam * 0.5 );

in fskills.c
line 959
change
      victim->hit -= dam * 1.5;

to
      victim->hit -= ( short )( dam * 1.5 );

in handler.c
find
int get_exp_worth( CHAR_DATA * ch )
{
   int wexp;

   wexp = ch->skill_level[COMBAT_ABILITY] * ch->top_level * 50;
   wexp += ch->max_hit * 2;
   wexp -= ( ch->armor - 50 ) * 2;
   wexp += ( ch->barenumdie * ch->baresizedie + GET_DAMROLL( ch ) ) * 50;
   wexp += GET_HITROLL( ch ) * ch->top_level * 10;
   if( IS_AFFECTED( ch, AFF_SANCTUARY ) )
      wexp += wexp * 1.5;
   if( IS_AFFECTED( ch, AFF_FIRESHIELD ) )
      wexp += wexp * 1.2;
   if( IS_AFFECTED( ch, AFF_SHOCKSHIELD ) )
      wexp += wexp * 1.2;
   wexp = URANGE( MIN_EXP_WORTH, wexp, MAX_EXP_WORTH );

   return wexp;
}

change it to
int get_exp_worth( CHAR_DATA * ch )
{
   int wexp;

   wexp = ch->skill_level[COMBAT_ABILITY] * ch->top_level * 50;
   wexp += ch->max_hit * 2;
   wexp -= ( ch->armor - 50 ) * 2;
   wexp += ( ch->barenumdie * ch->baresizedie + GET_DAMROLL( ch ) ) * 50;
   wexp += GET_HITROLL( ch ) * ch->top_level * 10;
   if( IS_AFFECTED( ch, AFF_SANCTUARY ) )
      wexp += ( int )( wexp * 1.5 );
   if( IS_AFFECTED( ch, AFF_FIRESHIELD ) )
      wexp += ( int )( wexp * 1.2 );
   if( IS_AFFECTED( ch, AFF_SHOCKSHIELD ) )
      wexp += ( int )( wexp * 1.2 );
   wexp = URANGE( MIN_EXP_WORTH, wexp, MAX_EXP_WORTH );

   return wexp;
}

in magic.c
line 1650
change
   af.duration = ( 1 + ( level / 3 ) ) * DUR_CONV;

to
   af.duration = ( int )( ( 1 + ( level / 3 ) ) * DUR_CONV );

line 1805
change
   af.duration = 10 * level * DUR_CONV;

to
   af.duration = ( int )( 10 * level * DUR_CONV );

line 1870
change
   af.duration = ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV;

to
   af.duration = ( int )( ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV );

line 2115
change
   af.duration = ( 4 * level ) * DUR_CONV;

to
   af.duration = ( int )( ( 4 * level ) * DUR_CONV );

line 2487
change
   af.duration = level * DUR_CONV;

to
   af.duration = ( int )( level * DUR_CONV );

line 2849
change
      af.duration = ( ( level / 4 ) + 12 ) * DUR_CONV;

to
      af.duration = ( int )( ( ( level / 4 ) + 12 ) * DUR_CONV );

line 3064
change
   af.duration = number_fuzzy( level / 4 ) * DUR_CONV;

to
   af.duration = ( int )( number_fuzzy( level / 4 ) * DUR_CONV );

line 3094
change
   af.duration = level * DUR_CONV;

to
   af.duration = ( int )( level * DUR_CONV );

line 3254
change
   af.duration = ( 4 + level ) * DUR_CONV;

to
   af.duration = ( int )( ( 4 + level ) * DUR_CONV );

line 3339
change
   af.duration = level / 2 * DUR_CONV;

to
   af.duration = ( int )( level / 2 * DUR_CONV );

line 3962
change
      af.duration = ( number_fuzzy( ( level + 1 ) / 4 ) + 1 ) * DUR_CONV;

to
      af.duration = ( int )( ( number_fuzzy( ( level + 1 ) / 4 ) + 1 ) * DUR_CONV );

line 4317
change
   return damage( ch, victim, ( dam * 1.4 ), sn );

to
   return damage( ch, victim, ( int )( dam * 1.4 ), sn );

line 5044
change
   af.duration = ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV;

to
   af.duration = ( int )( ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV );

planets.c
around line 602
find
   if( planet->size > 0 )
   {
      float tempf;

      tempf = planet->citysize;
      pc = tempf / planet->size * 100;

      tempf = planet->wilderness;
      pw = tempf / planet->size * 100;

      tempf = planet->farmland;
      pf = tempf / planet->size * 100;
   }

change it to
   if( planet->size > 0 )
   {
      float tempf;

      tempf = planet->citysize;
      pc = ( int )( tempf / planet->size * 100 );

      tempf = planet->wilderness;
      pw = ( int )( tempf / planet->size * 100 );

      tempf = planet->farmland;
      pf = ( int )( tempf / planet->size * 100 );
   }

find
long get_taxes( PLANET_DATA * planet )
{
   long gain;

   gain = planet->base_value;
   gain += planet->base_value * ( planet->pop_support / 100 );
   gain += ( planet->population * 150 );
   gain += UMAX( 0, planet->pop_support / 10 * ( planet->population * 20 ) );

   return gain;
}

change it to
long get_taxes( PLANET_DATA * planet )
{
   long gain;

   gain = planet->base_value;
   gain += ( long )( planet->base_value * ( planet->pop_support / 100 ) );
   gain += ( planet->population * 150 );
   gain += UMAX( 0, ( int )( planet->pop_support / 10 * ( planet->population * 20 ) ) );

   return gain;
}

in ships.c
line 363
change
   ch->pcdata->clan->funds -= ship_prototypes[ship_type].cost * 1.3;

to
   ch->pcdata->clan->funds -= ( long )( ship_prototypes[ship_type].cost * 1.3 );

line 742
change
                     bmshipcost = ship_prototypes[x].cost * 2.5;

to
                     bmshipcost = ( int )( ship_prototypes[x].cost * 2.5 );

line 746
change
                     bmshipcost = ship_prototypes[x].cost * 1.5;

to
                     bmshipcost = ( int )( ship_prototypes[x].cost * 1.5 );

in skills.c
line 2881
change
      af.duration = ch->skill_level[SMUGGLING_ABILITY] * DUR_CONV;

to
      af.duration = ( int )( ch->skill_level[SMUGGLING_ABILITY] * DUR_CONV );

in space.c
around line 528
find
         if( missile->mx < target->vx )
            missile->mx += UMIN( missile->speed / 5, target->vx - missile->mx );
         else if( missile->mx > target->vx )
            missile->mx -= UMIN( missile->speed / 5, missile->mx - target->vx );
         if( missile->my < target->vy )
            missile->my += UMIN( missile->speed / 5, target->vy - missile->my );
         else if( missile->my > target->vy )
            missile->my -= UMIN( missile->speed / 5, missile->my - target->vy );
         if( missile->mz < target->vz )
            missile->mz += UMIN( missile->speed / 5, target->vz - missile->mz );
         else if( missile->mz > target->vz )
            missile->mz -= UMIN( missile->speed / 5, missile->mz - target->vz );

         if( abs( missile->mx ) - abs( target->vx ) <= 20 && abs( missile->mx ) - abs( target->vx ) >= -20
             && abs( missile->my ) - abs( target->vy ) <= 20 && abs( missile->my ) - abs( target->vy ) >= -20
             && abs( missile->mz ) - abs( target->vz ) <= 20 && abs( missile->mz ) - abs( target->vz ) >= -20 )

change it to
         if( missile->mx < target->vx )
            missile->mx += UMIN( missile->speed / 5, ( int )( target->vx - missile->mx ) );
         else if( missile->mx > target->vx )
            missile->mx -= UMIN( missile->speed / 5, ( int )( missile->mx - target->vx ) );
         if( missile->my < target->vy )
            missile->my += UMIN( missile->speed / 5, ( int )( target->vy - missile->my ) );
         else if( missile->my > target->vy )
            missile->my -= UMIN( missile->speed / 5, ( int )( missile->my - target->vy ) );
         if( missile->mz < target->vz )
            missile->mz += UMIN( missile->speed / 5, ( int )( target->vz - missile->mz ) );
         else if( missile->mz > target->vz )
            missile->mz -= UMIN( missile->speed / 5, ( int )( missile->mz - target->vz ) );

         if( abs( ( int )missile->mx ) - abs( ( int )target->vx ) <= 20 && abs( ( int )missile->mx ) - abs( ( int )target->vx ) >= -20
             && abs( ( int )missile->my ) - abs( ( int )target->vy ) <= 20 && abs( ( int )missile->my ) - abs( ( int )target->vy ) >= -20
             && abs( ( int )missile->mz ) - abs( ( int )target->vz ) <= 20 && abs( ( int )missile->mz ) - abs( ( int )target->vz ) >= -20 )

around line 702
find
      if( ship->starsystem->star1 && strcmp( ship->starsystem->star1, "" ) &&
          abs( ship->vx - ship->starsystem->s1x ) < 10 &&
          abs( ship->vy - ship->starsystem->s1y ) < 10 && abs( ship->vz - ship->starsystem->s1z ) < 10 )

change it to
      if( ship->starsystem->star1 && strcmp( ship->starsystem->star1, "" ) &&
          abs( ( int )( ship->vx - ship->starsystem->s1x ) ) < 10 &&
          abs( ( int )( ship->vy - ship->starsystem->s1y ) ) < 10 && abs( ( int )( ship->vz - ship->starsystem->s1z ) ) < 10 )

around line 712
find
      if( ship->starsystem->star2 && strcmp( ship->starsystem->star2, "" ) &&
          abs( ship->vx - ship->starsystem->s2x ) < 10 &&
          abs( ship->vy - ship->starsystem->s2y ) < 10 && abs( ship->vz - ship->starsystem->s2z ) < 10 )

change it to
      if( ship->starsystem->star2 && strcmp( ship->starsystem->star2, "" ) &&
          abs( ( int )( ship->vx - ship->starsystem->s2x ) ) < 10 &&
          abs( ( int )( ship->vy - ship->starsystem->s2y ) ) < 10 && abs( ( int )( ship->vz - ship->starsystem->s2z ) ) < 10 )

around line 725
find
         if( ship->starsystem->planet1 && strcmp( ship->starsystem->planet1, "" ) &&
             abs( ship->vx - ship->starsystem->p1x ) < 10 &&
             abs( ship->vy - ship->starsystem->p1y ) < 10 && abs( ship->vz - ship->starsystem->p1z ) < 10 )

change it to
         if( ship->starsystem->planet1 && strcmp( ship->starsystem->planet1, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p1x ) ) < 10 &&
             abs( ( int )( ship->vy - ship->starsystem->p1y ) ) < 10 && abs( ( int )( ship->vz - ship->starsystem->p1z ) ) < 10 )

around line 736
find
         if( ship->starsystem->planet2 && strcmp( ship->starsystem->planet2, "" ) &&
             abs( ship->vx - ship->starsystem->p2x ) < 10 &&
             abs( ship->vy - ship->starsystem->p2y ) < 10 && abs( ship->vz - ship->starsystem->p2z ) < 10 )

change it to
         if( ship->starsystem->planet2 && strcmp( ship->starsystem->planet2, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p2x ) ) < 10 &&
             abs( ( int )( ship->vy - ship->starsystem->p2y ) ) < 10 && abs( ( int )( ship->vz - ship->starsystem->p2z ) ) < 10 )

around line 746
find
         if( ship->starsystem->planet3 && strcmp( ship->starsystem->planet3, "" ) &&
             abs( ship->vx - ship->starsystem->p3x ) < 10 &&
             abs( ship->vy - ship->starsystem->p3y ) < 10 && abs( ship->vz - ship->starsystem->p3z ) < 10 )

change it to
         if( ship->starsystem->planet3 && strcmp( ship->starsystem->planet3, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p3x ) ) < 10 &&
             abs( ( int )( ship->vy - ship->starsystem->p3y ) ) < 10 && abs( ( int )( ship->vz - ship->starsystem->p3z ) ) < 10 )

around line 903
find
                  if( ship->shipstate != SHIP_HYPERSPACE && ship->energy > 25
                      && ship->target0->starsystem == ship->starsystem
                      && abs( target->vx - ship->vx ) <= 1000
                      && abs( target->vy - ship->vy ) <= 1000
                      && abs( target->vz - ship->vz ) <= 1000 && ship->primaryState < ship->primaryCount )

change it to
                  if( ship->shipstate != SHIP_HYPERSPACE && ship->energy > 25
                      && ship->target0->starsystem == ship->starsystem
                      && abs( ( int )( target->vx - ship->vx ) ) <= 1000
                      && abs( ( int )( target->vy - ship->vy ) ) <= 1000
                      && abs( ( int )( target->vz - ship->vz ) ) <= 1000 && ship->primaryState < ship->primaryCount )

around line 912
find
                        schance -= ( abs( target->vx - ship->vx ) / 70 );
                        schance -= ( abs( target->vy - ship->vy ) / 70 );
                        schance -= ( abs( target->vz - ship->vz ) / 70 );

change it to
                        schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 70 );
                        schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 70 );
                        schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 70 );

around line 1151
find
            if( target != ship &&
                abs( ship->vx - target->vx ) < target_too_close &&
                abs( ship->vy - target->vy ) < target_too_close && abs( ship->vz - target->vz ) < target_too_close )

change it to
            if( target != ship &&
                abs( ( int )( ship->vx - target->vx ) ) < target_too_close &&
                abs( ( int )( ship->vy - target->vy ) ) < target_too_close && abs( ( int )( ship->vz - target->vz ) ) < target_too_close )

around line 1159
find
         if( ship->starsystem->star1 && strcmp( ship->starsystem->star1, "" ) &&
             abs( ship->vx - ship->starsystem->s1x ) < too_close &&
             abs( ship->vy - ship->starsystem->s1y ) < too_close && abs( ship->vz - ship->starsystem->s1z ) < too_close )

change it to
         if( ship->starsystem->star1 && strcmp( ship->starsystem->star1, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->s1x ) ) < too_close &&
             abs( ( int )( ship->vy - ship->starsystem->s1y ) ) < too_close && abs( ( int )( ship->vz - ship->starsystem->s1z ) ) < too_close )

around line 1168
find
         if( ship->starsystem->star2 && strcmp( ship->starsystem->star2, "" ) &&
             abs( ship->vx - ship->starsystem->s2x ) < too_close &&
             abs( ship->vy - ship->starsystem->s2y ) < too_close && abs( ship->vz - ship->starsystem->s2z ) < too_close )

change it to
         if( ship->starsystem->star2 && strcmp( ship->starsystem->star2, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->s2x ) ) < too_close &&
             abs( ( int )( ship->vy - ship->starsystem->s2y ) ) < too_close && abs( ( int )( ship->vz - ship->starsystem->s2z ) ) < too_close )

around line 1176
find
         if( ship->starsystem->planet1 && strcmp( ship->starsystem->planet1, "" ) &&
             abs( ship->vx - ship->starsystem->p1x ) < too_close &&
             abs( ship->vy - ship->starsystem->p1y ) < too_close && abs( ship->vz - ship->starsystem->p1z ) < too_close )

change it to
         if( ship->starsystem->planet1 && strcmp( ship->starsystem->planet1, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p1x ) ) < too_close &&
             abs( ( int )( ship->vy - ship->starsystem->p1y ) ) < too_close && abs( ( int )( ship->vz - ship->starsystem->p1z ) ) < too_close )

around line 1184
find
         if( ship->starsystem->planet2 && strcmp( ship->starsystem->planet2, "" ) &&
             abs( ship->vx - ship->starsystem->p2x ) < too_close &&
             abs( ship->vy - ship->starsystem->p2y ) < too_close && abs( ship->vz - ship->starsystem->p2z ) < too_close )

change it to
         if( ship->starsystem->planet2 && strcmp( ship->starsystem->planet2, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p2x ) ) < too_close &&
             abs( ( int )( ship->vy - ship->starsystem->p2y ) ) < too_close && abs( ( int )( ship->vz - ship->starsystem->p2z ) ) < too_close )

around line 1192
find
         if( ship->starsystem->planet3 && strcmp( ship->starsystem->planet3, "" ) &&
             abs( ship->vx - ship->starsystem->p3x ) < too_close &&
             abs( ship->vy - ship->starsystem->p3y ) < too_close && abs( ship->vz - ship->starsystem->p3z ) < too_close )

change it to
         if( ship->starsystem->planet3 && strcmp( ship->starsystem->planet3, "" ) &&
             abs( ( int )( ship->vx - ship->starsystem->p3x ) ) < too_close &&
             abs( ( int )( ship->vy - ship->starsystem->p3y ) ) < too_close && abs( ( int )( ship->vz - ship->starsystem->p3z ) ) < too_close )

around line 1246
find
         if( target != ship && ship->shipstate == SHIP_READY &&
             abs( ship->vx - target->vx ) < target_too_close &&
             abs( ship->vy - target->vy ) < target_too_close && abs( ship->vz - target->vz ) < target_too_close )

change it to
         if( target != ship && ship->shipstate == SHIP_READY &&
             abs( ( int )( ship->vx - target->vx ) ) < target_too_close &&
             abs( ( int )( ship->vy - target->vy ) ) < target_too_close && abs( ( int )( ship->vz - target->vz ) ) < target_too_close )

around line 1318
find
               if( ship->shipstate != SHIP_HYPERSPACE && ship->energy > 25
                   && ship->missilestate == MISSILE_READY && ship->target0->starsystem == ship->starsystem
                   && abs( target->vx - ship->vx ) <= 1200
                   && abs( target->vy - ship->vy ) <= 1200 && abs( target->vz - ship->vz ) <= 1200 && ship->missiles > 0 )

change it to
               if( ship->shipstate != SHIP_HYPERSPACE && ship->energy > 25
                   && ship->missilestate == MISSILE_READY && ship->target0->starsystem == ship->starsystem
                   && abs( ( int )( target->vx - ship->vx ) ) <= 1200
                   && abs( ( int )( target->vy - ship->vy ) ) <= 1200 && abs( ( int )( target->vz - ship->vz ) ) <= 1200 && ship->missiles > 0 )

around line 1326
find
                     schance -= ( abs( target->vx - ship->vx ) / 100 );
                     schance -= ( abs( target->vy - ship->vy ) / 100 );
                     schance -= ( abs( target->vz - ship->vz ) / 100 );

change it to
                     schance -= ( abs( ( int )( target->vx - ship->vx ) / 100 ) );
                     schance -= ( abs( ( int )( target->vy - ship->vy ) / 100 ) );
                     schance -= ( abs( ( int )( target->vz - ship->vz ) / 100 ) );

around line 4937
find
   missile->mx = ship->vx;
   missile->my = ship->vy;
   missile->mz = ship->vz;

change it to
   missile->mx = ( int )ship->vx;
   missile->my = ( int )ship->vy;
   missile->mz = ( int )ship->vz;

around line 7077
find
   if( abs( target->vx - ship->vx ) > 500 + ship->sensor * 2 ||
       abs( target->vy - ship->vy ) > 500 + ship->sensor * 2 || abs( target->vz - ship->vz ) > 500 + ship->sensor * 2 )

change it to
   if( abs( ( int )( target->vx - ship->vx ) ) > 500 + ship->sensor * 2 ||
       abs( ( int )( target->vy - ship->vy ) ) > 500 + ship->sensor * 2 || abs( ( int )( target->vz - ship->vz ) ) > 500 + ship->sensor * 2 )

around line 7446
find
   if( abs( target->vx - ship->vx ) > 500 + ship->sensor * 2 ||
       abs( target->vy - ship->vy ) > 500 + ship->sensor * 2 || abs( target->vz - ship->vz ) > 500 + ship->sensor * 2 )

change it to
   if( abs( ( int )( target->vx - ship->vx ) ) > 500 + ship->sensor * 2 ||
       abs( ( int )( target->vy - ship->vy ) ) > 500 + ship->sensor * 2 || abs( ( int )( target->vz - ship->vz ) ) > 500 + ship->sensor * 2 )

around line 7711
find
      if( abs( eShip->vx - ship->vx ) < 500
          && abs( eShip->vy - ship->vy ) < 500 && abs( eShip->vz - ship->vz ) < 500 && eShip->sclass > SHIP_CRUISER )

change it to
      if( abs( ( int )( eShip->vx - ship->vx ) ) < 500
          && abs( ( int )( eShip->vy - ship->vy ) ) < 500 && abs( ( int )( eShip->vz - ship->vz ) ) < 500 && eShip->sclass > SHIP_CRUISER )

around line 7857
find
         if( abs( ship->vx - target->vx ) > 5000 ||
             abs( ship->vy - target->vy ) > 5000 || abs( ship->vz - target->vz ) > 5000 )

change it to
         if( abs( ( int )( ship->vx - target->vx ) ) > 5000 ||
             abs( ( int )( ship->vy - target->vy ) ) > 5000 || abs( ( int )( ship->vz - target->vz ) ) > 5000 )

line 8101
change
      if( abs( target->vx - ship->vx ) > 1000 || abs( target->vy - ship->vy ) > 1000 || abs( target->vz - ship->vz ) > 1000 )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > 1000 || abs( ( int )( target->vy - ship->vy ) ) > 1000 || abs( ( int )( target->vz - ship->vz ) ) > 1000 )

around line 8154
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

around line 8329
change
      if( abs( target->vx - ship->vx ) > range ||
          abs( target->vy - ship->vy ) > range || abs( target->vz - ship->vz ) > range )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > range ||
          abs( ( int )( target->vy - ship->vy ) ) > range || abs( ( int )( target->vz - ship->vz ) ) > range )

around line 8381
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

line 8529
change
      if( abs( target->vx - ship->vx ) > 1000 || abs( target->vy - ship->vy ) > 1000 || abs( target->vz - ship->vz ) > 1000 )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > 1000 || abs( ( int )( target->vy - ship->vy ) ) > 1000 || abs( ( int )( target->vz - ship->vz ) ) > 1000 )

around line 8540
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

line 8612
change
      if( abs( target->vx - ship->vx ) > 1000 || abs( target->vy - ship->vy ) > 1000 || abs( target->vz - ship->vz ) > 1000 )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > 1000 || abs( ( int )( target->vy - ship->vy ) ) > 1000 || abs( ( int )( target->vz - ship->vz ) ) > 1000 )

around line 8623
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

line 8696
change
      if( abs( target->vx - ship->vx ) > 800 || abs( target->vy - ship->vy ) > 800 || abs( target->vz - ship->vz ) > 800 )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > 800 || abs( ( int )( target->vy - ship->vy ) ) > 800 || abs( ( int )( target->vz - ship->vz ) ) > 800 )

around line 8707
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

line 9038
change
      if( abs( target->vx - ship->vx ) > 1000 || abs( target->vy - ship->vy ) > 1000 || abs( target->vz - ship->vz ) > 1000 )

to
      if( abs( ( int )( target->vx - ship->vx ) ) > 1000 || abs( ( int )( target->vy - ship->vy ) ) > 1000 || abs( ( int )( target->vz - ship->vz ) ) > 1000 )

around line 9084
change
      schance -= ( abs( target->vx - ship->vx ) / 100 );
      schance -= ( abs( target->vy - ship->vy ) / 100 );
      schance -= ( abs( target->vz - ship->vz ) / 100 );

to
      schance -= ( abs( ( int )( target->vx - ship->vx ) ) / 100 );
      schance -= ( abs( ( int )( target->vy - ship->vy ) ) / 100 );
      schance -= ( abs( ( int )( target->vz - ship->vz ) ) / 100 );

around line 9257
change
      if( starsystem2->star1 && strcmp( starsystem2->star1, "" ) &&
          abs( ship->jx - starsystem2->s1x ) < 300 &&
          abs( ship->jy - starsystem2->s1y ) < 300 && abs( ship->jz - starsystem2->s1z ) < 300 )

to
      if( starsystem2->star1 && strcmp( starsystem2->star1, "" ) &&
          abs( ( int )( ship->jx - starsystem2->s1x ) ) < 300 &&
          abs( ( int )( ship->jy - starsystem2->s1y ) ) < 300 && abs( ( int )( ship->jz - starsystem2->s1z ) ) < 300 )

around line 9266
change
      else if( starsystem2->star2 && strcmp( starsystem2->star2, "" ) &&
               abs( ship->jx - starsystem2->s2x ) < 300 &&
               abs( ship->jy - starsystem2->s2y ) < 300 && abs( ship->jz - starsystem2->s2z ) < 300 )

to
      else if( starsystem2->star2 && strcmp( starsystem2->star2, "" ) &&
               abs( ( int )( ship->jx - starsystem2->s2x ) ) < 300 &&
               abs( ( int )( ship->jy - starsystem2->s2y ) ) < 300 && abs( ( int )( ship->jz - starsystem2->s2z ) ) < 300 )

around line 9275
change
      else if( starsystem2->planet1 && strcmp( starsystem2->planet1, "" ) &&
               abs( ship->jx - starsystem2->p1x ) < 300 &&
               abs( ship->jy - starsystem2->p1y ) < 300 && abs( ship->jz - starsystem2->p1z ) < 300 )

to
      else if( starsystem2->planet1 && strcmp( starsystem2->planet1, "" ) &&
               abs( ( int )( ship->jx - starsystem2->p1x ) ) < 300 &&
               abs( ( int )( ship->jy - starsystem2->p1y ) ) < 300 && abs( ( int )( ship->jz - starsystem2->p1z ) ) < 300 )

around line 9284
change
      else if( starsystem2->planet2 && strcmp( starsystem2->planet2, "" ) &&
               abs( ship->jx - starsystem2->p2x ) < 300 &&
               abs( ship->jy - starsystem2->p2y ) < 300 && abs( ship->jz - starsystem2->p2z ) < 300 )

to
      else if( starsystem2->planet2 && strcmp( starsystem2->planet2, "" ) &&
               abs( ( int )( ship->jx - starsystem2->p2x ) ) < 300 &&
               abs( ( int )( ship->jy - starsystem2->p2y ) ) < 300 && abs( ( int )( ship->jz - starsystem2->p2z ) ) < 300 )

around line 9293
change
      else if( starsystem2->planet3 && strcmp( starsystem2->planet3, "" ) &&
               abs( ship->jx - starsystem2->p3x ) < 300 &&
               abs( ship->jy - starsystem2->p3y ) < 300 && abs( ship->jz - starsystem2->p3z ) < 300 )

to
      else if( starsystem2->planet3 && strcmp( starsystem2->planet3, "" ) &&
               abs( ( int )( ship->jx - starsystem2->p3x ) ) < 300 &&
               abs( ( int )( ship->jy - starsystem2->p3y ) ) < 300 && abs( ( int )( ship->jz - starsystem2->p3z ) ) < 300 )

in special.c
line 774
change
                  victim->gold = victim->gold * .75;

to
                  victim->gold = ( int )( victim->gold * .75 );

change
line 780
change
[code]
                  victim->gold = victim->gold * .9;

to
                  victim->gold = ( int )( victim->gold * .9 );

line 855
change
               victim->gold = victim->gold * .75;

to
               victim->gold = ( int )( victim->gold * .75 );

line 861
change
               victim->gold = victim->gold * .9;

to
               victim->gold = ( int )( victim->gold * .9 );

in swskills.c
line 2858
change
         mob[mob_cnt]->armor = 100 - mob[mob_cnt]->top_level * 2.5;

to
         mob[mob_cnt]->armor = ( int )( 100 - mob[mob_cnt]->top_level * 2.5 );

line 2898
change
      mob->armor = 100 - mob->top_level * 2.5;

to
      mob->armor = ( int )( 100 - mob->top_level * 2.5 );

line 4808
change
      planet->pop_support += URANGE( 0.1, amount / 1000, 2 );

to
 
      planet->pop_support += URANGE( 1, amount / 1000, 2 ); /* ( int )0.1 would be pointless */

line 4901
change
   af.duration = ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV;

to
   af.duration = ( int )( ( number_fuzzy( ( level + 1 ) / 3 ) + 1 ) * DUR_CONV );

line 6519
change
         af.duration = ( number_fuzzy( ( ch->pcdata->learned[gsn_battle_command] + 1 ) / 3 ) + 1 ) * DUR_CONV;

to
         af.duration = ( int )( ( number_fuzzy( ( ch->pcdata->learned[gsn_battle_command] + 1 ) / 3 ) + 1 ) * DUR_CONV );

in update.c
line 754
change
            gain += get_curr_con( ch ) * 1.5;

to
            gain += ( int )( get_curr_con( ch ) * 1.5 );

line 816
change
            gain += get_curr_int( ch ) * 1.5;

to
            gain += ( int )( get_curr_int( ch ) * 1.5 );

line 1902
change
            amount = ch->pcdata->bank * .02;

to
            amount = ( int )( ch->pcdata->bank * .02 );

line 2723
change
      pulse_point = number_range( PULSE_TICK * 0.75, PULSE_TICK * 1.25 );

to
      pulse_point = number_range( ( int )( PULSE_TICK * 0.75 ), ( int) ( PULSE_TICK * 1.25 ) );

around line 3168
change
            pay = ( int )auction->bet * 0.9;
            tax = ( int )auction->bet * 0.1;

to
            pay = ( int )( auction->bet * 0.9 );
            tax = ( int )( auction->bet * 0.1 );

line 3189
change
            tax = ( int )auction->item->cost * 0.05;

to
            tax = ( int )( auction->item->cost * 0.05 );

I was going to test out some stuff in it and had to do all of this to even get it to compile. I'm going to upload a copy of it so Kayle can use it instead of doing all these by hand. The only change I had made to the code aside from these was to uncomment the CYGWIN in the makefile.
       
Post is unread #2 Aug 27, 2009, 2:12 pm
Go to the top of the page
Go to the bottom of the page

TigerzDen
Fledgling
GroupMembers
Posts26
JoinedAug 20, 2009

Those changes that need to be made in the FUSS 1.9 from this website?
       
Post is unread #3 Aug 27, 2009, 2:14 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

Nope they need to be applied to SWFotE 1.4 FUSS. :)
       
Post is unread #4 Aug 27, 2009, 2:26 pm
Go to the top of the page
Go to the bottom of the page

TigerzDen
Fledgling
GroupMembers
Posts26
JoinedAug 20, 2009

Oh, whoops, wasn't paying attention, LOL, my bad,
       
Post is unread #5 Aug 27, 2009, 4:32 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

No worries best to ask when your not sure. And better to ask before you start just trying to get in all those changes :).
       
Post is unread #6 Aug 28, 2009, 9:29 am   Last edited Aug 28, 2009, 9:29 am by Kayle
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I appreciate the attempt to save me some work, Remmy, but I gotta do them by hand anyway to add them to the SVN Repository. :P
       
Post is unread #7 Aug 28, 2009, 10:06 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

ah lol then you have your work cut out for you :)
       
Post is unread #8 Aug 28, 2009, 10:40 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Indeed. It was heart wrenching. :P But it's finally done. Getting ready to post the fixes now.
       
Post is unread #9 Aug 28, 2009, 3:30 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

Btw if you get a chance then remove the update i put up for it since your doing it all for the svn and getting all the fixes in it. No point in confusing anyone with more downloads then they need and that one only had the changes for cygwin compiling.
       
Pages:<< prev 1 next >>