Author Topic: Aliens throwing grenades for less TUs than humans?  (Read 12815 times)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #15 on: August 27, 2014, 08:04:06 pm »
Well in XCom you can carry up to about 7 weapons too, it's not Call of Duty either :)

"No, you don't need an additional shotgun to go with your 2 pistols, Assault Rifle, AutoCannon, Stun Rod and Uzi. Now board that Skyranger trooper!" :)

Offline BBHood217

  • Commander
  • *****
  • Posts: 540
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #16 on: November 14, 2014, 11:01:22 am »
After suffering another instance of an alien moving and afterwards only having enough TUs to throw a grenade without priming it only for the grenade to explode anyway, I have to ask:

Is this fair?

Offline TaxxiDriver

  • Captain
  • ***
  • Posts: 97
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #17 on: November 14, 2014, 12:43:09 pm »
Very interesting. So it seems to be that the aliens SHOULD spend the corresponding time units for priming a grenade but it seems not, right? And also quite many players seem to have experienced this problem. I myself also sometimes felt there's something strange about the aliens' throwing a grenade for some reason, but since they don't throw grenades that much frequently, I think I have neglected it so far. It would be great if there's a technical explanation for this problem.

Or is it just my misunderstanding? Honestly, I don't know ??? since I cannot remember exactly a single case when aliens had thrown a grenade and had yet enough time to do some other stuff: they usually just ran away IIRC. But also I doubt if it was just caused by mod conflictions...

« Last Edit: November 14, 2014, 02:53:01 pm by TaxxiDriver »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile

Offline TaxxiDriver

  • Captain
  • ***
  • Posts: 97
    • View Profile

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #20 on: November 15, 2014, 12:49:59 pm »
not yet, but soon.

Offline BBHood217

  • Commander
  • *****
  • Posts: 540
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #21 on: November 15, 2014, 02:00:24 pm »
Wait... this was a bug all along? :o

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #22 on: November 15, 2014, 04:02:00 pm »
For the curious, in the linked function, we see the TU cost computed and checked, but it's never actually substracted from the unit's TU.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Aliens throwing grenades for less TUs than humans?
« Reply #23 on: November 16, 2014, 03:59:47 am »
not quite... it IS subtracted, that's handled elsewhere.

the problem is:

"if (tu <= _unit->getStats()->tu)"

looks correct at first glance, right?
but if i rename the function slightly:

"if (tu <= _unit->getBaseStats()->tu)"

then the problem is MUCH more apparent.

like i said... subtle.