Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Patch for powered units (issue 617)
#13
I will apply this patch later, but I have to say that checking IsOperated() inside EMPulse.cpp looks bad to me. It violates encapsulation, imo.
EMP should be dependent on EMP only, not Operator= as well. It should be checked whether EMP should be disabled before calling DisableEMPEffect(), or DisableEMPEffect() should query a generic state indicator.

Building webs of dependencies like that isn't a good idea.
(I'm not pretending at all that shit like that couldn't be in the current trunk as well, but the fact that bad things have already happened doesn't mean we have to pile more on top of them.)

I think I have an idea on how to best handle this business, I'll test it out in a branch sometime, and then we'll have to see how to integrate your code into it.
Forum Rules

(01.06.2011, 05:43:25)kenosis Wrote: Oh damn don't be disgraced again!

(25.06.2011, 20:42:59)Nighthawk Wrote: The proverbial bearded omni-bug may be dead, but the containment campaign is still being waged in the desert.
Reply


Messages In This Thread
Patch for powered units (issue 617) - by A Mystery Guest - 20.02.2011, 21:49:56
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 21.02.2011, 02:40:43
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 22.02.2011, 02:11:47
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 22.02.2011, 18:02:57
RE: Patch for powered units (issue 617) - by Renegade - 22.02.2011, 19:30:50
RE: Patch for powered units (issue 617) - by Mysterious Guest - 04.06.2011, 11:37:51
RE: Patch for powered units (issue 617) - by Mysterious Guest - 06.06.2011, 17:00:26
RE: Patch for powered units (issue 617) - by hogo - 07.06.2011, 14:44:46



Users browsing this thread: 1 Guest(s)