Login
User Name:

Password:



Register

Forgot your password?
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
I3 and IMC
Dec 8, 2024 6:35 pm
By Remcon
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
LOP 1.5
Author: Remcon
Submitted by: Remcon
Users Online
AhrefsBot, Google, Remcon

Members: 1
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
494
3,808
19,707
588
Mortrex

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » SWFOTE FUSS » Ship Crashing into objects..
Forum Rules | Mark all | Recent Posts

Ship Crashing into objects..
< Newer Topic :: Older Topic > Crashing into the sun for mainly..

Pages:<< prev 1 next >>
Post is unread #1 Mar 29, 2024 7:48 am   
Go to the top of the page
Go to the bottom of the page

Elwood
Fledgling
GroupMembers
Posts12
JoinedMar 29, 2024

 
Hey again. It's been years, got back into playing with this stuff. Be more learning to do lol.
I used to be Deathbringer/RapidRunner but i dont know password i used, or have the email i used years ago..
anyhow... problem is...

You fly any ship into the sun it'll crash mud.

Speed: 100 Hull: 100% Shields: 0% Energy: 96%
Coordinates in Coruscant system: 110 -122 121
Proximity alert: Corusca Prime 0 0 0


Core Dump:

0x0000558e29710152 in move_ships () at space.c:606
606 if( !ship || !ship->starsystem )
(gdb) bt
#0 0x0000558e29710152 in move_ships () at space.c:606
#1 0x0000558e297758dc in update_handler () at update.c:2663
#2 0x0000558e2961bce6 in game_loop () at comm.c:570
#3 0x0000558e2961ab3b in main (argc=2, argv=0x7ffd9991c308) at comm.c:246


Post is unread #2 Mar 29, 2024 5:45 pm   
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
well after a quick look at the code you probably should add a ship_next and set ship_next to ship->next at the start and use ship_next instead of ship->next in the for loop. the ship is being destroyed when it flies into the sun and causing the issue.

Post is unread #3 Mar 30, 2024 12:54 am   Last edited Mar 30, 2024 5:38 am by Elwood
Go to the top of the page
Go to the bottom of the page

Elwood
Fledgling
GroupMembers
Posts12
JoinedMar 29, 2024

 
Remcon is a Genius! Don't know why i didnt think of it! lol.

Fix that works then would be here to help others.

in space.c move_ship
find
SHIP_DATA *ship;

and change it to:
SHIP_DATA *ship, *ship_next;


find
for ( ship = first_ship; ship; ship = ship->next )
   {


change it to:
for (ship = first_ship; ship; ship = ship_next)
{
    // Store the next ship pointer before potentially destroying the current ship
    ship_next = ship->next;


its what i did and its working

Pages:<< prev 1 next >>