Page 1 of 1

Making labs morph

Posted: 06 Oct 2007, 20:05
by DZHIBRISH
i want to be able to morph labs.to morph_defs.lua i'v added the following:

-- Labs
armlab = {
into = 'armalab'
},

I get a morph button on my lab but the lab won't morph.Not getting any errors in infolog.
What else do i need to edit?

Posted: 09 Oct 2007, 07:48
by jK
sorry that I didn't trust you :oops:

But I found the problem/bug.

It is that the lua CommandFallback() is only called in CommandAI.cpp, and iirc factories don't use it. So the CMD_MORPH is erased before the morph gadget could handle it.
But you could directly handle the CMD_MORPH in AllowCommand(), so the command can't queued up anymore (why should it?).

PS @somebody who can write clean c-code: that factories can't receive the CommandFallback() is a bug and can be really annoying if you want to program mobile factories for example, so it should be fixed :wink:

Posted: 09 Oct 2007, 08:45
by DZHIBRISH
You didnt trust me?
So you thought i was making stuff up?
Me not undertand logic...

About your explanation..:
what??

Posted: 09 Oct 2007, 09:01
by DZHIBRISH
please can somebody fix this.

Posted: 09 Oct 2007, 09:22
by jK
i will try to fix/patch it soon

but this can take 1-3 days (very busy atm)

Posted: 09 Oct 2007, 15:31
by rattle
PS @somebody who can write clean c-code: that factories can't receive the CommandFallback() is a bug and can be really annoying if you want to program mobile factories for example, so it should be fixed
Post it on the bug tracker.