Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kevL

Pages: [1]
1
Troubleshooting / Difficulty bug, perhaps.
« on: October 17, 2013, 09:52:10 pm »
introducing 2 muton soldiers

The first has been mind-controlled this turn, and its stats show normal, adjusted for Genius difficulty.

The second, however, was mind-controlled last turn and reloaded from a save. Its stats have reverted to Beginner.


I tried to hunt this down but it eludes me; the closest i got is that UnitStats seem to be derived via BattleUnit for fresh aliens, while reloaded aliens appear to take theirs from Unit

( it's slightly possible there's something quirky in my ruleset, so confirmation is appreciated )



These screens were taken in git_master_2013_10_17_1853 (recent)

2
Troubleshooting / curious, SavedBattleGame::getPatrolNode() @ Wb.
« on: October 02, 2013, 06:57:46 am »
- from SavedBattleGame::getPatrolNode()

Code: [Select]
for (int i = 0; i < end; ++i)
{
if (!scout && fromNode->getNodeLinks()->at(i) < 1) continue;
Node *n = getNodes()->at(scout ? i : fromNode->getNodeLinks()->at(i));
if ((n->getFlags() > 0 || n->getRank() > 0 || scout) https:// for non-scouts we find a node with a desirability above 0
    && (!(n->getType() & Node::TYPE_SMALL)
|| unit->getArmor()->getSize() == 1) https:// the small unit bit is not set or the unit is small
&& (!(n->getType() & Node::TYPE_FLYING)
|| unit->getArmor()->getMovementType() == MT_FLY) https:// the flying unit bit is not set or the unit can fly
&& !n->isAllocated() https:// check if not allocated
&& !(n->getType() & Node::TYPE_DANGEROUS) https:// don't go there if an alien got shot there; stupid behavior like that
&& setUnitPosition(unit, n->getPosition(), true) https:// check if not already occupied
&& getTile(n->getPosition()) && !getTile(n->getPosition())->getFire() https:// you are not a firefighter; do not patrol into fire
&& (!scout || n != fromNode) https:// scouts push forward
&& n->getPosition().x > 0 && n->getPosition().y > 0)
{
if (!preferred
|| (preferred->getRank() == Node::nodeRank[unit->getRankInt()][0] && preferred->getFlags() < n->getFlags())
|| preferred->getFlags() < n->getFlags()) preferred = n;
{
compliantNodes.push_back(n);
}
}
}

preferred = n is hiding...

Even more confusing is that, although a change to SavedBattleGame.cpp shows up for me in the commit, "speed up alien turn somewhat" to Sup/master, this file didn't automatically merge to my personal branch, unlike AlienBAIState & CivilianBAIState which merged fine. so, Given the alleged confusion regarding preferred = n I'm wondering which is correct:

Code: [Select]
https:// pre-commit
getPathfinding()->calculate(unit, n->getPosition());
if (getPathfinding()->getStartDirection() != -1)
{
compliantNodes.push_back(n);
}
getPathfinding()->abortPath();

https:// or, simply

https:// post-commit
compliantNodes.push_back(n);


i Assume the latter, but figure a closer look'd be good too, if only for better formatting.

3
Troubleshooting / Morale bonus discrepancy...
« on: September 23, 2013, 12:56:14 pm »
SavedBattleGame::getMoraleModifier()

leadership bonuses are currently at

commander:   150
colonel:   125
captain:   115
sergeant:   110

but UfoPedia.org says these should be

commander:   35%
colonel:   20%
captain:   15%
sergeant:   10%



intentional? oversight? Am i missing something

4
Programming / memLeak when priming grenades?
« on: September 13, 2013, 11:30:48 pm »
I'm just learning c++ (don't laugh unless you want to)

i have a lot of experience with NwScript (don't underestimate it..)


So, in PrimeGrenadeState.cpp, I come across the destructor and notice it doesn't explicitly delete _title, _window, _bg, etc. Yet in other destructors, eg. Inventory.cpp, I notice that these 'new' subobjects are explicitly deleted. So i'm wondering:

is that a memory leak?


[ edit ] I'm guessing, not, because in BattlescapeState.cpp i see a bunch of 'news' that are also not explicitly deleted (yet some are..) in the destructor. Perhaps some of those subobjects are automatically deleted when the object itself is deleted...

5
Programming / audio: default sample rate (discuss )
« on: September 08, 2013, 09:56:57 pm »
Engine/Options.cpp, createDefault(), line 111 sets the default sample rate in options.cfg ...

the value is currently "22050". A problem is that the original files have a rate of 11.025k. The result sounds harsh to this audio-engineer's ears


Suggest: changing the default value to "11025"

caveat, results may be system dependent.

--
difference between oXc and UFO:
oXc, https://www.youtube.com/watch?feature=player_detailpage&v=MMLb7dpO9fE#t=455 - tinny metallic zing (sort of an aftereffect)
UFO, https://www.youtube.com/watch?feature=player_detailpage&v=2W0DnuLQpQ0 - normal (muted slightly due to recording, and the 5.5k cutoff of the lower sample rate)

6
Programming / deathPirouette
« on: August 19, 2013, 04:05:49 am »
I've been tinkering and niggling with the code. Here's an example of the deathspin animation, which i find amusing! Eventually i'd like to set up git and do small PR's but that won't happen for a month...


inspiration?

7
Programming / Centering X-hairs on the minimap
« on: August 03, 2013, 07:47:25 am »
the 1x1px offset was really bothering me, so I tracked down the code and this works:

Battlescape/MiniMapView.cpp, ~line 150+

Code: [Select]
drawLine(centerX - CELL_WIDTH -1, centerY - CELL_HEIGHT -1,
centerX - xOffset -1, centerY - yOffset -1,
color); https:// top left
drawLine(centerX + xOffset -1, centerY - yOffset -1,
centerX + CELL_WIDTH -1, centerY - CELL_HEIGHT -1,
color); https:// top right
drawLine(centerX - CELL_WIDTH -1, centerY + CELL_HEIGHT -1,
centerX - xOffset -1, centerY + yOffset -1,
color); https:// bottom left
drawLine(centerX + CELL_WIDTH -1, centerY + CELL_HEIGHT -1,
centerX + xOffset -1, centerY + yOffset -1,
color); https:// bottom right

If someone with git-fu would like to toss it into a nightly build Pls do. All those "-1"s are yours truly,

8
Programming / "TraceAI" in options.Cfg ?
« on: July 29, 2013, 01:51:48 am »
I notice that when creating an options.cfg file, the setting "traceAI" gets written twice. Slightly differently, tho:

traceAI: false
TraceAI: ""


- thought i'd mention it in case it's one of those things... The first appears when the game is loaded and immediately closed; the second appears only after loading a tactical save map, then closed.

( don't want to classify it as a bug, but figure this is the place to speak up. Recent git )



-> did some hunting and, as far as i see, "traceAI" gets set in Engine/Options.cpp, createDefault() with the rest of the config settings, and gets used several times in battle-code. "TraceAI", on the other hand, presently seems confined to only Battlescape\Map.cpp, Map::Map() when a condition is tested.... <- just dabbling there, but it looks like "TraceAI" is obsolete

9
Work In Progress / Geoscape menu
« on: July 20, 2013, 11:36:14 pm »
Can someone point me to the text (or graphic for text) on the Geoscape menu?

i'd like to get my old menu back :

Pages: [1]