Back to the Vavoom Forum Archives


Forum

[Closed] More customization

Thu, 10 Apr 2008 16:15:12

Crimson Wizard

Well, this is about Actor/PlayerPawn problem again, I decided to ask about some customization in common classes instead that proposal I posted here before (I deleted it actually <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, since whole idea was rather raw). Basically, if one wishes to make custom PlayerPawn be child of his custom Actor class, there would be one large problem: there's a number of reference conversions to common PlayerPawn type in common progs, and usually these are met in final methods that could not be simply overriden. It's possible ofcourse to write your own methods, then you'll have to rewrite methods that use these final methods and maybe some more... and in whole it will produce quite a mess. Might be there some way to simplify customization? For example, I tried that in KoraxRPG as a temporary hack, it required only few methods to be created in PlayerEx to get some values from Player's MO, like GetMOViewHeight etc; in PlayerEx these methods read values from PlayerPawn(MO), but they could be overriden in custom Player class to read values from some KRPGPlayerPawn(MO). That's was the simpliest decision, maybe not very beautiful. There could be other ways to solve this. Also I wish to propose adding custom falling damage flag (and overridable method) for both player and monsters in case custom game needs to process falling damage differently.
Thu, 10 Apr 2008 17:06:34

Janis Legzdinsh

The simplest thing I can think of is to split up EntityEx and Actor classes into multiple files and then, when compiling them, specify an include directory which is then checked first. This way you could modify Actor class by using modified versions of some files.

Back to the Vavoom Forum Archives