Page 1 of 1

Actor extension ability

PostPosted: Wed Jan 16, 2019 11:29 am
by Major Cooke
Just so this isn't forgotten. I understand priorities are currently elsewhere so this is just here as a reminder, seeing as Actor now has the path cleared.

Re: Actor extension ability

PostPosted: Tue Jun 18, 2019 9:04 am
by D2JK
If you don't mind me asking; what stopped the progress on this feature? In a related discussion over six months ago, Graf said he was "almost done exporting PlayerPawn which is the last remaining blocker for allowing user-side extends of class Actor" (source).

Re: Actor extension ability

PostPosted: Tue Jun 18, 2019 9:32 am
by Graf Zahl
The blocker is that the compiler cannot combine parts of different translation units without screwing things up badly.

Re: Actor extension ability

PostPosted: Wed Jun 19, 2019 10:14 am
by Major Cooke
Different translation units?

Re: Actor extension ability

PostPosted: Wed Jun 19, 2019 10:41 am
by Apeirogon
Graf Zahl wrote:compiler screwing things up badly

Like how, for example? Actor class, defined in gzdoom pack, definition turns into mess from code from all files?

Major Cooke wrote:Different translation units?

Roughly speaking, single zscript file is a single translation unit which gzdoom translate (turn text in it to bytecode) using magic. Different translation units -> different zscript files.
I dont know how exactly zscript compiler work, but I think it translate each file separately and then combine it into one single file, which cause conflicts between "extended" and "default" actors.