Bug in program.

Bug in program.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Bug in program.

Post by Archangel of Death »

Even though it looks like

Code: Select all

void CUnit::UpdateTerrainType()
{
	if (curTerrainType != lastTerrainType) {
		cob->Call(COBFN_SetSFXOccupy, curTerrainType);
		lastTerrainType = curTerrainType;
	}
}
should be sending curTerrainType = 0; to setSFXoccupy in the script when the unit is being transported, it is not. I do not know why not. I can see no reason why

Code: Select all

if (inTransport) {
	curTerrainType = 0;
	return;
}
is failing to set it to 0 from my perusal of the scripts, just that trying to use a value of 0 so something happens when a unit is loaded does nothing.

That may not have been clear... The pelican's transform script functions. That means it is giving a value when terrain changes. Except where the unit is loaded, it is at the very least not sending a value of 0 to the unit when it gets loaded into a transport. Is the variable inTransport failing to be set to true by the transport scripting?

And one more thing, my desire to get the ammo system in the Battletech mod working is strong enough that I will begin stalking SY's until this is fixed. :evil:
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

In TA setSFXoccupy(...) gets called with a 0 argument when a unit gets loaded.
We wish the same to hold true for Spring.
Post Reply

Return to “Engine”