project-navigation
Personal tools

Author Topic: SVN 9088 Ship problem  (Read 13341 times)

vvb

  • Guest
SVN 9088 Ship problem
« Reply #15 on: June 19, 2007, 09:06:30 pm »
Quote from: "kracken"
I made a workaround for your problem of 0 speed. Last commit should allow you to move your aircraft.

Please try it and tell me if this is OK.
I must say that I didn't manage to solve the problem, however...


Well, now it seems all ok. May be I can try more test to catch the bug?

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
SVN 9088 Ship problem
« Reply #16 on: June 19, 2007, 10:40:37 pm »
yes, this is the same bug, and it's interesting because the speed of your aircraft is 10 before  adding the shield and 0 afterwards.

So the problem is probably coming from function AII_UpdateAircraftStats, or while parsing the datas of items.

Could you please try to add in cl_aircraft.c, line 2327 (under item = &aircraftItems[aircraft->electronics.itemIdx]; ) :
Code: [Select]
if (currentStat == AIR_STATS_SPEED)
Com_Printf("%i and %f gives ", aircraft->stats[AIR_STATS_SPEED],
item->stats[currentStat]);


and line 2333 (under aircraft->stats[currentStat] *= item->stats[currentStat]; )
Code: [Select]
if (currentStat == AIR_STATS_SPEED)
Com_Printf("%i\n", aircraft->stats[AIR_STATS_SPEED]);


then start a new game, built a base, and look at the console. You should see something like :
Code: [Select]
10 and 0.000000 gives 10
10 and 0.000000 gives 10
30 and 0.900000 gives 26
26 and 0.000000 gives 26


Now install a new fuel pod to your aircraft, wait 2 hours, and tell me what is written in your console ;)

Seculor

  • Guest
SVN 9088 Ship problem
« Reply #17 on: June 19, 2007, 11:43:30 pm »
I can't test the latest svn right now, but after adding the Com_Printf to the old svn8888 version of the file, i'm not getting any additional console output after building a new base or adding a fuel tank:


Code: [Select]
====== UFO Initialized ======

Com_ParseValue: a V_RELABS (relative) value should only be between 0.00..1 and 2.0
Com_ParseValue: a V_RELABS (relative) value should only be between 0.00..1 and 2.0
Com_ParseValue: a V_RELABS (relative) value should only be between 0.00..1 and 2.0
Com_ParseValue: a V_RELABS (relative) value should only be between 0.00..1 and 2.0
Com_ParseValue: a V_RELABS (relative) value should only be between 0.00..1 and 2.0
Com_GetItemByID: Item "craft_weapon_particle_beam" not found.
Global data loaded - size 4946440 bytes
...techs: 149
...buildings: 19
...ranks: 16
...nations: 8

Activate stage intro
Com_GetItemByID: Item "craft_weapon_particle_beam" not found.
Initializing aircrafts and aircraft-items ...
...aircraft and aircraft-items inited
Changing to Singleplayer
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
Save user settings to /home/iouri/.ufoai/2.2-dev/base/config.cfg
SDL audio device shut down.
recursive shutdown


And the fuel tank doesn't get installed, it just always says "Will be installed in 2 hours"

Agrajag

  • Guest
SVN 9088 Ship problem
« Reply #18 on: June 20, 2007, 12:18:08 pm »
I have the same problem in 9189.

If I change any equipment on the firebird, then wait a few days till a mission shows up, the speed is changed to -3 (negative three).

If i start the craft from the Aircraft menu i appears on the geoscape but can't move anywhere but back to base. Leaving it until it runs out of fuel crashes the game.

Btw thanks for the tip about console fonts. I kept deleting the console file 'cos it bothered me. I'll try to do the bug again and give you a log (if needed?)

vvb

  • Guest
SVN 9088 Ship problem
« Reply #19 on: June 20, 2007, 05:11:02 pm »
Quote from: "kracken"
...start a new game, built a base, and look at the console.

 
 After starting new game I have:
Code: [Select]

Activate stage intro
Com_GetItemByID: Item "craft_weapon_particle_beam" not found.
Initializing aircrafts and aircraft-items ...
...aircraft and aircraft-items inited
Changing to Singleplayer
10 and 0.000000 gives 10
10 and 0.000000 gives 10
30 and 0.900000 gives 26
26 and 0.000000 gives 26
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ
CL_UpdateHireVar()... aircraft idx: 0, homebase: PHALANX HQ


Quote from: "kracken"
Now install a new fuel pod to your aircraft, wait 2 hours, and tell me what is written in your console ;)


 After installation and 2 hours of waiting:
Code: [Select]

10 and 0.000000 gives 0
10 and 0.900000 gives 8
8 and 0.000000 gives 0

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
SVN 9088 Ship problem
« Reply #20 on: June 25, 2007, 09:21:12 am »
vvb, could you please try latest release (r9276), I tried another way to fix the bug.

If it still doesn't work, could you please give me one more time the output of your console after building a base and after a fuel pod is installed.

Thanks,

Kracken

vvb

  • Guest
SVN 9088 Ship problem
« Reply #21 on: June 25, 2007, 08:39:01 pm »
Quote from: "kracken"
vvb, could you please try latest release (r9276), I tried another way to fix the bug.


 I've try r9299. Now it seems all ok with the ship & fuel. Looks like your last patch works well. 8)

 Though, r9299 is most strange version I've play.
 First, missing file (already fixed by Mattn), start of mission is crashed (I'll create topic for it)...
 
 But fuel problem now solved I think. I've try to build base near the first UFO site, and ship arrived well. I've try to build base far from site, and get message about not enough fuel. 8)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
SVN 9088 Ship problem
« Reply #22 on: June 25, 2007, 10:40:59 pm »
the crashes will last for some days - we are currently redoing the model system

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
SVN 9088 Ship problem
« Reply #23 on: June 26, 2007, 10:36:32 am »
Quote from: "vvb"
I've try r9299. Now it seems all ok with the ship & fuel. Looks like your last patch works well. 8)


Good news  :D

vvb

  • Guest
SVN 9088 Ship problem
« Reply #24 on: June 26, 2007, 05:18:39 pm »
Quote from: "Mattn"
the crashes will last for some days - we are currently redoing the model system


 Could you be so kind and tell when "good" revision will come out? ;)

Quote from: "kracken"
Good news


 What was that? Platform-dependent bug?

Offline kracken

  • Squad Leader
  • ****
  • Posts: 159
    • View Profile
SVN 9088 Ship problem
« Reply #25 on: June 26, 2007, 05:28:40 pm »
Quote from: "vvb"
What was that? Platform-dependent bug?


There was a test 'if (value > 0.0) {...}', where value is a float.
On my computer, when value was set to 0, this test is false. But on yours, the test was true.

So I just changed it to 'if (value > 0.00001) {...}', and now it works fine for both.

Thanks for your help and your patience

vvb

  • Guest
SVN 9088 Ship problem
« Reply #26 on: July 01, 2007, 03:54:20 pm »
Quote from: "vvb"
Quote from: "Mattn"
the crashes will last for some days - we are currently redoing the model system


 Could you be so kind and tell when "good" revision will come out? ;)


 Mattn, is "good version" come out?
 Can I download and test it?
 Or it'll be better to wait some days? 8-)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
SVN 9088 Ship problem
« Reply #27 on: July 01, 2007, 05:57:22 pm »
there is a new testinstaller at mattn.ninex.info - this installer should already include kracken's latest patch

vvb

  • Guest
SVN 9088 Ship problem
« Reply #28 on: July 01, 2007, 06:36:34 pm »
Quote from: "Mattn"
there is a new testinstaller at mattn.ninex.info - this installer should already include kracken's latest patch


Kracken's patch is very important, but I can bypass this bug. Frankly, I've asked about "redoing the model system". 8-) Is it finished?
 And I'm terribly sorry, but I have no resources to download big traffic. In Russia you have to pay a lot of money for Internet... 8-(
That's why SVN is best for me. I can easily update programm without downloading it from the beginning.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
SVN 9088 Ship problem
« Reply #29 on: July 01, 2007, 07:58:51 pm »
no, this is not yet finished - and will take longer than expected. but i'm still working on it (besides other things)