2 bugs

zergnerd

Spaceman
Here's a pair o' bugs I found playing 1.0 tonight.

1) If my ship shows 0 space left in the upgrade section, I can't buy a space-requiring item (like guns). I have have to first sell a space-requiring item (like my ECM), buy the guns and then rebuy the item I sold.

2) Ok, perhaps not a bug but REALLY annoying. When I blow up an enemy ship my nav computer invariably targets one of the furthest hostile ships instead of a close one. When I'm fighting 17 dralthi, the last I thing I want to be doing is fly 10000 clicks through a swarm of fighters or frantically hit 'h' to cycle to a nearby enemy. Manual doesn't mention any key to 'target nearest enemy' and the targeting computer isn't smart enough to do it automatically either.

zergnerd
 
1) Most ships have 16 of space for equipment, which should be plenty. What I've noticed is sometimes you can end up with duplicates. I once had the same item twice: Once under "Engine" and once again under "Engines" categories. Also I found I had plasteel AND tungsten armors. If you get rid of duplicate items, you should have plenty space for everything.

2) That IS annoying. I don't think I'd pay 5 bucks today, for these 27th century radars.. ;-)

Where's the code for these radars? If it's C++ I'll fix it.
 
Looks like there's already a function...
Code:
void FireKeyboard::NearestTargetKey(const KBData&,KBSTATE k) {
  if (g().neartargetkey!=PRESS)
    g().neartargetkey = k;
  if (k==PRESS)
    ExamineWhenTargetKey();
}
But I don't see where the work gets done...
I don't believe it would be this parse bool thing, would it?:
Code:
void ExamineWhenTargetKey() {
  static bool reallySwitch=XMLSupport::parse_bool(vs_config->getVariable("graphics","hud","switchToTargetModeOnKey","true"));
...
 
By the way, you're comparing floats for equality here:
Code:
bool FireKeyboard::ShouldFire(Unit * targ) {
  float dist=FLT_MAX;
  float mrange;
  if (gunspeed==.0001) {
    parent->getAverageGunSpeed (gunspeed,gunrange,mrange);
  }
Not sure how to fix it since I don't know what gunspeed is..
 
Code:
bool TargThreat( Unit *me, Unit *target )
{
	if(!TargAll(me,target)) return false;
	if(target->isUnit()==MISSILEPTR) return false;
	if(target->Target()==me) return true;
	if(me->Threat()==target) return true;
	return false;
}

bool TargNear( Unit *me, Unit *target )
{
  static bool can_target_sun = XMLSupport::parse_bool
  (
    vs_config->getVariable( "graphics", "can_target_sun", "false" )
  );
  return
  (
    me->getRelation(target)<0
    || TargThreat(me,target)
    || target->getRelation(me)<0
  )
  && TargAll( me, target )
  && target->isUnit()!=MISSILEPTR  //:o isUnit() not boolean?
  && ( can_target_sun  || !UnitUtil::isSun( target ) );
}

What's all this 'can_target_sun' stuff? Sun busting missions? :D
 
zergnerd said:
1) If my ship shows 0 space left in the upgrade section, I can't buy a space-requiring item (like guns). I have have to first sell a space-requiring item (like my ECM), buy the guns and then rebuy the item I sold.
dan_w said:
Most ships have 16 of space for equipment, which should be plenty.

what he's talking about is - if you are full (which happened to me on my demon) you can't swap guns around. they take up no space, but the game thinks they do, to the point where i had three fusions and a tach and 0 of 12. sold the tach, still 0 of 12. couldn't buy a fourth fusion. couldn't buy the tach back. had to sell my burners, then buy the fusion, then buy the burners back.
 
Back
Top