Back to the Vavoom Forum Archives


Forum

Weird behavior of defaultproperties

Sat, 15 Mar 2008 13:16:35

Crimson Wizard

I really cannot say if its a bug, or our project (Korax Arena) is messed up somehow (I know there is decorate support implemented, maybe this is connected somehow? not sure), thus I decided to post it here, not in "bugs" thread. I noticed that the setting variable value in defaultproperties section sometimes fail and that variable is being assigned either 0, -1 or some other random value, on first glance it feels like when you read or write these there's some bad memory offset, so everything becomes screwed up. What can be a reason of this?
Sun, 16 Mar 2008 23:09:43

Janis Legzdinsh

Where exactly (which class) do you have this?
Mon, 17 Mar 2008 10:32:26

Crimson Wizard

In KA, classes are WeaponFighterAxe and WeaponWitchavenSSword. To be more specific, I first noticed AxeRange member of WeaponFighterAxe be initialized as 0, though in defaultproperties is written AxeRange = 9.0 * MELEERANGE / 4.0;
Mon, 17 Mar 2008 19:48:13

Janis Legzdinsh

It's because I changed weapons to have player's actor object as self. I'll add something to compiler to help avoid errors caused by this.
Tue, 18 Mar 2008 10:13:14

Crimson Wizard

[quote="Janis Legzdinsh":nuok01lq]It's because I changed weapons to have player's actor object as self. Does this mean weapon's 'self' reference will actually point to player's MO? Not sure I understood you correct.
Tue, 18 Mar 2008 17:41:13

Janis Legzdinsh

Yes.

Back to the Vavoom Forum Archives