Login
User Name:

Password:



Register

Forgot your password?
Any Smaug muds running?
Nov 11, 2024 8:28 pm
By eldhamud
Space.c Commented out section
Oct 28, 2024 4:48 am
By Remcon
SmaugFUSS 1.8/1.9
Sep 21, 2024 5:04 am
By Elwood
Bug: char_check( )
Aug 31, 2024 12:27 am
By GatewaySysop
Bug: move_char( )
Aug 30, 2024 3:52 am
By GatewaySysop
Discord Websocket Server
Author: Khonsu
Submitted by: Khonsu
Mapout Fix
Author: Khonsu
Submitted by: Khonsu
Progfind command
Author: Khonsu
Submitted by: Khonsu
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
Users Online
AhrefsBot, Bing, Google

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
492
3,804
19,671
586
MADEiUM

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SWFOTE FUSS » Space.c Commented out section
Forum Rules | Mark all | Recent Posts

Space.c Commented out section
< Newer Topic :: Older Topic > Wonder why this was commented out?

Pages:<< prev 1 next >>
Post is unread #1 Oct 26, 2024 1:58 pm   
Go to the top of the page
Go to the bottom of the page

Elwood
Fledgling
GroupMembers
Posts10
JoinedMar 29, 2024

 
          if ( ship->sclass != SHIP_SPACE_STATION && !autofly(ship) )
          {
            if ( ship->starsystem->star1 && strcmp(ship->starsystem->star1,"") )
            {
              if (ship->vx >= ship->starsystem->s1x + 1 || ship->vx <= ship->starsystem->s1x - 1 )
                ship->vx -= URANGE(-3,(ship->starsystem->gravitys1)/(ship->vx - ship->starsystem->s1x)/2,3);
              if (ship->vy >= ship->starsystem->s1y + 1 || ship->vy <= ship->starsystem->s1y - 1 )
                ship->vy -= URANGE(-3,(ship->starsystem->gravitys1)/(ship->vy - ship->starsystem->s1y)/2,3);
              if (ship->vz >= ship->starsystem->s1z + 1 || ship->vz <= ship->starsystem->s1z - 1 )
                ship->vz -= URANGE(-3,(ship->starsystem->gravitys1)/(ship->vz - ship->starsystem->s1z)/2,3);
            }
          
            if ( ship->starsystem->star2 && strcmp(ship->starsystem->star2,"") )
            {
              if (ship->vx >= ship->starsystem->s2x + 1 || ship->vx <= ship->starsystem->s2x - 1 )
                ship->vx -= URANGE(-3,(ship->starsystem->gravitys2)/(ship->vx - ship->starsystem->s2x)/2,3);
              if (ship->vy >= ship->starsystem->s2y + 1 || ship->vy <= ship->starsystem->s2y - 1 )
                ship->vy -= URANGE(-3,(ship->starsystem->gravitys2)/(ship->vy - ship->starsystem->s2y)/2,3);
              if (ship->vz >= ship->starsystem->s2z + 1 || ship->vz <= ship->starsystem->s2z - 1 )
                ship->vz -= URANGE(-3,(ship->starsystem->gravitys2)/(ship->vz - ship->starsystem->s2z)/2,3);
            }
          
            if ( ship->starsystem->planet1 && strcmp(ship->starsystem->planet1,"") )
            {
              if (ship->vx >= ship->starsystem->p1x + 1 || ship->vx <= ship->starsystem->p1x - 1 )
                ship->vx -= URANGE(-3,(ship->starsystem->gravityp1)/(ship->vx - ship->starsystem->p1x)/2,3);
              if (ship->vy >= ship->starsystem->p1y + 1 || ship->vy <= ship->starsystem->p1y - 1 )
                ship->vy -= URANGE(-3,(ship->starsystem->gravityp1)/(ship->vy - ship->starsystem->p1y)/2,3);
              if (ship->vz >= ship->starsystem->p1z + 1 || ship->vz <= ship->starsystem->p1z - 1 )
                ship->vz -= URANGE(-3,(ship->starsystem->gravityp1)/(ship->vz - ship->starsystem->p1z)/2,3);
            }
          
            if ( ship->starsystem->planet2 && strcmp(ship->starsystem->planet2,"") )
            {
              if (ship->vx >= ship->starsystem->p2x + 1 || ship->vx <= ship->starsystem->p2x - 1 )
                ship->vx -= URANGE(-3,(ship->starsystem->gravityp2)/(ship->vx - ship->starsystem->p2x)/2,3);
              if (ship->vy >= ship->starsystem->p2y + 1 || ship->vy <= ship->starsystem->p2y - 1 )
                ship->vy -= URANGE(-3,(ship->starsystem->gravityp2)/(ship->vy - ship->starsystem->p2y)/2,3);
              if (ship->vz >= ship->starsystem->p2z + 1 || ship->vz <= ship->starsystem->p2z - 1 )
                ship->vz -= URANGE(-3,(ship->starsystem->gravityp2)/(ship->vz - ship->starsystem->p2z)/2,3);
            }
          
            if ( ship->starsystem->planet3 && strcmp(ship->starsystem->planet3,"") )
            {
              if (ship->vx >= ship->starsystem->p3x + 1 || ship->vx <= ship->starsystem->p3x - 1 )
                ship->vx -= URANGE(-3,(ship->starsystem->gravityp3)/(ship->vx - ship->starsystem->p3x)/2,3);
              if (ship->vy >= ship->starsystem->p3y + 1 || ship->vy <= ship->starsystem->p3y - 1 )
                ship->vy -= URANGE(-3,(ship->starsystem->gravityp3)/(ship->vy - ship->starsystem->p3y)/2,3);
              if (ship->vz >= ship->starsystem->p3z + 1 || ship->vz <= ship->starsystem->p3z - 1 )
                ship->vz -= URANGE(-3,(ship->starsystem->gravityp3)/(ship->vz - ship->starsystem->p3z)/2,3);
            }
          }

//
//
          for ( target = ship->starsystem->first_ship; target; target = target->next_in_starsystem)
          { 
                if ( target != ship &&
                    abs(ship->vx - target->vx) < 1 &&
                    abs(ship->vy - target->vy) < 1 &&
                    abs(ship->vz - target->vz) < 1 )
                {
                    ship->collision = target->maxhull;
                    target->collision = ship->maxhull;
                }                   
          }

Anyone happen to know why this might have been commented out in Starwars? I uncommented it, it compiled fine. I tried it out but not finding a exact reasoning or anything out of ordinary with this.

Post is unread #2 Oct 26, 2024 3:54 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,923
JoinedJul 26, 2005

 
// is normally used for comments on that line so removing the // shouldn't affect anything as long as it is an empty line. If it will be longer than a single line they like to put them in /* */

Post is unread #3 Oct 26, 2024 10:12 pm   
Go to the top of the page
Go to the bottom of the page

Elwood
Fledgling
GroupMembers
Posts10
JoinedMar 29, 2024

 
haha no not those.. i know those are comment outs.. i missed removing those. it was my marker as to what was commented out :P

That whole section of code is what i was talking about as it all was commented out

Post is unread #4 Oct 28, 2024 4:48 am   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,923
JoinedJul 26, 2005

 
oh well id be simply guessing if I tried to guess why it was commented out lol. You probably have far more knowledge on that code base than I do lol :)

Pages:<< prev 1 next >>