Login
User Name:

Password:



Register

Forgot your password?
do_owhere recursive
Author: Khonsu
Submitted by: Khonsu
Changes list / Addchange
Author: Khonsu
Submitted by: Khonsu
6Dragons mp3 sound pack
Author: Vladaar
Submitted by: Vladaar
AFKMud 2.2.3
Author: AFKMud Team
Submitted by: Samson
SWFOTEFUSS 1.5
Author: Various
Submitted by: Samson
Users Online
CommonCrawl, AhrefsBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
489
3,794
19,649
596
Elwood

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
Posts4
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,917
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
Posts4
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 >>